FlavioFS / ParsecSoda

Parsec Soda is a custom open-source game streaming app that integrates with Parsec API and is focused in Host experience.
MIT License
200 stars 50 forks source link

[Bug] GamepadsWidget crash on launch #25

Open v6ooo opened 2 years ago

v6ooo commented 2 years ago

https://github.com/FlavioFS/ParsecSoda/blob/2d00d9851399ca1e6797279d649b6b105463f8d2/ParsecSoda/Widgets/GamepadsWidget.cpp#L177

Result: Randomly crashes on launch of app Reproduce: Keep launching until it crashes. Usually around 5 tries

Error: Unhandled exception at 0x00007FFE4B5C4F99 in ParsecSoda.exe: Microsoft C++ exception: std::length_error at memory location 0x0000004F078FB520.

-       gi  {owner={guest={name=<Error reading characters of string.> userID=3722304989 id=3722304989 ...} deviceID=...} ...}   Gamepad &
-       owner   {guest={name=<Error reading characters of string.> userID=3722304989 id=3722304989 ...} deviceID=3722304989 ...}    GuestDevice
-       guest   {name=<Error reading characters of string.> userID=3722304989 id=3722304989 ...}    Guest
-       name    <Error reading characters of string.>   std::string
        [size]  15987178197214944733    unsigned __int64
        [capacity]  15987178197214944733    unsigned __int64
+       [allocator] allocator   std::_Compressed_pair<std::allocator<char>,std::_String_val<std::_Simple_types<char>>,1>
        [0] <Unable to read memory> char
        [1] <Unable to read memory> char
        [2] <Unable to read memory> char
        [3] <Unable to read memory> char
        ...
+       [More]      
+       [Raw View]  {_Mypair=allocator }    std::string
        userID  3722304989  unsigned int
        id  3722304989  unsigned int
        status  INVALID | -572662308 (-572662307)   Guest::Status
        deviceID    3722304989  unsigned int
        isKeyboard  true (221)  bool
        isPuppet    true (221)  bool
FlavioFS commented 2 years ago

Probably another racing condition. UI in C++ is kinda... ooff. Since everything has to be super thread-safe.