etternagame / etterna

Advanced cross-platform rhythm game focused on keyboard play
https://etternaonline.com/
MIT License
509 stars 136 forks source link

Game crashed after completing song #603

Closed M4k4s closed 4 years ago

M4k4s commented 5 years ago

Describe the bug After completing the song, game crashed because system can't find Etterna.vdi debug file and display Undhadled Microsoft C++ exception.

Steps to reproduce the behavior:

  1. Install latest version of Etterna (0.66)
  2. Manualy add songs to "Songs" folder in C:\Games\Etterna\Songs
  3. Lunch Etterna.exe
  4. In menu select Game Start
  5. Play the added song
  6. Complete the song
  7. See error

Expected behavior I expected the results screen with scores

Desktop:

Additional context: Etterna or the installer probably doesn't create .vdi debug file for debbuging songs wich are created in StepMania 5

poco0317 commented 5 years ago

This is most likely a duplicate of #589 which is an issue where the cause has been found, and we are working on a fix. However, since you say "Unhandled C++ Exception" it may be something else. You need to give the whole crashlog. This crash actually has nothing to do with the vdi missing. That does not affect anything. If it was included with the game, instead of the line about the missing file, you would have seen something like ef91c844: Etterna!ef640000 which doesn't necessarily give us any useful information. And the latest version of Etterna is not 0.66. It is 0.66.1.

M4k4s commented 5 years ago

crashinfo.txt Here is crash info

poco0317 commented 5 years ago

Note for anyone checking into this: based on the crashinfo the issue is within this section of code https://github.com/etternagame/etterna/blob/cce9555823b0e2e5fdcaa92b632f42d27a41db94/src/Etterna/Models/Misc/StageStats.cpp#L672-L693

This calls DLMAN->UploadScoreWithReplayData which can potentially output large amounts of text to the log if the server response is malformed. This crashes the game (the related issue mentioned before)

poco0317 commented 5 years ago

Crash cause found: https://github.com/etternagame/etterna/blob/cce9555823b0e2e5fdcaa92b632f42d27a41db94/src/Etterna/Models/Misc/StageStats.cpp#L681-L682

On new sessions when not forcefully disconnected from SMonline (or if you connect manually but dont enter multiplayer) the bool here is true. ReportHighScore is useful for only Multiplayer. The connection to multiplayer can go bad (?) and through its process, ReportHighScore throws a C++ Exception from within websocketpp https://github.com/etternagame/etterna/blob/cce9555823b0e2e5fdcaa92b632f42d27a41db94/extern/websocketpp/websocketpp/impl/endpoint_impl.hpp#L177

... So either we handle this exception or we find a way to not have that bool incorrectly true.

poco0317 commented 4 years ago

fixed in 655ea086cf18cc565fdedae17f7351fa930b573b