"NtRaiseException Exception frame is not in stack limits": what does it mean? How to solve it?

Questions about Wine on Linux
Locked
GGaaa
Level 1
Level 1
Posts: 8
Joined: Sat Jul 08, 2023 8:50 am

"NtRaiseException Exception frame is not in stack limits": what does it mean? How to solve it?

Post by GGaaa »

Hello,
I'm new in this forum, I hope I'm writing this message correctly and in the right place.

I installed wine to try and play a Windows game on my Debian (GNU/linux) OS, but (guess what?) I'm not able...

The game is "Age of Forgotten Empires": it should work according to "appDB", but I know there are several version of this game (mine is an .exe file that is copied in the Age of Empires directory after installing the Microsoft game - it used to work on Windows XP and 7).
When trying to launch it with wine, just after displaying a sort of "splash screen", it stops and gives this error:

Code: Select all

0024:err:seh:NtRaiseException Exception frame is not in stack limits => unable to dispatch exception.
I searched for this error message in this forum, and found it in two topics (1,2), but it's mixed with other error messages and I wasn't able to understand anything.

Could someone please explain what the problem is, and how to solve it?
Thanks in advance.

I add some further information that may be useful to understand... (or maybe not?)

1) Before, I had two error messages:

Code: Select all

0024:err:dmloader:IDirectMusicLoaderImpl_SetObject : could not attach stream to file L"C:\\windows\\system32\\drivers\\gm.dls", make sure it exists
0024:err:seh:NtRaiseException Exception frame is not in stack limits => unable to dispatch exception.
I copied "gm.dls" from a Windows 7 installation in "~/.wine32/drive_c/windows/system32/drivers" and (apparently?) solved the first error. Or did I mess up the things worse?

2) It's a 32bit game, but I have a 64bit PC with 64bit Linux installed.
The first time I didn't know about "prefixes", and so (as far as I understand) I was trying to run it in a 64bit prefix.
I copied "gm.dls" in "~/.wine/drive_c/windows/system32/drivers" (please note the only difference: ".wine" without "32"), but it had no effect.
I noticed that winefile (64bit) doesn't see a "drivers" directory inside "windows\system32", despite the existence of "~/.wine/drive_c/windows/system32/drivers". And, by the way, it's not the only directory that winefile (and, I suppose, also wine) isn't aware of. Is it another problem that I should try to fix before?

3) Wine version: it's

Code: Select all

wine-8.0 (Debian 8.0~repack-4)
.
I know it's not the latest one existing: it's what Debian has put in it's stable packages, and I wouldn't try to break or bypass Debian's package management system, unless it's a known bug in this particular revision and known to be solved in the latest release.
By the way, i think that 8.0 shouldn't be sooo outdated, should it?
jkfloris
Level 12
Level 12
Posts: 3201
Joined: Thu Aug 14, 2014 10:10 am

Re: "NtRaiseException Exception frame is not in stack limits": what does it mean? How to solve it?

Post by jkfloris »

I copied "gm.dls" from a Windows 7 installation in "~/.wine32/drive_c/windows/system32/drivers" and (apparently?) solved the first error. Or did I mess up the things worse?
An easy way to install missing files (or programs) is to use Winetricks:

Code: Select all

sudo apt install winetricks
winetricks gmdls
The default wineprefix is the ~/.wine folder. If you want to use a different one, you must use the WINEPREFIX variable.
GGaaa
Level 1
Level 1
Posts: 8
Joined: Sat Jul 08, 2023 8:50 am

Re: "NtRaiseException Exception frame is not in stack limits": what does it mean? How to solve it?

Post by GGaaa »

