Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OSX] crash upon resizing #3464

Closed
DorpsGek opened this issue Jan 1, 2010 · 11 comments
Closed

[OSX] crash upon resizing #3464

DorpsGek opened this issue Jan 1, 2010 · 11 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Jan 1, 2010

planetmaker opened the ticket and wrote:

After resizing the window, OpenTTD crashed. Trunk r18669

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/3464
@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 1, 2010

Rubidium wrote:

The function 'setFrame' calls WindowResized that reallocates the image buffer, which is used to draw on. I can't find anywhere where setFrame is called, so my assumption is that this is called asynchroniously somewhere without doing the proper locking.

This as it seems to work fine under SDL which is definitely asynchronious, but has (proper) locking.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3464#comment7188

@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 1, 2010

planetmaker wrote:

Additional note for what it's worth: I cannot reproduce this in single player, but it works every time I play on our server. Same savegame.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3464#comment7189

@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 1, 2010

planetmaker wrote:

Just for the joy of it I tested the same thing with the SDL port (see issue http://bugs.openttd.org/task/3447 ).

Also the SDL port fails when re-sizing in multiplayer. On our server I got the message "Uhm, would you be so kind not to load a NewGRF that makes the 'query' sprite a non-normal sprite? See the readme for more info. Most likely you're missing files from the original TTD" (r18669)

Subsequently I tested it with a local (non-dedicated) server. Both failed. The attached crash information are from the non-dedicated server.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3464#comment7193

@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 1, 2010

planetmaker wrote:

Wrong button. These are the crash information

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/3464#comment7194

@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 1, 2010

planetmaker wrote:

Something weired, and everytime something else when re-sizing in multiplayer (macos SDL port, r18669). No crash, but a hang:
openttd(160,0x7fff70ddcbe0) malloc: *** error for object 0x102a65808: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug

Attaching to process 160
Reading symbols for shared libraries . done
Reading symbols for shared libraries .................................................................................................................. done
0x00007fffffe00295 in __spin_lock ()
(gdb) bt
# 0 0x00007fffffe00295 in __spin_lock ()
# 1 0x00007fff870931b4 in szone_malloc_should_clear ()
# 2 0x00007fff87092a4a in malloc_zone_malloc ()
# 3 0x00007fff87090d48 in malloc ()
# 4 0x00007fff870de91e in __smakebuf ()
# 5 0x00007fff870de88a in __swsetup ()
# 6 0x00007fff870a0b89 in __sfvwrite ()
# 7 0x00007fff8711564b in puts ()
# 8 0x0000000100255cc7 in HandleCrash ()
# 9
# 10 0x00007fff870dcfe6 in __kill ()
# 11 0x00007fff8717de32 in abort ()
# 12 0x00007fff8716cae5 in szone_error ()
# 13 0x00007fff8709962f in small_free_list_remove_ptr ()
# 14 0x00007fff8709612f in szone_free_definite_size ()
# 15 0x0000000100284eb0 in CYapfFollowRoadT<CYapfRoad_TypesT<CYapfRoad2, CNodeList_HashTableT<CYapfRoadNodeT, 8, 12>, CYapfDestinationTileRoadT> >::stChooseRoadTrack ()
# 16 0x000000010027bbb9 in YapfRoadVehicleChooseTrack ()
# 17 0x00000001002b0dd7 in RoadFindPathToDest ()
# 18 0x00000001002b132c in IndividualRoadVehicleController ()
# 19 0x00000001002b2af7 in RoadVehicle::Tick ()
# 20 0x000000010036a7da in CallVehicleTicks ()
# 21 0x0000000100247de8 in StateGameLoop ()
# 22 0x00000001001ef470 in NetworkDoClientLoop ()
# 23 0x00000001001f0eb9 in NetworkGameLoop ()
# 24 0x0000000100248785 in GameLoop ()
# 25 0x0000000100379ba2 in VideoDriver_SDL::MainLoop ()
# 26 0x0000000100249c95 in ttd_main ()
# 27 0x0000000100256b8a in SDL_main ()
# 28 0x000000010039e480 in -[SDLMain applicationDidFinishLaunching:] ()
# 29 0x00007fff80abf85a in _nsnote_callback ()
# 30 0x00007fff80874e3a in __CFXNotificationPost ()
# 31 0x00007fff808613e8 in _CFXNotificationPostNotification ()
# 32 0x00007fff80ab67c4 in -[NSNotificationCenter postNotificationName:object:userInfo:] ()
# 33 0x00007fff84cab772 in -[NSApplication _postDidFinishNotification] ()
# 34 0x00007fff84cab6a7 in -[NSApplication _sendFinishLaunchingNotification] ()
# 35 0x00007fff84d76645 in -[NSApplication(NSAppleEventHandling) _handleAEOpen:] ()
# 36 0x00007fff84d762c1 in -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] ()
# 37 0x00007fff80aee156 in -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] ()
# 38 0x00007fff80aedf86 in _NSAppleEventManagerGenericHandler ()
# 39 0x00007fff85acd292 in aeDispatchAppleEvent ()
# 40 0x00007fff85acd18b in dispatchEventAndSendReply ()
# 41 0x00007fff85acd095 in aeProcessAppleEvent ()
# 42 0x00007fff82e7e879 in AEProcessAppleEvent ()
# 43 0x00007fff84c7b3d5 in _DPSNextEvent ()
# 44 0x00007fff84c7ab41 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] ()
# 45 0x00007fff84c40747 in -[NSApplication run] ()
# 46 0x000000010039ead3 in main ()


This comment was imported from FlySpray: https://bugs.openttd.org/task/3464#comment7195

@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 2, 2010

planetmaker wrote:

Yet another additional note: it only happens with blitter 32bpp-anim for both SDL and cocoa video drivers


This comment was imported from FlySpray: https://bugs.openttd.org/task/3464#comment7198

@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 3, 2010

Rubidium wrote:

Unconfirmed only because there's no developer that can confirm it. Given the amount of information given it seems to be a valid bug report though.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3464#comment7224

@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 4, 2010

peter1138 wrote:

I justed tested and got the same thing using 32bpp-anim with SDL on Linux.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3464#comment7233

@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 4, 2010

peter1138 wrote:

Stacktrace looks a bit more useful...

Stacktrace:
[00] bin/openttd(_ZNK12CrashLogUnix13LogStacktraceEPcPKc+0x3c) [0x64a7fc]
[01] bin/openttd(_ZNK8CrashLog12FillCrashLogEPcPKc+0xa1) [0x5705b1]
[02] bin/openttd(_ZNK8CrashLog12MakeCrashLogEv+0x7c) [0x57069c]
[03] bin/openttd [0x64a770]
[04] /lib/libc.so.6 [0x7fe40c7b9f60]
[05] bin/openttd(_ZN17Blitter_32bppAnim14PaletteAnimateEjj+0x68) [0x53ee78]
[06] bin/openttd(_Z24NetworkUndrawChatMessagev+0xea) [0x5e874a]
[07] bin/openttd(_Z16RedrawScreenRectiiii+0x75) [0x5a2f35]
[08] bin/openttd(_Z15DrawDirtyBlocksv+0x154) [0x5a30f4]
[09] bin/openttd(_Z13UpdateWindowsv+0xad) [0x76f19d]
[10] bin/openttd(_ZN15VideoDriver_SDL8MainLoopEv+0x1e0) [0x756f90]
[11] bin/openttd(_Z8ttd_mainiPPc+0xe9b) [0x63ab0b]
[12] /lib/libc.so.6(__libc_start_main+0xe6) [0x7fe40c7a61a6]
[13] bin/openttd(__gxx_personality_v0+0x2d9) [0x4a0099]


This comment was imported from FlySpray: https://bugs.openttd.org/task/3464#comment7234

@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 4, 2010

peter1138 wrote:

Hmm, it's a bit more random...

Stacktrace:
[00] bin/openttd(_ZNK12CrashLogUnix13LogStacktraceEPcPKc+0x3c) [0x64a7fc]
[01] bin/openttd(_ZNK8CrashLog12FillCrashLogEPcPKc+0xa1) [0x5705b1]
[02] bin/openttd(_ZNK8CrashLog12MakeCrashLogEv+0x7c) [0x57069c]
[03] bin/openttd [0x64a770]
[04] /lib/libc.so.6 [0x7f733307ef60]
[05] /lib/libc.so.6(gsignal+0x35) [0x7f733307eed5]
[06] /lib/libc.so.6(abort+0x183) [0x7f73330803f3]
[07] /lib/libc.so.6 [0x7f73330bb3a8]
[08] /lib/libc.so.6 [0x7f73330c0948]
[09] /lib/libc.so.6(cfree+0x76) [0x7f73330c2a56]
[10] bin/openttd(_ZN17Blitter_32bppAnim4DrawEPN7Blitter13BlitterParamsE11BlitterMode9ZoomLevel+0x3f) [0x53f6ff]
[11] bin/openttd [0x5a27a3]
[12] bin/openttd(_Z14ViewportDoDrawPK8ViewPortiiii+0x998) [0x759c98]
[13] bin/openttd [0x75a615]
[14] bin/openttd(_ZNK6Window12DrawViewportEv+0x79) [0x75a7d9]
[15] bin/openttd(_ZN15NWidgetViewport4DrawEPK6Window+0x75) [0x76a645]
[16] bin/openttd(_ZN19NWidgetPIPContainer4DrawEPK6Window+0x24) [0x766b34]
[17] bin/openttd(_ZNK6Window11DrawWidgetsEv+0x11) [0x768681]
[18] bin/openttd(_ZN10MainWindow7OnPaintEv+0x9) [0x5cc959]
[19] bin/openttd [0x76d7ee]
[20] bin/openttd(_Z26DrawOverlappedWindowForAlliiii+0x93) [0x76d8d3]
[21] bin/openttd(_Z16RedrawScreenRectiiii+0x87) [0x5a2f47]
[22] bin/openttd(_Z15DrawDirtyBlocksv+0x154) [0x5a30f4]
[23] bin/openttd(_Z13UpdateWindowsv+0xad) [0x76f19d]
[24] bin/openttd(_ZN15VideoDriver_SDL8MainLoopEv+0x1e0) [0x756f90]
[25] bin/openttd(_Z8ttd_mainiPPc+0xe9b) [0x63ab0b]
[26] /lib/libc.so.6(__libc_start_main+0xe6) [0x7f733306b1a6]
[27] bin/openttd(__gxx_personality_v0+0x2d9) [0x4a0099]


This comment was imported from FlySpray: https://bugs.openttd.org/task/3464#comment7235

@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 4, 2010

peter1138 closed the ticket.

Reason for closing: Fixed

In r18709


This comment was imported from FlySpray: https://bugs.openttd.org/task/3464

@DorpsGek DorpsGek closed this as completed Jan 4, 2010
@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant