MantisBT - VCMI
View Issue Details
0003167VCMILauncherpublic2021-02-09 10:172022-03-16 10:40
sausame 
 
highcrashalways
resolvedfixed 
Mac OSCatalina 10.15.4
0.99 
1.next 
0003167: Crash when click single scenario in new game
It says as following,

----------------------------
Main Thread Checker: UI API called on a background thread: -[NSView removeFromSuperview]
PID: 975, TID: 1656833, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4 libSDL2-2.0.0.dylib 0x000000010c2c4282 Cocoa_StopTextInput + 52
5 libSDL2-2.0.0.dylib 0x000000010c2a4385 SDL_StopTextInput_REAL + 30
6 vcmiclient 0x00000001005bee87 _ZN8CSDL_Ext13stopTextInputEv + 23
7 vcmiclient 0x000000010092f5c1 _ZN10CTextInput9focusLostEv + 17
8 vcmiclient 0x000000010092e1af _ZN10CFocusable9giveFocusEv + 63
9 vcmiclient 0x000000010092eb0d _ZN10CTextInputC1ERK4RectRK5PointRKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEERK13CFunctionListIFvSE_EE + 557
1, launch client with './vcmiclient'
2, click button named of 'new game'
3, click button named of 'single scenario'
4, it will crash.
The application runs OK when click 'Campaign'.

By the way, when I add breakpoints in this source file, it runs OK.

---------------------------

bool LobbyClientConnected::applyOnLobbyHandler(CServerHandler * handler)
{
    // Check if it's LobbyClientConnected for our client
    if(uuid == handler->c->uuid)
    {
        handler->c->connectionID = clientId;
        if(!settings["session"]["headless"].Bool())
            GH.pushIntT<CLobbyScreen>(static_cast<ESelectionScreen>(handler->screenType));
        handler->state = EClientState::LOBBY;
        return true;
    }
    return false;
}
No tags attached.
log ui-api-called-in-background-thread.log (14,942) 2021-02-09 10:17
https://bugs.vcmi.eu/file_download.php?file_id=3114&type=bug
png code.png (4,318,927) 2021-02-09 10:18
https://bugs.vcmi.eu/file_download.php?file_id=3115&type=bug
Issue History
2021-02-09 10:17sausameNew Issue
2021-02-09 10:17sausameFile Added: ui-api-called-in-background-thread.log
2021-02-09 10:18sausameFile Added: code.png
2021-02-09 10:19sausameNote Added: 0007998
2021-02-09 10:20sausameNote Edited: 0007998bug_revision_view_page.php?bugnote_id=7998#r3626
2021-02-09 14:06odmitriyNote Added: 0007999
2021-02-15 18:13vlad309523Note Added: 0008016
2022-03-16 10:40PovelitelNote Added: 0008108
2022-03-16 10:40PovelitelStatusnew => resolved
2022-03-16 10:40PovelitelFixed in Version => 1.next
2022-03-16 10:40PovelitelResolutionopen => fixed
2022-03-16 10:40PovelitelAssigned To => Povelitel
2022-03-16 10:40PovelitelAssigned ToPovelitel =>

Notes
(0007998)
sausame   
2021-02-09 10:19   
(edited on: 2021-02-09 10:20)
The last commit of code is as followed.

-----------------
commit db1f9a15b0f67c59aacd7e0af41ef460f6455baf (HEAD -> develop, origin/develop, origin/HEAD)
Merge: 3b8d61009 3add3156e
Author: Alexander Shishkin <[email protected]>
Date: Mon Feb 8 07:32:09 2021 +0300

    Merge pull request 0000675 from ShubusCorporation/do/fix/mod_system_and_interface_bugs

    Fixed: Mods dependency issues leading to hanging & 'Restart Scenario' button functionality

(0007999)
odmitriy   
2021-02-09 14:06   
vcmiserver[984:1656829] dynamic_cast error 2: One or more of the following type_info's has hidden visibility or is defined in more than one translation unit. They should all have public visibility. 13CPackForLobby, 20LobbyClientConnected, 20LobbyClientConnected.


"One of the reasons this could happen is that your app loads several different versions of the same library. For example in my case, I simply didn't remove a path to old version from library search path. Try to see (in debugger) what libraries are loaded in your app, and check that the same library wasn't loaded from different locations."

https://stackoverflow.com/questions/51297638/how-to-fix-type-infos-has-hidden-visibility-they-should-all-have-public-visib [^]
(0008016)
vlad309523   
2021-02-15 18:13   
Looks like there are extra SDL_StopTextInput calls. I've fixed logic of CFocusable here: https://github.com/vcmi/vcmi/pull/683 [^]
(0008108)
Povelitel   
2022-03-16 10:40   
Fixed by vlad309523