Thanks a lot for your answer.
Are you implying that copying the file from the Windows installation was a wrong move?
Or is it just an alternative way (I didn't know about)?
I mean: would you suggest to delete the gm.dls from Windows 7 and copy another one via winetricks?

And... about the "NtRaiseException Exception frame is not in stack limits"?
Any idea about its meaning or the solution?
Last edited by GGaaa on Thu Jul 13, 2023 12:10 pm, edited 1 time in total.
jkfloris
Level 12
Level 12
Posts: 3201
Joined: Thu Aug 14, 2014 10:10 am

Re: "NtRaiseException Exception frame is not in stack limits": what does it mean? How to solve it?

Post by jkfloris »

You can copy some DLL files from Windows 7 to Wine, but you have to be careful that the right version ends up in the right directory (32bit files belong in syswow64 and 64bit in system32). Also, some DLL files need to be registered. Winetricks will do this for you automatically.
If you use winetricks gmdls, it will replace your old gm.dls file and you know the correct version is in the right directory.
And... about the "NtRaiseException Exception frame is not in stack limits"?
Any idea about its meaning or the solution?
Maybe, if you post the full output.
GGaaa
Level 1
Level 1
Posts: 8
Joined: Sat Jul 08, 2023 8:50 am

Re: "NtRaiseException Exception frame is not in stack limits": what does it mean? How to solve it?

Post by GGaaa »

Thanks again for answering.
So, I'm going to try with "winetricks" now.
jkfloris wrote: Fri Jul 14, 2023 4:40 amMaybe, if you post the full output.
It's not much more than I already pasted.
However, here it is:

Full output trying to run the program with "winefile":

Code: Select all

xx@yy:~$ WINEPREFIX=~/.wine32 winefile &
[1] 11380
xx@yy:~$ wine: Read access denied for device L"\\??\\F:\\", FS volume label and serial are not available.
wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available.
0120:err:seh:NtRaiseException Exception frame is not in stack limits => unable to dispatch exception.
0140:err:seh:NtRaiseException Exception frame is not in stack limits => unable to dispatch exception.
0160:err:seh:NtRaiseException Exception frame is not in stack limits => unable to dispatch exception.
0180:err:seh:NtRaiseException Exception frame is not in stack limits => unable to dispatch exception.
01a0:err:seh:NtRaiseException Exception frame is not in stack limits => unable to dispatch exception.
The two "read access" errors appear immediately after launching winefile.
And, sometimes, one more appears.
Nevertheless, winefile runs, the "Z:" drive is read, and I can run other windows .exe files form Z: , so my impression is like that it's not really a problem I should worry about (am I wrong? I'm not the expert, here...)
The other error (the one about NtRaiseException etc.) arrives when I try to run AoFE_Launcher.exe, just after a quick appearance of a splash screen, as I wrote in the first post.
In the example here above, I "ran" it five times, each time the same* error appeared.
(* same except the number at the start of the line)

Full output trying to run the program "directly" with "wine": only the error message already reported...

Code: Select all

xx@yy:~$ WINEPREFIX=~/.wine32 wine .wine32/drive_c/Program\ Files/Microsoft\ Games/Age\ of\ Empires\ II/AoFE_Launcher.exe 
0024:err:seh:NtRaiseException Exception frame is not in stack limits => unable to dispatch exception.
xx@yy:~$ 
Are there useful options that I could use to obtain a more detailed output?
GGaaa
Level 1
Level 1
Posts: 8
Joined: Sat Jul 08, 2023 8:50 am

Re: "NtRaiseException Exception frame is not in stack limits": what does it mean? How to solve it?

Post by GGaaa »

jkfloris wrote: Fri Jul 14, 2023 4:40 amIf you use winetricks gmdls, it will replace your old gm.dls file and you know the correct version is in the right directory.
Just done so:

Code: Select all

WINEPREFIX=~/.wine32  winetricks gmdls
but it didn't work: the program terminates at the same point, outputting the same error message.
jkfloris
Level 12
Level 12
Posts: 3201
Joined: Thu Aug 14, 2014 10:10 am

Re: "NtRaiseException Exception frame is not in stack limits": what does it mean? How to solve it?

Post by jkfloris »

You can ignore the message "FS volume label and serial are not available". It just means that Wine cannot write a name to this "drive". This is normal for Z: (the / directory) and for removable media.

We may be able to find out what is going wrong if you run the game with the WINEDEBUG=fixme+all variable.

