Crash on startup on Windows

I am experiencing crashes on startup with one of my apps under Windows 7 (running under Parallels), and seem to be out of ideas on how to tackle this one. Maybe one of you guys has an idea of what might be going on or where to look.

Here are the facts:

  1. put msgbox(“Hi Max”) in the 1st line of the app.open event - don’t see that when I run the app (just the “Contact King has stopped working” message by Windows)
  2. Even versions that did run before on this very machine don’t run anymore
  3. If I remote debug from Mac OS the app runs just fine!
  4. All other apps I compile run just fine, just this one doesn’t.
  5. I put system.debuglog(error.message) and msgbox(error.message) in app.UnhandledException-event - to no avail, I don’t see any of this
  6. I also launched debugView on that machine, but it wouldn’t display anything. Maybe I’m not using it correctly though…

So what magic is the IDE applying to make remote debug builds immune to those crashes? Any pointers ? I assume it is only a problem on my machine.
If you are interested, you can download the app here: http://contactking.de/downloads/contactking-setup.exe

Starts okay here on W7.

Have you tried to add logging statements for the complete opening sequence?

App Constructor comes before app.open

As well as loading plugins.

Any crash log?

Thanks for testing! If I put system.debuglog(“some message”), where would I find it? I was hoping it would show up in DebugView.

Yeah, but I am not using an app.constructor.

But I can’t intercept this, can I?

Just this:

Problem signature:
Problem Event Name: APPCRASH
Application Name: Contact King.exe
Application Version: 6.0.4.3
Application Timestamp: 56711ed5
Fault Module Name: StackHash_86b3
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 00000000
Exception Code: 00000000
Exception Offset: 00000000
OS Version: 6.1.7601.2.1.0.768.3
Locale ID: 1031
Additional Information 1: 86b3
Additional Information 2: 86b3ba1c75bbb8d10eac6299abcb9539
Additional Information 3: 4a91
Additional Information 4: 4a917263adebcf98a98a617777164973

Read our privacy statement online:
http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt

Thanks!

Are the DLLs correctly located in the same folder as the app?

[quote=242345:@Christian Schmitz]App Constructor comes before app.open

As well as loading plugins.

Any crash log?[/quote]

Plugins are loaded before the app constructor.

Just a “shot in the blue” (as we german say…), is App really named App in the IDE?

Yes. As mentioned, all versions of the app don’t launch anymore on this particular machine. Unless I start it as a remote debug build, which makes the whole issue so mysterious.

Yes, it is.

[quote]Plugins are loaded before the app constructor.[/quote] Well, if it was some plugin loading issue, why then would remote debug builds run whereas normal win32 builds (and win64 builds for that matter, just tested that) wouldn’t?

Some kind of Firewall, Anti-Virus, or… blocking?

I just have, I put System.DebugLog(“hello”) as the first line in app.open, but it wouldn’t show up in debugView. I also verified that debugView does display those messages just fine by building a new app that just had this one line in app.open.

If it’s really happening only on this specific machine, maybe use System Restore to go back to a place in time when it worked? Maybe it’s just the OS making trouble?

I think I may have run into something similar.

What I encountered:
Some event is occurring before app.open. (It shouldnt)
The event that is being exceuted relies on a variable that is initialised in app.open.
But app.open has not fired, and so you get a nil object exception.

Perhaps OpenDocument is firing first?

[quote]Perhaps OpenDocument is firing first?[/quote] No OpenDocument event…
And if I got a nil object exception I’d end up in the app.unhandledException event which I am monitoring closely already.

Also I am having trouble in believing in a firewall or other OS issue here as the debug builds are running nicely. What bugs me is that Windows is so secretive about why it wouldn’t launch the app.

Seems pretty strange. Some other things to try:

  • A different user account
  • Maybe the DebugView utility can show more information
  • Maybe a crash dump has more info

See Creating Crash Dumps on Windows.

DebugView should at least tell if the app has been launched.

I would try placing a debuglog in constructor as well.

Thanks for those ideas, I am desperate enough to try an upgrade to Windows 10. Will report back once that succeeded or failed.

[quote]Problem Event Name: APPCRASH
Application Name: Contact King.exe
Application Version: 6.0.4.3
Application Timestamp: 56711ed5
Fault Module Name: StackHash_86b3[/quote]

While Contact King.exe crashed, the crash is actually caused by “Fault Module Name” which then is “StackHash_86b3”. This is normally a file name, like a DLL or something but in this case is not. I did a search for StackHash and it seems most of the time this StackHash fault is due to DEP.

Okay I read more and also getting the StackHash fault may be a video card driver issue.

Thanks for looking into this again. I submitted the project in a (private) feedback case, but Robin at Xojo was unable to reproduce any of my problems, so I shrugged my shoulders, installed Win 10 (where the app runs fine) and moved on. Probably my win7 installation is somehow hosed.

What case number was this?

42415 . You may have to ask Robin for the project, as I didn’t attach it to the feedback case (too large).