Hello list, I am trying to get Settlers 3(Siedler 3) working. This game crashes with a Integer divide by 0 exception very early.
Wine version: cvs from September 7. 2004 Settlers 3 version: 1.60 with WinXp-patch.
s3.exe produces a nice crash dump(attached errorlog.txt) and with a little debugging I found out that the crash occurs in RtlEnlargedUnsignedDivide(), file dlls/ntdll/large_int.c
This is what I think is going on: *)s3.exe calls SetWaitableTimer() in dlls/kernel/sync.c
*)NtSetTimer() in dlls/ntdll/sync.c is called, and this is where the problem beginns. NtSetTimer() calls NTDLL_get_server_timeout from time.c
*)The 2nd case occurs(the else if) and RtlEnlargedUnsignedDivide is called. The interesting thing is that TICKSPERSEC is a constant(10000000) and this shouldn't give a divide by zero. But RtlEnlargedUnsignedDivide takes an UINT as 2nd arguemt, and 10000000 is too big for an UINT.
For testing I enabled the C version of RtlEnlargedUnsignedDivide, and this time the exception didn't occur but wineserver blocked(kill -9 was necessary) The same thing happens if I move the divison to NTDLL_get_server_timeout(and do not call RtlEnlargedUnsignedDivide).
I commented the call to NTDLL_get_server_timeout, and s3.exe starts successfully, but I don't think that's the correct way to solve this problem.
I attached the output with normal debug options and a few TRACEs changed to ERRs. NTDLL_get_server_timeout is called quite often.
The SetWaitableTimer call: err:ntdll:SetWaitableTimer called err:ntdll:NtSetTimer (0xf4,0x46d32104,(nil),(nil),00000000,0x000001f4,(nil)) stub err:ntdll:NTDLL_get_server_timeout called err:ntdll:NTDLL_get_server_timeout called err:ntdll:NTDLL_get_server_timeout called ... fixme:dialog:MSGBOX_OnInit system modal msgbox ! Not modal yet. -- The crash message
err:ntdll:NTDLL_get_server_timeout called err:ntdll:NTDLL_get_server_timeout called
Greetings, Stefan Dösinger
My patch of yesterday addresses this problem. A fix should be committed shortly.
http://www.winehq.com/hypermail/wine-patches/2004/09/0098.html
Mike
Stefan Dösinger wrote:
Hello list, I am trying to get Settlers 3(Siedler 3) working. This game crashes with a Integer divide by 0 exception very early.
My patch of yesterday addresses this problem. A fix should be committed shortly.
http://www.winehq.com/hypermail/wine-patches/2004/09/0098.html
Yes, exactly the same issue. I'll watch the wine lists and wait for a bugfix.
I can start s3 with disabling the call to NTDLL_get_server_timeout. Now I've two other problems: *The image is placed slightly wrong *The mouse always moves back to the center of the screen.
Any ideas? I think I should ask this question on the wine-user list.
Cheers, Stefan
I can start s3 with disabling the call to NTDLL_get_server_timeout. Now I've two other problems: *The image is placed slightly wrong
This may be a DDraw issue... A WINEDEBUG=+ddraw log enclosed in a Bugzilla bug report would be nice.
*The mouse always moves back to the center of the screen.
And this is a DInput. Same as for the image problem but with a +dinput log. This may be another example of 'I grab the mouse in relative mode but I still query absolute coordinates via standard Win32 APIs' game. If it's the latter, the fix will be a bit hard to do :-)
As for the appropriate channels, I would agree that this is more for Bugzilla / #WineHQ or wine-users.
Lionel
This may be a DDraw issue... A WINEDEBUG=+ddraw log enclosed in a Bugzilla bug report would be nice.
It looks like wine draws the usual decorations around the game's window(Desktop mode).
*The mouse always moves back to the center of the screen.
And this is a DInput. Same as for the image problem but with a +dinput log. This may be another example of 'I grab the mouse in relative mode but I still query absolute coordinates via standard Win32 APIs' game. If it's the latter, the fix will be a bit hard to do :-)
The mouse warp goes mad. For testing, I removed the SetCursorPos in SysMouseAImpl_GetDeviceData and the mouse works normal.
Both problems are fixed in cvswinex, but cvswinex has another problem: I can start a game, sound works, I can move the map, but the game is just frozen. It's like a Multiplayer game where the connection to the server is lost.
I'll look at the debug logs and post it to Bugzilla
Stefan
Le jeu 09/09/2004 à 03:49, Stefan Dösinger a écrit :
This may be a DDraw issue... A WINEDEBUG=+ddraw log enclosed in a Bugzilla bug report would be nice.
It looks like wine draws the usual decorations around the game's window(Desktop mode).
Desktop mode puts all windows inside another one named the Desktop. If you're seeing "normal" Windows decoration around a window rather than your window manager's, it's the Managed option.
*The mouse always moves back to the center of the screen.
And this is a DInput. Same as for the image problem but with a +dinput log. This may be another example of 'I grab the mouse in relative mode but I still query absolute coordinates via standard Win32 APIs' game. If it's the latter, the fix will be a bit hard to do :-)
The mouse warp goes mad. For testing, I removed the SetCursorPos in SysMouseAImpl_GetDeviceData and the mouse works normal.
Both problems are fixed in cvswinex, but cvswinex has another problem: I can start a game, sound works, I can move the map, but the game is just frozen. It's like a Multiplayer game where the connection to the server is lost.
If the problem lies with WineX (now Cedega), cvs version or official releases, this is not the place to discuss it. Or were you pointing out differences between how Wine and WineX handled the same game?
Vincent