Page 1 of 1

Snake! Application Exception

Posted: Thu Nov 17, 2011 6:49 pm
by MJT
Hey! :D I was playing on your "Snake!" video game inside of your Visopsys operating system and it suddenly crashed when I reached the score of "0196." Another window appeared in front of it with the title of "Application Exception" and the message of "Process "gui thread" caused a page fault exception at application address 00000000." I hope that you don't mind me reporting it to you on here. :) If you would like me to do some more testing on it, then please just let me know. ;)

Re: Snake! Application Exception

Posted: Sat Nov 19, 2011 1:43 am
by andymc
Thanks very much for a report. That sounds like a tricky one, since the fault didn't actually occur in the app you were using. The GUI thread mostly takes care of turning raw user inputs (mouse movements, keyboard presses etc) into window system events. Those are put into queues where they can be collected by the applications that own the relevant window where the event occurred. It can be difficult to reproduce these kinds of crashes, since they're very asynchronous and fairly non-deterministic! It would be very helpful if you could determine a script of 'steps' to make it happen, but it doesn't sound like that would be easy to do in this case.

Re: Snake! Application Exception

Posted: Tue Nov 22, 2011 5:36 am
by MJT
Thank you very much for your really nice reply to my bug report regarding your "Snake!" video game, Andrew. :D I'm really sorry that it's not a problem that I'll easily be able to replicate for you, but I'll most certainly give it a go. :) I was just wondering as to whether or not that it could possibly be a race condition in the queuing system of the window events code?

Re: Snake! Application Exception

Posted: Tue Nov 22, 2011 10:32 am
by andymc
That's possible Michael,

When a mouse or keyboard interrupt arrives, the driver puts the event data into a stream (FIFO) which is later read by the GUI thread, which dispatches the event (to the appropriate button, window, etc). The data goes into the stream in an interrupt context, in which it's not possible to hold a lock on the stream. However, the stream is not read by the GUI thread unless there's enough data there to comprise at least one complete event, so it should be safe, but I'll take another look to try and figure out whether there's a synchronization problem there.

Andy

Re: Snake! Application Exception

Posted: Fri Nov 25, 2011 11:40 am
by MJT
Thank you very much for your really nice reply to me, Andrew. :D I wish you all of the best with fixing the problem, and if there's anything that I can do to help you, then please just let me know. :)