You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When changing NewGRF in game, the blitter might be switched.
Switching of the blitter is triggered during the processing of the mouse click.
However, _draw_mutex is locked during VideoDriver_SDL::PollEvent. VideoDriver_SDL::ChangeResolution then tries to lock it again.
# 6 0x00007f648769a621 in *__GI___assert_fail (assertion=0xe0bf79 "err == 0", file=, line=122, function=0xe0c0e0 "virtual void ThreadMutex_pthread::BeginCritical()") at assert.c:81
# 7 0x0000000000a22072 in ThreadMutex_pthread::BeginCritical (this=0x36014f0) at /home/frosch/daten/ottd/trunk/hgtrunk8/src/thread/thread_pthread.cpp:122
# 8 0x0000000000a85639 in VideoDriver_SDL::ChangeResolution (this=0x35eba00, w=1826, h=936) at /home/frosch/daten/ottd/trunk/hgtrunk8/src/video/sdl_v.cpp:820
# 9 0x0000000000a85729 in VideoDriver_SDL::AfterBlitterChange (this=0x35eba00) at /home/frosch/daten/ottd/trunk/hgtrunk8/src/video/sdl_v.cpp:840
# 10 0x00000000007b442b in SwitchNewGRFBlitter () at /home/frosch/daten/ottd/trunk/hgtrunk8/src/gfxinit.cpp:245
# 11 0x00000000007b44bc in GfxLoadSprites () at /home/frosch/daten/ottd/trunk/hgtrunk8/src/gfxinit.cpp:258
# 12 0x0000000000951af4 in ReloadNewGRFData () at /home/frosch/daten/ottd/trunk/hgtrunk8/src/saveload/afterload.cpp:2864
# 13 0x000000000088c5c5 in NewGRFConfirmationCallback (w=0x3be8970, confirmed=true) at /home/frosch/daten/ottd/trunk/hgtrunk8/src/newgrf_gui.cpp:1904
# 14 0x00000000008186bb in QueryWindow::OnClick (this=0x50ae430, pt=..., widget=3, click_count=1) at /home/frosch/daten/ottd/trunk/hgtrunk8/src/misc_gui.cpp:1121
# 15 0x0000000000aab9a1 in DispatchLeftClickEvent (w=0x50ae430, x=162, y=168, click_count=1) at /home/frosch/daten/ottd/trunk/hgtrunk8/src/window.cpp:738
# 16 0x0000000000ab0a3f in MouseLoop (click=MC_LEFT, mousewheel=0) at /home/frosch/daten/ottd/trunk/hgtrunk8/src/window.cpp:2827
# 17 0x0000000000ab0e2b in HandleMouseEvents () at /home/frosch/daten/ottd/trunk/hgtrunk8/src/window.cpp:2916
# 18 0x0000000000a84e34 in VideoDriver_SDL::PollEvent (this=0x35eba00) at /home/frosch/daten/ottd/trunk/hgtrunk8/src/video/sdl_v.cpp:584
# 19 0x0000000000a8523d in VideoDriver_SDL::MainLoop (this=0x35eba00) at /home/frosch/daten/ottd/trunk/hgtrunk8/src/video/sdl_v.cpp:720
# 20 0x00000000008bccc7 in openttd_main (argc=1, argv=0x7fff96f42788) at /home/frosch/daten/ottd/trunk/hgtrunk8/src/openttd.cpp:857
# 21 0x00000000008d4516 in main (argc=1, argv=0x7fff96f42788) at /home/frosch/daten/ottd/trunk/hgtrunk8/src/os/unix/unix.cpp:275
This seems to fix it, and I'm fairly certain that all paths leading to AfterBlitterChange are initiated from an event (and thus hold the mutex). Need someone to verify that though.
frosch opened the ticket and wrote:
Reported version: trunk
Operating system: Linux
This issue was imported from FlySpray: https://bugs.openttd.org/task/5787
The text was updated successfully, but these errors were encountered: