[PEAK] Trellis WXEventLoop patch

Sergey Schetinin maluke at gmail.com
Wed Jun 25 18:00:46 EDT 2008

Here's the minimal code that consistently crashes python for me:

import wx
app = wx.App()
wx.CallAfter(0.1, None)

I'm using the standard unicode build for Windows, wx.__version__ == ''
For some reason the code above does not raise an exception when run
from console, but crashes when run as a script, could that be the
reason you don't see the error?

On Thu, Jun 26, 2008 at 00:51, Phillip J. Eby <pje at telecommunity.com> wrote:
> At 07:25 PM 6/25/2008 +0300, Sergey Schetinin wrote:
>> For me it crashes violently (with windows error) briefly showing a new
>> window with a traceback. It happens every single time. In the actual
>> application that traceback is captured and looks like this:
>>  File "C:\Python25\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py",
>> line 14404, in __init__
>>    self.Start()
>>  File "C:\Python25\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py",
>> line 14421, in Start
>>    self.timer.Start(self.millis, wx.TIMER_ONE_SHOT)
>>  File "C:\Python25\lib\site-packages\wx-2.8-msw-unicode\wx\_misc.py",
>> line 1298, in Start
>>    return _misc_.Timer_Start(*args, **kwargs)
>> PyAssertionError: C++ assertion "m_milli > 0" failed at
>> ..\..\src\msw\timer.cpp(89) in wxTimer::Start(): invalid value for
>> timer timeout
>> The problem is that wx.CallLater first argument has to be a positive
>> integer, so if the activity event is less than 0.001 seconds from now
>> it will produce this error, so wx.CallAfter should be used in those
>> cases.
> I understand what you're saying; I just am not able to reproduce this
> problem on my PC with a wx.__version__ of '', with or without
> your test.

Best Regards,
Sergey Schetinin

http://s3bk.com/ -- S3 Backup
http://word-to-html.com/ -- Word to HTML Converter

More information about the PEAK mailing list