Is this a bug in wxPython or is there something I can fix in my code?
This is on RedHat 9, python 2.3 from wxPythonGTK-py2.3-2.4.2.4-1.i386.rpm
The same code runs without problem on windows.
Barry
Traceback (most recent call last):
File "/u/barry/subversion/current/pysvn/WorkBench/Source/wb_subversion_provider.py", line 884, in callback_notify
print '%s %s' % (wc_notify_action_map[ arg_dict['action'] ], arg_dict['path'])
File "/u/barry/subversion/current/pysvn/WorkBench/Source/wb_frame.py", line 264, in write
self.text_ctrl.WriteNormal(string)
File "/u/barry/subversion/current/pysvn/WorkBench/Source/wb_frame.py", line 345, in WriteNormal
self.WriteStyledText( text, self.style_normal )
File "/u/barry/subversion/current/pysvn/WorkBench/Source/wb_frame.py", line 333, in WriteStyledText
self.InsertText( insert_pos, text )
File "/usr/lib/python2.3/site-packages/wxPython/stc_.py", line 135, in InsertText
val = stc_c.wxStyledTextCtrl_InsertText(self, *_args, **_kwargs)
wxPython.wxc.wxPyAssertionError: C++ assertion "wxTheApp->m_idleTag == 0" failed in /usr/src/redhat/BUILD/wxPythonSrc-2.4.2.4/src/gtk/app.cpp(374): attempt to install idle handler twice
Is this a bug in wxPython or is there something I can fix in my code?
This is on RedHat 9, python 2.3 from wxPythonGTK-py2.3-2.4.2.4-1.i386.rpm
The same code runs without problem on windows.
Barry
Traceback (most recent call last):
File "/u/barry/subversion/current/pysvn/WorkBench/Source/wb_subversion_provider.py", line 884, in callback_notify
print '%s %s' % (wc_notify_action_map[ arg_dict['action'] ], arg_dict['path'])
File "/u/barry/subversion/current/pysvn/WorkBench/Source/wb_frame.py", line 264, in write
self.text_ctrl.WriteNormal(string)
File "/u/barry/subversion/current/pysvn/WorkBench/Source/wb_frame.py", line 345, in WriteNormal
self.WriteStyledText( text, self.style_normal )
File "/u/barry/subversion/current/pysvn/WorkBench/Source/wb_frame.py", line 333, in WriteStyledText
self.InsertText( insert_pos, text )
File "/usr/lib/python2.3/site-packages/wxPython/stc_.py", line 135, in InsertText
val = stc_c.wxStyledTextCtrl_InsertText(self, *_args, **_kwargs)
wxPython.wxc.wxPyAssertionError: C++ assertion "wxTheApp->m_idleTag == 0" failed in /usr/src/redhat/BUILD/wxPythonSrc-2.4.2.4/src/gtk/app.cpp(374): attempt to install idle handler twice
Make sure that you are not doing anything in non-GUI threads that could cause a gtk gui callback to be invoked in the context of that thread.
For example, is the print statement above happening in a worker thread?
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
That's it Robin the print is in a worker thread. stdout is redirected into
a textctrl via the standard python logging module. I'll just have to
marshal the output over to the main thread.
Barry
···
At 21-01-2004 03:04, you wrote:
wxPython.wxc.wxPyAssertionError: C++ assertion "wxTheApp->m_idleTag == 0" failed in /usr/src/redhat/BUILD/wxPythonSrc-2.4.2.4/src/gtk/app.cpp(374): attempt to install idle handler twice
Make sure that you are not doing anything in non-GUI threads that could cause a gtk gui callback to be invoked in the context of that thread.
For example, is the print statement above happening in a worker thread?
wxPython.wxc.wxPyAssertionError: C++ assertion "wxTheApp->m_idleTag == 0" failed in /usr/src/redhat/BUILD/wxPythonSrc-2.4.2.4/src/gtk/app.cpp(374): attempt to install idle handler twice
Make sure that you are not doing anything in non-GUI threads that could cause a gtk gui callback to be invoked in the context of that thread.
For example, is the print statement above happening in a worker thread?
That's it Robin the print is in a worker thread. stdout is redirected into
a textctrl via the standard python logging module. I'll just have to
marshal the output over to the main thread.
If you have a few minutes please take a look at the technique (using CallAfter in write()) that the PyOnDemandOutputWindow in 2.5 is using. I havn't fully tested it yet but it sounds like you have a good scenario to test it in.