Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when "Go to memorized place" is inexistant map #1730

Closed
fmatthew5876 opened this issue Mar 27, 2019 · 3 comments

Comments

@fmatthew5876
Copy link
Contributor

commented Mar 27, 2019

Start the test game, talk to the Alex clone next to the bridge.

After teleporting talk to the woman in blue closest to you but one tile below "Memorize/Go to memorized place"

Next talk to the upper right red man "go to inexistant map"

The game will segfault.

It looks like MessageOverlay::AddMessage() doesn't handle empty strings. But the fact that it is getting an empty string error message looks like a deeper issue that also needs to be fixed.

Failed to open LMU file `' for reading : No such file or directory
Debug: Loading Map Map999999.lmu
Error:

Thread 1 "easyrpg-player" received signal SIGSEGV, Segmentation fault.
0x0000555555931d5b in MessageOverlay::AddMessage (this=0x6110000002c0, message="",
    color=...)
    at /home/matt/EasyRPG/hh3-rm2k/dev/easyrpg/Player/src/message_overlay.cpp:94
94                      messages.back().repeat_count++;
(gdb) p messages                                        
$1 = std::deque with 0 elements  
(gdb) bt
#0  0x0000555555931d5b in MessageOverlay::AddMessage (this=0x6110000002c0,
    message="", color=...)
    at /home/matt/EasyRPG/hh3-rm2k/dev/easyrpg/Player/src/message_overlay.cpp:94
#1  0x0000555555938a96 in WriteLog (type="Error", msg="", c=...)
    at /home/matt/EasyRPG/hh3-rm2k/dev/easyrpg/Player/src/output.cpp:169
#2  0x000055555593a7f9 in Output::ErrorStr (err="")
    at /home/matt/EasyRPG/hh3-rm2k/dev/easyrpg/Player/src/output.cpp:278
#3  0x000055555589b784 in Game_Map::SetupCommon (_id=999999, is_load_savegame=false)
    at /home/matt/EasyRPG/hh3-rm2k/dev/easyrpg/Player/src/game_map.cpp:289
#4  0x0000555555899ca8 in Game_Map::Setup (_id=999999)
    at /home/matt/EasyRPG/hh3-rm2k/dev/easyrpg/Player/src/game_map.cpp:148
#5  0x00005555558e4e95 in Game_Player::PerformTeleport (this=0x606000e7ed20)
    at /home/matt/EasyRPG/hh3-rm2k/dev/easyrpg/Player/src/game_player.cpp:99
#6  0x0000555555697a59 in Scene_Map::FinishTeleportPlayer (this=0x608000389930)
    at /home/matt/EasyRPG/hh3-rm2k/dev/easyrpg/Player/src/scene_map.cpp:258
#7  0x0000555555697247 in Scene_Map::Update (this=0x608000389930)
    at /home/matt/EasyRPG/hh3-rm2k/dev/easyrpg/Player/src/scene_map.cpp:154
#8  0x00005555556491eb in Player::Update (update_scene=true)
    at /home/matt/EasyRPG/hh3-rm2k/dev/easyrpg/Player/src/player.cpp:317
#9  0x000055555568ac5f in Scene::MainFunction (this=0x608000389930)
    at /home/matt/EasyRPG/hh3-rm2k/dev/easyrpg/Player/src/scene.cpp:107
#10 0x000055555564891d in Player::MainLoop ()
    at /home/matt/EasyRPG/hh3-rm2k/dev/easyrpg/Player/src/player.cpp:223
#11 0x0000555555648837 in Player::Run ()
    at /home/matt/EasyRPG/hh3-rm2k/dev/easyrpg/Player/src/player.cpp:217
#12 0x0000555555647d4a in main (argc=6, argv=0x7fffffffda48)
    at /home/matt/EasyRPG/hh3-rm2k/dev/easyrpg/Player/src/main.cpp:28
(gdb) 

@fdelapena fdelapena added this to the 0.6.1 milestone Mar 27, 2019

@Ghabry Ghabry changed the title Crash in test game Crash when "Go to memorized place" is inexistant map Mar 27, 2019

@Ghabry

This comment has been minimized.

Copy link
Member

commented Mar 27, 2019

Also noticed this bug in with AddMessage while doing the libretro port: The MessageOverlay crashes when the first message it is supposed to show is empty but empty messages shouldn't happen, yeah, still a bug.

@carstene1ns

This comment has been minimized.

Copy link
Member

commented Mar 27, 2019

Might be related: Sometimes the overlay "scrolls to soon". You only see the second/third line of a multiline message.
Also, I think this crash happens in 11 of #1666 (comment).

@Ghabry

This comment has been minimized.

Copy link
Member

commented May 5, 2019

this was fixed by #1756

@Ghabry Ghabry closed this May 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.