One of my apps is having some issues in Windows. It runs just fine in OS X and Linux but Windows is giving me fits. Occasionally, on startup the app will suddenly be shut down by windows. Windows says “this app had a problem and must be shut down.” Sometimes this error is a “BEX” error which when I looked up is basically that Windows is seeing my app is doing something wrong and it initiates its DEP or Data Execution Prevention and kills the app. Other times I get AppHang errors.
I start up the app and fire up a number of threads. These go off and connect to varying devices on the network over TCP connections and start pulling data from those devices. I’m using Aaron Ballman’s “Thread Pool Manager” class and am running at most 15 threads at one time. Additional threads are queued. The user interface does get a little sluggish initially so I am thinking this is something to do with the way that Xojo is launching the threads.
But I can’t debug this because at this point, Windows has taken over everything and Xojo can’t break in.
I add myself to this thread because I also have a crash issue with a windows app.
It has no threads, but it uses calls to an external dll ( bass library ) to play audio files, and I have a series of timers to do some tasks such as get the tracks position or audio level ( this too with calls to Bass )
in this testing phase it simply plays in sequence a big list of audio files, and while on Mac it seems to work just fine, on windows it crashes occasionally. It can happen after an hour or a day, but it crashes.
looking at the crash in the event viewer, the name of the module that generated the exception is unknown, the exception code is 0xc0000005.
putting a big number of System.DebugLog ( ) all around and looking at the execution with debugView, it seems to me that is not consistent the moment when the crash occurs.
looking around I have thinked too at some Data Execution Prevention problem, and I have also tried to select the executable on the exclusion list of DEP ( just to confirm or not the idea ), but for some reason the windows 7 system does not allow me to do this.
Which are the better strategies to look into this kind of problems when they occurs?
I have recently done some Windows updates and my problems have gone away. The interesting part is I just got information from a colleague of mine who was having problems. He did an update to Microsoft .NET and after that update, the program works fine.
I didn’t think that Xojo was dependent on .NET. Are there dlls that .Net might update that are part of Windows but not necessarily updated in normal Windows updates?