Code: Select all

WINEPREFIX=~/.wine32 WINEDEBUG=fixme+all wine start /unix "$HOME/.wine32/drive_c/Program Files/Microsoft Games/Age of Empires II/AoFE_Launcher.exe"
GGaaa
Level 1
Level 1
Posts: 8
Joined: Sat Jul 08, 2023 8:50 am

Re: "NtRaiseException Exception frame is not in stack limits": what does it mean? How to solve it?

Post by GGaaa »

I gave this command after a

Code: Select all

WINEPREFIX=~/.wine32  winetricks gmdls
(about which I wrote in a previous post, that was unfortunately not yet approved when I saw your reply to the previous² one).
((The "gm.dls" copied by winetricks is exactly identical to the one i had copied from Windows, but It looks like winetricks also extracted some other file somewhere - anyways, the result didn't change)).

And now there is a lot of output: I'm pasting it.

Code: Select all

xx@yy:~$ WINEPREFIX=~/.wine32 WINEDEBUG=fixme+all wine start /unix "$HOME/.wine32/drive_c/Program Files/Microsoft Games/Age of Empires II/AoFE_Launcher.exe"
007c:fixme:wineusb:query_id Unhandled ID query type 0x5.
007c:fixme:wineusb:query_id Unhandled ID query type 0x5.
007c:fixme:wineusb:query_id Unhandled ID query type 0x5.
007c:fixme:wineusb:query_id Unhandled ID query type 0x5.
007c:fixme:wineusb:query_id Unhandled ID query type 0x5.
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
xx@yy:~$ 00dc:fixme:imm:ImeSetActiveContext (0001007A, 1): stub
00dc:fixme:imm:ImmReleaseContext (00010090, 0001007A): stub
008c:fixme:imm:ImeSetActiveContext (0001002C, 0): stub
008c:fixme:imm:ImmReleaseContext (00010020, 0001002C): stub
00dc:fixme:dmime:IDirectMusicPerformance8Impl_CreateStandardAudioPath (00C23748)->(8, 64, 0, 00C2379C): semi-stub
00dc:fixme:dmusic:synth_port_Activate (00C26838/00C26838)->(1): semi-stub
00dc:fixme:dmime:IDirectMusicAudioPathImpl_Activate (00C27CA8, 0): semi-stub
00dc:fixme:dmime:IDirectMusicPerformance8Impl_CreateStandardAudioPath (00C23748)->(8, 64, -1, 053F4354): semi-stub
00dc:fixme:dmusic:synth_port_Activate (00C28158/00C28158)->(1): semi-stub
00dc:fixme:dmime:IDirectMusicAudioPathImpl_Activate (00C28CB0, -1): semi-stub
00dc:fixme:dmime:seg_IPersistStream_Load WAVE form loading not implemented
00dc:fixme:dmime:IDirectMusicSegment8Impl_SetParam (00C29068, GUID_IgnoreBankSelectForGM, 0xffffffff, 0, 0, 00000000): stub
00dc:fixme:dmime:IDirectMusicSegment8Impl_Download (00C29068, 00C23748): stub
00dc:fixme:dmime:IDirectMusicAudioPathImpl_SetVolume (00C28CB0, 0, 0): stub
00dc:fixme:dmime:IDirectMusicAudioPathImpl_GetObjectInPath (00C28CB0, -5, 24576, 0, {00000000-0000-0000-0000-000000000000}, 0, {6825a449-7524-4d82-920f-50e36ab3ab1e}, 00ACFBB0): stub
00dc:fixme:dmime:IDirectMusicPerformance8Impl_CreateStandardAudioPath (00C23748)->(8, 64, -1, 041EFC88): semi-stub
00dc:fixme:dmusic:synth_port_Activate (00C29798/00C29798)->(1): semi-stub
00dc:fixme:dmime:IDirectMusicAudioPathImpl_Activate (00C2A2B0, -1): semi-stub
00dc:fixme:dmime:seg_IPersistStream_Load WAVE form loading not implemented
00dc:fixme:dmime:IDirectMusicSegment8Impl_SetParam (00C2A668, GUID_IgnoreBankSelectForGM, 0xffffffff, 0, 0, 00000000): stub
00dc:fixme:dmime:IDirectMusicSegment8Impl_Download (00C2A668, 00C23748): stub
00dc:fixme:dmime:IDirectMusicAudioPathImpl_SetVolume (00C2A2B0, 0, 0): stub
00dc:fixme:dmime:IDirectMusicAudioPathImpl_GetObjectInPath (00C2A2B0, -5, 24576, 0, {00000000-0000-0000-0000-000000000000}, 0, {6825a449-7524-4d82-920f-50e36ab3ab1e}, 00ACFBB0): stub
00dc:fixme:dwmapi:DwmEnableMMCSS (1) stub
00dc:err:seh:NtRaiseException Exception frame is not in stack limits => unable to dispatch exception.
I'm not able to understand all of that, but it looks like a lot of messages are related to DirectMusic.
(Also gm.dls is related to music, as far as I understood).
For me, it would be great to have this old game running, even without any music at all...
Do you see any possible fix?

Thank you again, and thanks in advance for any useful suggestion
jkfloris
Level 12
Level 12
Posts: 3201
Joined: Thu Aug 14, 2014 10:10 am

Re: "NtRaiseException Exception frame is not in stack limits": what does it mean? How to solve it?

Post by jkfloris »

If I understand correctly, "AoFE_Launcher.exe" is just the setup program. It doesn't crash on my system (same directsound fixme messages), but it doesn't do anything either.
There is also a manual way to install the Forgotten Empires expansion that seems to work.
GGaaa
Level 1
Level 1
Posts: 8
Joined: Sat Jul 08, 2023 8:50 am

Re: "NtRaiseException Exception frame is not in stack limits": what does it mean? How to solve it?

Post by GGaaa »

Well, you are right.
As far as I remember, "AoFE_Launcher.exe" gave both the options to setup and to run the game.
However I have just made the manual installation.
Then, I try to run the program, with the options (WINEDEBUG) that you suggested, and that's the outcome:

Code: Select all

xx@yy:~$ WINEPREFIX=~/.wine32 WINEDEBUG=fixme+all wine start /unix "$HOME/.wine32/drive_c/Program Files/Microsoft Games/Age of Empires II/Age2_x1/age2_x2.exe"
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:wineusb:query_id Unhandled ID query type 0x5.
0084:fixme:wineusb:query_id Unhandled ID query type 0x5.
0084:fixme:wineusb:query_id Unhandled ID query type 0x5.
0084:fixme:wineusb:query_id Unhandled ID query type 0x5.
0084:fixme:wineusb:query_id Unhandled ID query type 0x5.
xx@yy:~$ 
... and the program terminates immediately - or should I say "doesn't start at all"?

I don't understand what I'm doing wrong...
:-(
GGaaa
Level 1
Level 1
Posts: 8
Joined: Sat Jul 08, 2023 8:50 am

Re: "NtRaiseException Exception frame is not in stack limits": what does it mean? How to solve it?

Post by GGaaa »

Also a trial with "winefile":

Code: Select all

xx@yy:~$ WINEPREFIX=~/.wine32 WINEDEBUG=fixme+all winefile
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:wineusb:query_id Unhandled ID query type 0x5.
0084:fixme:wineusb:query_id Unhandled ID query type 0x5.
0084:fixme:wineusb:query_id Unhandled ID query type 0x5.
0084:fixme:wineusb:query_id Unhandled ID query type 0x5.
0084:fixme:wineusb:query_id Unhandled ID query type 0x5.
0050:fixme:imm:ImeSetActiveContext (00010026, 0): stub
0050:fixme:imm:ImmReleaseContext (00010020, 00010026): stub
0108:fixme:imm:ImeSetActiveContext (00010058, 1): stub
0108:fixme:imm:ImmReleaseContext (00010068, 00010058): stub
wine: Read access denied for device L"\\??\\F:\\", FS volume label and serial are not available.
wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available.
wine: Read access denied for device L"\\??\\F:\\", FS volume label and serial are not available.
wine: Read access denied for device L"\\??\\Z:\\", FS volume label and serial are not available.
So, all the error messages of the "direct" trial are there (with a lot of other ones), but they seem not to be too "fatal" errors, because I obtain a regularly working winefile window.

I select and double-click the file (age2_x2.exe)...
Effects:

1) The following other error messages on the console

Code: Select all

0108:fixme:exec:SHELL_execute flags ignored: 0x00000004
wine: Unhandled page fault on read access to 9DFB3019 at address 7BC57B00 (thread 0110), starting debugger...
0120:fixme:imm:ImeSetActiveContext (00010142, 1): stub
0120:fixme:imm:ImmReleaseContext (0002013A, 00010142): stub
0118:fixme:imm:ImeSetActiveContext (00010162, 1): stub
0118:fixme:imm:ImmReleaseContext (0001016C, 00010162): stub
2) A "Wine Debugger" window (completely black, except title bar and "decorations")

3) Another Window, written in Italian: the title means "Program Error", and the text says "sorry, but the program has made some error and thus it's been closed..."
I can click a "show details" button: so this window becomes a "Details of program error" window, that says to be loading some details. But the time flows and nothing actually seems to happen, except that further messages appear in the console:

