[Scummvm-tracker] [ScummVM] #9609: SDL: Crash with displayMessageOnOSD called from separate thread in cloud code

Thierry Crozat trac at scummvm.org
Thu Oct 13 01:53:12 CEST 2016


#9609: SDL: Crash with displayMessageOnOSD called from separate thread in cloud
code
-------------------+-----------------------
Reporter:  criezy  |      Owner:
    Type:  defect  |     Status:  new
Priority:  normal  |  Component:  --Unset--
Keywords:          |       Game:
-------------------+-----------------------
 I got the crash with the current code in master (0a186a66) on OS X with
 SDL2.

 In the cloud code displayMessageOnOSD is called from a separate thread.
 This means it can be called while a GFX transaction is on-going, if for
 example the user toggles fullscreen on/off at the same time. The same
 issue existed with the cloud icon pulsing and was fixed in commit 1a1a5b5
 by bgK. For the OSD Message it is a bit more difficult to reproduce as you
 need to time the graphics change with the moment when the message is
 shown. The callstack for the crash I got is:
 {{{
 Thread 7 Crashed:: SDLTimer
 0   __pthread_kill + 10
 1   pthread_kill + 92
 2   abort + 125
 3   __assert_rtn + 321
 4   SurfaceSdlGraphicsManager::displayMessageOnOSD(char const*) + 130
 (surfacesdl-graphics.cpp:2088)
 5   ModularBackend::displayMessageOnOSD(char const*) + 54 (modular-
 backend.cpp:242)
 6   Cloud::Storage::savesSyncDefaultCallback(Networking::Response<bool>) +
 215 (storage.cpp:211)
 7   Common::Callback<Cloud::Storage, Networking::Response<bool>
 >::operator()(Networking::Response<bool>) + 143 (callback.h:90)
 8   Cloud::SavesSyncRequest::finishSync(bool) + 220
 (savessyncrequest.cpp:400)
 9   Cloud::SavesSyncRequest::uploadNextFile() + 91
 (savessyncrequest.cpp:287)
 10 Cloud::SavesSyncRequest::downloadNextFile() + 255
 (savessyncrequest.cpp:234)
 11
 Cloud::SavesSyncRequest::directoryListedCallback(Networking::Response<Common::Array<Cloud::StorageFile>&>)
 + 1895 (savessyncrequest.cpp:140)
 12  Common::Callback<Cloud::SavesSyncRequest,
 Networking::Response<Common::Array<Cloud::StorageFile>&>
 >::operator()(Networking::Response<Common::Array<Cloud::StorageFile>&>) +
 142 (callback.h:90)
 13
 Cloud::Dropbox::DropboxListDirectoryRequest::finishListing(Common::Array<Cloud::StorageFile>&)
 + 118 (dropboxlistdirectoryrequest.cpp:220)
 14
 Cloud::Dropbox::DropboxListDirectoryRequest::responseCallback(Networking::Response<Common::JSONValue*>)
 + 5003 (dropboxlistdirectoryrequest.cpp:198)
 15 Common::Callback<Cloud::Dropbox::DropboxListDirectoryRequest,
 Networking::Response<Common::JSONValue*>
 >::operator()(Networking::Response<Common::JSONValue*>) + 142
 (callback.h:90)
 16  Networking::CurlJsonRequest::finishJson(Common::JSONValue*) + 124
 (curljsonrequest.cpp:99)
 17  Networking::CurlJsonRequest::handle() + 393 (curljsonrequest.cpp:78)
 18  Networking::ConnectionManager::interateRequests() + 336
 (connectionmanager.cpp:155)
 19  Networking::ConnectionManager::handle() + 86
 (connectionmanager.cpp:132)
 20  Networking::connectionsThread(void*) + 25 (connectionmanager.cpp:101)
 21  DefaultTimerManager::handler() + 482 (default-timer.cpp:108)
 22  timer_handler(unsigned int, void*) + 27 (sdl-timer.cpp:34)
 23  SDL_TimerThread + 399 (SDL_timer.c:169)
 24  SDL_RunThread + 60 (SDL_thread.c:282)
 25  RunThread + 9 (SDL_systhread.c:75)
 26  _pthread_body + 138
 27  _pthread_start + 137
 28  thread_start + 13
 }}}

 This triggers the following assert:
 {{{
 Assertion failed: (_transactionMode == kTransactionNone), function
 displayMessageOnOSD, file backends/graphics/surfacesdl/surfacesdl-
 graphics.cpp, line 2088.
 }}}

--
Ticket URL: <https://bugs.scummvm.org/ticket/9609>
ScummVM <https://bugs.scummvm.org>
ScummVM



More information about the Scummvm-tracker mailing list