.exe only works in my computer


#1

Hi,

I have developed a demo project to test some Juce stuff (as draggable panels, timers, custom sliders, buttons with pictures and so on), but the compiled .exe (in debug folder) only works in my own computer (Lenovo laptop with Windows10), I have tried in a desktop PC with also win10 and a laptop with Win7 and windows can’t execute the program.
I have also tried to execute the .exe from the debug folder (just in case it had to access to some other files, altough all external data as png pictures are loaded from binary data). And I have also tried just by copying the .exe file to the desktop, with no more files.
When i execute my app.exe, windows show a message telling app.exe stopped working.

I have other juce projects that work in other computers, it only happens to me with this one, but I can’t find out if it is due to a specific component or what.

Any idea? did it happen to anyone else?any advise??

BR and thanks in advance.


#2

If you’re going to distribute your executable to others you should build a release version.

What error message do you see?

Some things to check:

Have you linked dynamically with the C++ runtime? This will require other people to install the runtime before they use your application. See the following two threads:


Are you building the correct architecture (32 bit vs 64 bit) for other people’s computers?


#3

Hi, thanks for your answer
It is just a standalone app with no DLLs.
Windows says, app.exe stopped working, and it only opens a white window. So it seems it tries to open the app but suddenly crashes and stops.
There is anyway to debug that?
I only can think of disabling components one by one in the project but it will be labourious ;(


#4

Does the JUCE demo work on the other computers? There’s a lot of functionality in there, so if you can run this (release, static runtime, correct architecture) on your other computers then it’s likely to be a specific problem with your app rather than with a JUCE component. In that case there are a few things to try:

However, I think you’ll probably have to iteratively strip back your app to find what’s causing the problem.


#5

Hi, thanks for your answer;

I have tried processexplorer and it shows the following fault "WerFault"
C:\WINDOWS\SysWoW64\WerFault.exe -u -p 9156 -s 1092

It seems that it is a high CPU consumption, or posible virus, or some…

But I don’t understand why it works in my computer and it doesn’t in others…maybe because it compiled the project?


#6

I’m not sure what you mean - WerFault.exe is a separate application that reports program errors, so I’m not sure it has anything to do with your application other than the fact it detected an error.

Yes. When you compile a project you pull system libraries and DLLs into the executable. If these libraries and DLLs are not present on a different computer then the executable will fail to run. Hence my insistence that you do a release build (debug libraries and DLLs are not distributed with a standard Windows installation) and select the static C++ runtime (this puts the required C++ runtime library into your executable, so it’s not required on other computers). The problem could be something similar.

Have you tried this with your app and the JUCE demo app?


#7

it really makes sense ;D, thanks!!
I will try as soon as possible and will let you know!!
BR


#8

Sometimes your software uses implicitly DLLs, either runtimes or needed by your framework. To find out which there is a very handy tool, called Dependency Walker. It lists required DLLs like ldd does on Unix/Linux does or otool on Mac OSX.


Plugin failing to scan in Ableton on Windows