Code: Select all

0124:err:sync:RtlpWaitForCriticalSection section 7BC6A440 "dlls/ntdll/loader.c: loader_section" wait timed out in thread 0124, blocked by 0110, retrying (60 sec)
0124:err:sync:RtlpWaitForCriticalSection section 7BC6A440 "dlls/ntdll/loader.c: loader_section" wait timed out in thread 0124, blocked by 0110, retrying (60 sec)
0124:err:sync:RtlpWaitForCriticalSection section 7BC6A440 "dlls/ntdll/loader.c: loader_section" wait timed out in thread 0124, blocked by 0110, retrying (60 sec)
...and so on (a new line every minute).
(The "Wine Debugger" windows stays always black)

The question is: Does any of that seem to make any sense?!?
jkfloris
Level 12
Level 12
Posts: 3201
Joined: Thu Aug 14, 2014 10:10 am

Re: "NtRaiseException Exception frame is not in stack limits": what does it mean? How to solve it?

Post by jkfloris »

Unfortunately, it is not clear from the terminal output what is going wrong.
What you can try is:
- Change the Windows version to Windows XP
- Emulate a virtual desktop
- Rename the "Avi" folder in "Program Files/Microsoft Games/Age of Empires II" to "Avi.bak".
GGaaa
Level 1
Level 1
Posts: 8
Joined: Sat Jul 08, 2023 8:50 am

