On Fri, Sep 18, 2009 at 5:08 PM, Bo Jangeborg <b...@softwave.se> wrote:

> If I am not using the debugger I get a segmentation error. If I use the
> debugger that is integrated with Pydev in Eclipse I do get a
> trace, assuming that its the same error, but it seems safe to assume.
>
Hmmm.. well that's pretty weird. It seems odd that a python debugger would
stop things with an exception as opposed to a segfault. I wonder if the
segfault is happening in the default exception handler?

On the crash handling windows window, can you get any hints by clicking the
stuff that shows you details of the crash it will send? Like what module it
crashed in for instance? Also, on windows if you want to try and catch a seg
fault specifically (which maybe you don't in this case) you can always
attach the windbg or visual studio debuggers to running applications before
the crash happens.



> It would have to playback a user solving a solitaire game which is were I
> have been able to repeat the error infrequently. Got any suggestions
> for how to do that in windows ?
>
I'm not sure if Vista still supports it well, but you can call mouse_event
using ctypes, as ctypes.windll.user32.mouse_event()

to learn how to use mouse_event, read here:
http://msdn.microsoft.com/en-us/library/ms646260(VS.85).aspx

With that, you can have the game record what mouse movements it gets while
you are playing and write it out, and then have a separate python program
that plays that mouse movement back - the only other annoying windows bits
to that would be finding the game's window and then mapping the games x & y
positions in the game's window to the windows desktop x & y positions for
use with mouse_event. I don't know the names of the windows api functions
you want there off the top of my head, but ctypes can call the things you
need there pretty easily.


I am using the latests stable pygame, and python 2.5 on a Windows Vista Dual
> Core machine. The only other c extension that I use is
> Psyco, but that should be disabled when running the debugger. I am not
> blitting surfaces to it self . I am however blitting to subsurfaces
> which I remember could cause a problem in some previous version of Pygame.
> So I set some print statements to see if the crash happend
> while blitting but no luck there.
>
> That Psycho bit is interesting... I wonder if it only crashes when psycho
is running? what about running with psycho off but not in the python
debugger? do you get a seg fault in that case, or a python exception?

Reply via email to