"dmegine.exe has stopped working" for building on a specific computer (Solved)

So I was making my stuff in Defold (installed on a USB) on my gaming PC and, out of the blue, I was faced with the error “dmegine.exe has stopped working” when I went to build my project! I know it’s not a problem with the project because building and launching the exact same project on my Windows tablet works just fine, and trying to build a previously working project on my PC gives me the same problem!

I’ve searched far and wide for someone having the same problem on these forums, and I found one thread which suggested the OP downloads a program called Dependency Walker. I did that, and ran the program, and there’s a huge list of missing DLLs in the bottom. Most of them (i.e. the ones starting with API-MS or EXT-MS) are false positives, as explained by a StackOverflow thread, but I found a couple that seem to be legitimate, such as EFSCORE.dll and EMCLIENT.dll

I’ve already tried reinstalling Defold, restarting my computer, and allowing all the Defold-related programs on the firewall. None of these remedied my issue. What’s worse, the editor console shows absolutely nothing when this happens!

It’s also worth noting that building to HTML works fine on the PC that has this issue.

Would you mind checking the info in this post: Dmengine.exe has stopped working. Exception code: c0000005 Specifically to see if there is a crash report. Also, maybe try an older Defold version as @Mathias_Westerdahl suggests in that post?

There is a crash report, though I didn’t share it because it didn’t seem to help the person in that thread. I’ll include it now.

_crash.zip (1009 Bytes)

I also tried using the Defold Editor 2 pre-release and the same problem occurred. I’ll try an older version of Defold now.

I think it’s worth noting that when I ran Defold on the tablet and it worked, I was using the SAME USB drive on which Defold is installed. Additionally, I’ve used Defold on this PC before without any problems. It seems to me that Defold is corrupting itself on the computer somehow, and in a fashion that persists on different versions of Defold, since using Editor 2 didn’t solve the problem. Running as an administrator doesn’t solve the problem, either.

If you know every location that Defold writes anything at all to, let me know and I’ll try backing up that info and deleting it, thus creating a clean install of Defold.

I’ll post more here when I try an older version of Defold.

I tried using Defold 1.2.94 and the same thing happened…

Something that might help: when I go to the location of the built file and run dmengine_release.exe instead of dmengine.exe, it doesn’t crash, but I get stuck at a screen that says “Waiting for connection…” Also, there’s a second window that opens, and it’s a blank cmd prompt that I can’t type in. Running it as an administrator yields the same results.

Upon googling the “Waiting for connection…” it seems that it’s because the editor isn’t communicating with it, which makes sense since I’m manually running it. I’m gonna try swapping the names of the two programs and then building and seeing if it does anything.

Doing that works! Swapping the names works!

Hi @joseph.fasulo!

Would you mind posting the result from the dependency walker, for dmengine.exe?
Also, in the “Waiting for connection…” screen, what version does it say it is?

Sorry for the late response, I found a workaround for the issue (described above) so I didn’t think to check back here. Here’s the dependency walker results (just be wary that I’m running Windows 10, which DW has some known issues with):

dmengine_release.zip (985.8 KB)

It’s called dmengine_release because my workaround was to swap the names of dmengine.exe and dmengine_release.exe, so the current dmengine_release.exe was the original dmengine.exe.

On the “Waiting for connection…” screen, it says the version is 1.2.100

Additional note: I tried swapping the names back to how they were originally and magically, it’s working again. I haven’t taken any steps to try to resolve this issue ever since I swapped the .exe names, it seems to just have fixed itself over time while I had the names swapped. I wonder if swapping the names once was enough to fix it, and I just didn’t realize it? This also probably means that the DW report above won’t be much help… sorry if that’s the case.

1 Like

Well, since you see version 1.2.100 which was released only 4 days ago and this thread is older than that, I think you solved it by updating again :slight_smile:

Thx for the dependency walker info. I’ll have a look at it on monday when I have access to a windows installation.

1 Like

The problem has not only returned but worsened… when I swapped the names of dmengine and dmengine_release to fix it, the in-editor console no longer displays anything when I build or use print statements. I’ve even tried deleting the Defold/unpack/(version hash) folder and restarting Defold, but the same thing still happens. I don’t think the new version of Defold fixes the issue, but something between using the old version and updating to the new version temporarily fixes it.

I’ve been using Defold Editor v2, but the problem persists whether I use v2 or the stable version.

The release version of dmgengine and bundles made with the release checkbox ticked do not print anything to the console so this is the expected behaviour.

Unfortunately, I haven’t found any good clues yet.

One question though, the dependency walker report says that the “dmengine_release.exe” is 64 bit. Did you copy the engine from the 64 bit folder? And, if so, did you copy the .dll’s too to make it work?

EDIT: Just realized I referred to my USB flash drive as simply “USB”, my bad. Sorry if that caused any confusion. It’s fixed now.

Sorry for the late response. I have the 64-bit version of Defold Editor v2 installed, so I guess it’s just running the 64-bit build when I build. I didn’t take any specific steps to get it to be 64-bit other than selecting the 64-bit version when I went to download Defold Editor v2. Even so, I don’t think the .dll’s would be part of the problem, because dmengine_release.exe (the real one, not dmegine.exe with its name switched) works fine, it’s just dmengine.exe that breaks. (Remember, dependency walker says “dmengine_release.exe” because I switched the names of the files as a temporary fix)

I’ll try to help you help me by providing some details that I think might help.

I have Defold installed on a USB flash drive, and I’ve been using that same USB flash drive on two devices - my PC, which is where I’ve been having the problems, and my Windows Surface 2, which hasn’t ever had any problems. The user account I use to run Defold on my PC does not have administrator privileges, but whenever a UAC pops up, I use the username and password of another account on the PC that does have administrator privileges. The user account I use to run Defold on my Surface does have administrator privileges. Both my PC and my tablet are running 64-bit Windows 10 (the same build, too). EDIT: I’ve also tried running Defold on the account with administrator privileges on my PC, but that did not solve the problem.

When Defold says there is an update, I update it on whatever device I had Defold running on at the moment. So, there’s been times where I updated Defold on the tablet, and times where I updated Defold on the PC. Since Defold is installed on the USB flash drive, I don’t get the chance to go through the update process on the other device when I update it on one of them. I didn’t think this would matter, since Defold is installed on the USB flash drive, but if the update process changes anything in any location not stored on the USB flash drive, this might have something to do with the issue. However, I would expect this to mean that both devices would be able to have this issue, but my tablet has never had this issue. It’s still possible but unlikely in my opinion.

1 Like

The new update seems to have fixed it again for now. I’ll let you know if it breaks again. (At this point, I honestly am expecting it to, since updates have fixed it only temporarily before)

2 Likes

Great to hear that you’re able to work again, but rather frustrating that we haven’t managed to pin-point the reason for the issue in the first place.

I’m assuming you are using Editor 2 then? It uses the alpha version of the engine, and we are indeed in the works of releasing a fix for this issue in the stable release (coming next week)

4 Likes

That’s great to hear! Yes, I’m using Editor 2, and I haven’t had the problem ever since the recent update, so I guess you fixed it! I find it kinda impressive that you were able to fix it with relatively little information. Thanks for all the help! If you don’t mind me asking, what was causing the issue?

1 Like

We were fortunate to have info from several people, and a friend of ours could test some test builds with better debug info (which is coming soon too). Thanks all!

It was an unhandled issue with network interfaces that didn’t support unicast addresses.

2 Likes