Re: "NtRaiseException Exception frame is not in stack limits": what does it mean? How to solve it?

Post by GGaaa »

None of those was successful.

Anyway, thank you so much for trying to help me.
I really appreciate the time you spent.

:-)
jkfloris
Level 12
Level 12
Posts: 3201
Joined: Thu Aug 14, 2014 10:10 am

Re: "NtRaiseException Exception frame is not in stack limits": what does it mean? How to solve it?

Post by jkfloris »

You may want to try to use the Wine packages from WineHQ.

You can install it alongside the Debian Wine version.
If you want to do this, follow the wiki instructions,
but install the wine-stable package instead of winehq-stable.

Code: Select all

sudo apt install --install-recommends wine-stable
And run the game with:

Code: Select all

cd "$HOME/.wine32/drive_c/Program Files/Microsoft Games/Age of Empires II/Age2_x1/"
WINEPREFIX=~/.wine32 /opt/wine-stable/bin/wine age2_x2.exe
GGaaa
Level 1
Level 1
Posts: 8
Joined: Sat Jul 08, 2023 8:50 am

Re: "NtRaiseException Exception frame is not in stack limits": what does it mean? How to solve it?

Post by GGaaa »

Thanks again - but, again, no luck.

I think I'll install Windows...
:-S
Locked