View Issue Details

IDProjectCategoryView StatusLast Update
0000635Other Unix PortBugpublic2020-08-24 12:37
Reporterajunra Assigned Topsmedley  
PriorityhighSeveritycrashReproducibilityalways
Status closedResolutionfixed 
PlatformIBM Thinkpad T43OSeCSOS Version2.1
Summary0000635: openTTD crashes after some minutes gameplay
DescriptionopenTransportTycooDeluxe crashes after some minutes, indifferently whether one plays or not. Error message:
Killed by SIGSEGV
pid=0x008f ppid=0x0084 tid=0x0006 slot=0x00bf pri=0x0200 mc=0x0001
E:\PROGRAMME\OPENTTD140\OPENTTD.EXE
GCC473 0:000000e3
cs:eip=005b:1e0800e3 ss:esp=0053:0e527efc ebp=00e00204
 ds=0053 es=0053 fs=150b gs=0000 efl=00010202
eax=0001902c ebx=00020000 ecx=0e51ff08 edx=01c30740 edi=01c28060 esi=00000000

I am using gcc473.dll (20140205/26987bytes) from netlabs, SDL-1.2.15-20140930, and the in the readme called libc-0.6.5-csd5 (OK, *.wpi instead of *.zip).

It crashes the game only, not the system.
Steps To ReproduceStart the game and wait some (on me <2) minutes. Or play. Same result.
TagsNo tags attached.

Activities

ajunra

2014-11-22 07:31

reporter   ~0002916

The Game is playable without saving. I.e. when I turn autosave=off then i can play without crash. But when i save the game (also manually), then it crash. The error seems to be in the save-routine.

ajunra

2014-12-10 11:29

reporter   ~0002918

Saving a self made scenario works in first tests. Network also works fine.

psmedley

2014-12-14 14:22

administrator   ~0002919

building 1.4.4 now, will try saving...

psmedley

2014-12-14 14:33

administrator   ~0002920

1.4.4 crashes when saving a game too - looking into it

Steven Levine

2014-12-16 20:11

manager   ~0002922

In case it helps, the exception is in alloca which allocates variable sized buffers on the stack. In effect, you have stack overflow in a secondary thread (tid 6).

In alloca, ecx is the touch pointer and eax is the loop counter. Given the size of eax, I suspect that the code attempted to allocate something like 128K on the stack and thread stack is smaller.

psmedley

2014-12-16 21:06

administrator   ~0002923

Thanks for the tip. I tried already to bump the executable stack size, I'll take a look at thread stack size tomorrow.

psmedley

2014-12-16 21:19

administrator   ~0002924

hmmm from thread_os2.cpp:
thread = _beginthread(stThreadProc, NULL, 32768, this);

psmedley

2014-12-16 21:29

administrator   ~0002925

rebuilt with pthreads rather than os2 thread code. Now doesn't crash when saving :)

http://smedley.id.au/tmp/openttd-1.4.4-os2-20141216.zip

ajunra

2014-12-17 12:49

reporter   ~0002926

Last edited: 2014-12-17 12:51

Thank you for care about openTTD! You are right, the problem with saving seems to be resolved!
But now the the game is not playable because the mouse-pointer jumps over the screen. The intro-screen which shows a huge busy city is slow down and juddery. This was fluently in Version 1.4.0. I have besides noticed that the CPU-workload in this version are slower (99% in 1.4.0 / 95% changeable in 1.4.4) and that i can't start the game (1.4.4) while Firefox is running. That operated with 1.4.0 (My Test-machine: IBM T43, 1GB RAM, 2 GHz, Ati X300, eCS 2.1). If it helps you, i will send little movies from the screen.

psmedley

2014-12-17 13:02

administrator   ~0002927

Please try with http://smedley.id.au/tmp/openttd-1.4.4-os2-20141217.zip

This one uses the OS/2 threading code with an increased threadstack size.

ajunra

2014-12-17 13:50

reporter   ~0002928

The last zip-File doesnt contain a openttd.exe...
Is it right?

psmedley

2014-12-17 14:40

administrator   ~0002931

apologies, zip fixed now

ajunra

2014-12-17 15:40

reporter   ~0002932

Hmm, the new version stops if the focus on the game-window. If i click on the free desktop, the window with the game refresh. First stop happens while the newgrf-loading-screen is showing. The game is still unplayable, the start-screen with the huge busy city is still slow down and juddery. I can't start a new or load a game - the mouse-pointer is too jumpy or invisible.

psmedley

2014-12-17 18:33

