Re: [AD] crash! unhandled exception wip414 win2k msvc

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> Makes sense - the question is, why does this only seem to happen to
> allegro, and how do other games get around it? Could any tips be taken from
> the SDL source code, for example?

Does SDL feature a behind-the-scene color convertion mechanism as ours ? 
Moreover, SDL is structurally simpler than Allegro; in particular, I think 
only one thread typically draws onto the screen. In Allegro, two threads draw 
onto the screen in windowed mode.

I now think that the second thread (which automatically repaints the window on 
demand) may be the culprit, because the crash only occurs when the Alt+TAB 
window overlaps the Allegro window. Could you try to disable it ? Simply 
comment out line 297 in src/win/wwnd.c:

    win_gfx_driver->paint(&ps.rcPaint);


> If all else fails, how about the nasty kludge of wrapping the
> _colorconv_blit function in a _try..._except clause, to catch the exception
> and abort the blit if the surface has been lost?

Gosh! I'd rather advertise Microsoft products than use such an ugly hack ;-)

-- 
Eric Botcazou



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/