]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix the crash-on-ActiveX-callback problem
authorRobin Dunn <robin@alldunn.com>
Sat, 6 Jul 2002 00:55:46 +0000 (00:55 +0000)
committerRobin Dunn <robin@alldunn.com>
Sat, 6 Jul 2002 00:55:46 +0000 (00:55 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/CHANGES.txt
wxPython/src/helpers.cpp

index 0964ceba0e33ce586c5c8d4fc6a129783fb97b89..6de00307840ee1238dc31d3639b56b801601a470 100644 (file)
@@ -142,6 +142,13 @@ ActiveXWrapper already in the library, but it is implemented all in
 C++ and therefore does not need any of the modules from win32 all and
 so it is less fragile in the face of changes.
 
+Fixed the ActiveXWrapper problem.  Looks like when the win32com
+modules make a "callback" that they (incorrectly, IMHO) allocate a
+transient thread state structure.  Since wxPython is now saving
+tstates for it's own callbacks it ended up using garbage after
+win32com gots rid of the tstate...
+
+
 
 
 2.3.2.1
index bc9dab80718d2c307b2521ef10f7ace055eb31e8..8be7e483b5b3a4d1a65e2e31b459f23d0cdb19db 100644 (file)
@@ -586,7 +586,15 @@ void wxPySaveThreadState(PyThreadState* tstate) {
     for(size_t i=0; i < wxPyTStates->GetCount(); i++) {
         wxPyThreadState& info = wxPyTStates->Item(i);
         if (info.tid == ctid) {
-            info.tstate = tstate;
+#if 0
+            if (info.tstate != tstate)
+                wxLogMessage("*** tstate mismatch!???");
+#endif
+            // info.tstate = tstate;    *** DO NOT updating existing ones???
+            // Normally it will never change, but apparently COM callbacks
+            // (i.e. ActiveX controls) will (incorrectly IMHO) use a transient
+            // tstate wich will then be garbage the next time we try to use
+            // it...
             wxPyTMutex->Unlock();
             return;
         }