administrator   ~0002933

mouse pointer is fine here with virtualised eCS 2.2. Startup screen runs smoothly, saving and loading runs fine.

I am using:
11-05-08 9:21 188,402 0 SDL12.DLL
11-05-08 9:21 76,273 0 SDLGFX.DLL
11-05-08 9:21 554,915 0 SDLIMAGE.DLL
11-05-08 9:21 412,322 0 SDLMIXER.DLL
11-05-08 9:21 17,414 0 SDLNET.DLL
11-05-08 9:21 459,806 0 SDLTTF.DLL

ajunra

2014-12-18 01:21

reporter   ~0002934

On my machine sdl version 1.2.15:
sdl12.dll 30.09.2014
sdlsound.dll 09.09.2014
sdlttf.dll 09.09.2014
sdlimage.dll 09.09.2014
sdlmixer.dll 09.09.2014
sdlnet.dll 09.09.2014

This is diffrent but you had change your version since you created version 1.4.0? The 1.4.0 goes fluently here,but the 1.4.4 stops. Same computer, same system, same dll.
The difference i can see is the libc.
OpenTTD 1.4.0 needs libc065 and openTTD 1.4.4 needs libc066.

Couldn't you compile it with libc065 instead with libc066 ?

psmedley

2014-12-18 17:24

administrator   ~0002936

Which libc065.dll are you using?
10-26-14 20:17 157,213 0 libc065.dll
10-26-14 20:16 1,361,666 0 libc066.dll

If it's the above, then your OpenTTD 1.4.0 is using libc066 so that can't be it.

ajunra

2014-12-18 18:33

reporter   ~0002937

Last edited: 2014-12-18 18:40

OK, you are right. Same libc's like you had. But why is the 1.4.0 so fast and the 1.4.4 so stubborn?
Hmm, now is it crazy! For a little moment (approx. 10 seconds) the game are fluently - but without focus only. The game-window was overlayed with the active editor AE. In that moment in that the focus on the game was, is the game slow down and juddery/stubborn. After closing and restart the game, it is also without focus very slow and stubborn but faster than as active window. Why that...? What is different to 1.4.0? For comparison i test 1.4.0 now and then again .

psmedley

2014-12-18 19:02

administrator   ~0002938

Last edited: 2014-12-18 19:14

I will try and build 1.4.0 with the same GCC version and thread fix for comparison.

Done. http://smedley.id.au/tmp/openttd-1.4.0-exe-20141218.zip

ajunra

2014-12-19 01:34

reporter   ~0002939

Same like 1.4.4. Not playable. Original 1.4.0 from May (as per normal) without problems.

psmedley

2014-12-27 08:39

administrator   ~0002959

I will add build to my site soon.

Issue History

Date Modified Username Field Change
2014-11-19 06:12 ajunra New Issue
2014-11-22 07:31 ajunra Note Added: 0002916
2014-12-10 11:29 ajunra Note Added: 0002918
2014-12-14 14:22 psmedley Note Added: 0002919
2014-12-14 14:33 psmedley Note Added: 0002920
2014-12-16 20:11 Steven Levine Note Added: 0002922
2014-12-16 21:06 psmedley Note Added: 0002923
2014-12-16 21:19 psmedley Note Added: 0002924
2014-12-16 21:29 psmedley Note Added: 0002925
2014-12-17 12:49 ajunra Note Added: 0002926
2014-12-17 12:51 ajunra Note Edited: 0002926
2014-12-17 13:02 psmedley Note Added: 0002927
2014-12-17 13:50 ajunra Note Added: 0002928
2014-12-17 14:40 psmedley Note Added: 0002931
2014-12-17 15:40 ajunra Note Added: 0002932
2014-12-17 18:33 psmedley Note Added: 0002933
2014-12-18 01:21 ajunra Note Added: 0002934
2014-12-18 17:24 psmedley Note Added: 0002936
2014-12-18 18:33 ajunra Note Added: 0002937
2014-12-18 18:40 ajunra Note Edited: 0002937
2014-12-18 19:02 psmedley Note Added: 0002938
2014-12-18 19:14 psmedley Note Edited: 0002938
2014-12-19 01:34 ajunra Note Added: 0002939
2014-12-27 08:39 psmedley Note Added: 0002959
2014-12-27 08:39 psmedley Status new => resolved
2014-12-27 08:39 psmedley Resolution open => fixed
2014-12-27 08:39 psmedley Assigned To => psmedley
2020-08-24 12:37 psmedley Status resolved => closed