>In a very busy loop, I keep calling > return -1 if Win32::GUI::DoEvents () < 0;
Harald, I profess to know nothing, but I use a tight, infinite while loop that calls "gui_listen" each iteration. gui_listen is just: sub gui_listen { # anyone there? Win32::GUI::PeekMessage(0,0,0); Win32::GUI::DoEvents(); return 1; } I also have gui_listen's sprinkled throughout various other timely-ish functions so, ultimately, gui_listen is called at the minimum of once per iteration, with a max of about three or four times. I've yet to see crashes like you're having. I doubt this helps, but :) ... -- Morbus Iff ( strive for mediocrity ) Culture: http://www.disobey.com/ and http://www.gamegrene.com/ Tech: http://www.oreillynet.com/pub/au/779 - articles and weblog icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus