App Crashes when using Installer

Hey guys,

I just built a new version of one of my apps and built an installer MSI package for it using Advanced Installer. Any time I try to run the app installed by the MSI, I get a “This program has stopped working” crash. It’s a BEX error which is thrown then Data Execution Protection happens in Windows. I can’t run the app.

However, if I just take the compiled executable and run it, it works fine!

It’s only when I put it in the Installer.

One of the changes I added was creating a Mutex so that two instances of the app can’t run. I did it the same way I did in my other apps which work fine. But it seems like it might be hanging up on the Mutex - that’s my guess. Since the Mutex is a file, is there something the Installer is doing that is changing permissions on things?

I’m really stumped. I was about to send this out to some testers, but definitely not now!

The installer isn’t creating an icon with an incorrect working directory maybe?
Is your app is trying to write files in the same folder it is ‘working in’?

Is the installer including all the DLLs in the Lib folder and any files in the Resources folder?

[quote=201688:@Jeff Tullin]The installer isn’t creating an icon with an incorrect working directory maybe?
Is your app is trying to write files in the same folder it is ‘working in’?[/quote]

Nope. It is all pointing to the right spots. It had been working fine until I added this mutex check.

Yes. I’ve checked that too and checked the versions.

Have you done a file diff to see if all files are there and have the same size?

I just looked at file sizes just now. Everything is correct and the same.

I did notice that my resources folder in the app’s installed directory was missing some image files now that Xojo is putting those in the resources folder. So I added them. Still get the crash…

There’s something fundamentally wrong at some level with the app coming out of the installer. I put several System.DebugLog commands in the app to try to see where the crash is happening. The very first bit of code in the app.open event is a System.DebugLog call.

Doesn’t even get to that point. Crashes right away…

OK. Figured it out. Dumb mistake. The GUIKit.dll library file was missing from the build. Not sure how I missed that the first time or why it was not in there previously…