wastedgames/wasted-code
7
27
Fork
You've already forked wasted-code
5

Game crashes after plugging in gamepad and racing in Free Roam #76

Closed
opened 2024年04月20日 10:43:21 +02:00 by Ghost · 3 comments

Steps to reproduce

  1. Open the game
  2. Selected "Free Roam" from menu
  3. Plugged in my USB gamepad
  4. Drive around
  5. Press "Exit"

There is also a related crash from main menu, they share the exact same crash report. Here's how to reproduce that too:

  1. Start game with gamepad (or connect later)
  2. Press any gamepad btn (directional or otherwise)
  3. Game crash

Logs

Thread 1 "wasted" received signal SIGSEGV, Segmentation fault.
0x000055555598003c in Camera::getType (this=0x0)
 at /home/spongy/.local/src/spongy-derby-fork/testing-branch/src/graphics/camera.hpp:187
187	 CameraType getType() { return m_type; }
(gdb) backtrace
#0 0x000055555598003c in Camera::getType (this=0x0)
 at /home/spongy/.local/src/spongy-derby-fork/testing-branch/src/graphics/camera.hpp:187
#1 0x0000555555b6509c in InputManager::input (this=0x5555578cff00, event=...)
 at /home/spongy/.local/src/spongy-derby-fork/testing-branch/src/input/input_manager.cpp:944
#2 0x0000555555b63304 in InputManager::handleJoystick (this=0x5555578cff00, event=...)
 at /home/spongy/.local/src/spongy-derby-fork/testing-branch/src/input/input_manager.cpp:198
#3 0x0000555555b63107 in handle_joystick (event=...)
 at /home/spongy/.local/src/spongy-derby-fork/testing-branch/src/input/input_manager.cpp:166
#4 0x00005555560b5d91 in irr::CIrrDeviceSDL::run (this=0x55555772b030)
 at /home/spongy/.local/src/spongy-derby-fork/testing-branch/lib/irrlicht/source/Irrlicht/CIrrDeviceSDL.cpp:934
#5 0x0000555555acda00 in GUIEngine::renderLoading (clearIcons=false, launching=true,
 update_tips=false)
 at /home/spongy/.local/src/spongy-derby-fork/testing-branch/src/guiengine/engine.cpp:1538
#6 0x0000555555acdcc9 in GUIEngine::addLoadingIcon (icon=0x555558e0b680)
 at /home/spongy/.local/src/spongy-derby-fork/testing-branch/src/guiengine/engine.cpp:1570
#7 0x0000555555c740e4 in initRest ()
 at /home/spongy/.local/src/spongy-derby-fork/testing-branch/src/main.cpp:1968
#8 0x0000555555c75201 in main (argc=1, argv=0x7fffffffdd28)
 at /home/spongy/.local/src/spongy-derby-fork/testing-branch/src/main.cpp:2264

Game version 6ca392de31

## Steps to reproduce 1. Open the game 2. Selected "Free Roam" from menu 3. Plugged in my USB gamepad 4. Drive around 5. Press "Exit" 6. There is also a related crash from main menu, they share the exact same crash report. Here's how to reproduce that too: 1. Start game with gamepad (or connect later) 2. Press any gamepad btn (directional or otherwise) 3. Game crash ## Logs ``` Thread 1 "wasted" received signal SIGSEGV, Segmentation fault. 0x000055555598003c in Camera::getType (this=0x0) at /home/spongy/.local/src/spongy-derby-fork/testing-branch/src/graphics/camera.hpp:187 187 CameraType getType() { return m_type; } (gdb) backtrace #0 0x000055555598003c in Camera::getType (this=0x0) at /home/spongy/.local/src/spongy-derby-fork/testing-branch/src/graphics/camera.hpp:187 #1 0x0000555555b6509c in InputManager::input (this=0x5555578cff00, event=...) at /home/spongy/.local/src/spongy-derby-fork/testing-branch/src/input/input_manager.cpp:944 #2 0x0000555555b63304 in InputManager::handleJoystick (this=0x5555578cff00, event=...) at /home/spongy/.local/src/spongy-derby-fork/testing-branch/src/input/input_manager.cpp:198 #3 0x0000555555b63107 in handle_joystick (event=...) at /home/spongy/.local/src/spongy-derby-fork/testing-branch/src/input/input_manager.cpp:166 #4 0x00005555560b5d91 in irr::CIrrDeviceSDL::run (this=0x55555772b030) at /home/spongy/.local/src/spongy-derby-fork/testing-branch/lib/irrlicht/source/Irrlicht/CIrrDeviceSDL.cpp:934 #5 0x0000555555acda00 in GUIEngine::renderLoading (clearIcons=false, launching=true, update_tips=false) at /home/spongy/.local/src/spongy-derby-fork/testing-branch/src/guiengine/engine.cpp:1538 #6 0x0000555555acdcc9 in GUIEngine::addLoadingIcon (icon=0x555558e0b680) at /home/spongy/.local/src/spongy-derby-fork/testing-branch/src/guiengine/engine.cpp:1570 #7 0x0000555555c740e4 in initRest () at /home/spongy/.local/src/spongy-derby-fork/testing-branch/src/main.cpp:1968 #8 0x0000555555c75201 in main (argc=1, argv=0x7fffffffdd28) at /home/spongy/.local/src/spongy-derby-fork/testing-branch/src/main.cpp:2264 ``` Game version 6ca392de31bd6d59aa38b219d8a1519d631b0060

Placed an assert at line 935 input_manager.cpp

EventPropagation InputManager::input(const SEvent& event)
{
assert(Camera::getActiveCamera();
}

This assertion fails in the mention circumstances. So this evidence leads me to believe its a simple bug related to memory addressed not being stored when its called.

I hope this helps.

Placed an assert at line 935 `input_manager.cpp` ``` EventPropagation InputManager::input(const SEvent& event) { assert(Camera::getActiveCamera(); } ``` This assertion fails in the mention circumstances. So this evidence leads me to believe its a simple bug related to memory addressed not being stored when its called. I hope this helps.
Ghost added spent time 2024年04月20日 20:59:30 +02:00
3 days
Ghost stopped working 2024年04月20日 20:59:51 +02:00
9 seconds

Your update (1c0afee59e) seems to have made a positive difference to my game. It stopped the previously mentioned problems occurring.

I'll keep an eye on the issue for the next couple of weeks. Thanks for your fix!

Your update (1c0afee59ee2663eefe9d0c6b664cdc8e524b956) seems to have made a positive difference to my game. It stopped the previously mentioned problems occurring. I'll keep an eye on the issue for the next couple of weeks. Thanks for your fix!

Thank you for finding the bug! Closing it for the moment

Thank you for finding the bug! Closing it for the moment
Sign in to join this conversation.
No Branch/Tag specified
main
dev
b_#215_fix_appimage_issues_on_some_distros
f_#220_remove_run_game_script_with_desktop_file
b_#221_garage_screen_does_not_resize_properly
f_#209_add_tooltip_to_menu_icon
b_#170_chat_messages_not_retained_when_modal_is_open
f_#164_make_explosion_pitch_random_clean
b_#211_rearlights_not_destroyed_after_carchange
f_#164_make_explosion_pitch_random
b_#217_modals_opened_on_top_of_screen_not_making_bg_darker
b_#214_kart_color_change_option_available_in_game_options
b_fps_bug
destorycarfix
b_#204_nitro_not_retained_upon_car_change
b_#203_fps_camera_randomly_unproperly_initialized
b_#101_radio_station_playback_start_briefly_music_from_0_when_seekeing
f_#151_rework_lean_for_cars
f_#178_warn_player_who_is_not_moving
f_#199_custom_suspension_max_force_and_stiffness
f_#198_add_car_offset_for_suspension_height
b_#197_gearchange_cooldown_not_properly_implemented
f_#147_rework_explosion
f_#161_create_garage_screen
release_0_7_8_onfoss
f_#158_make_simulated_engine_gears_follow_the_gears_contained_in_the_xml_cars_file
f_#183_blur_background_during_game_pause
f_#141_check_wayland_lib
f_#142_add_damage_counter_in_UI_during_online_matches
f_#22_punish_inactive_players
b_#143_fix_car_not_respawning_on_map_when_falling_off_in_tutorial_overworld
f_#139_add_random_color_picker_option
b_#113_enabling_music_in_options_play_menu_track
f_#108_improvement_of_car_bounce
f_#112_balance_classes
b_#110_reset_camera_triggers_skidmark
f_#97_radio_player
b_#96_fix_orbital_camera
b_#_92_car_change_broken
f_#87_show_red_text_when_player_is_eliminated
f_#84_turn_on_brakinglights_when_braking
f_#73_improved_game_testing
health_system
0.8.5-alpha
0.8.0-alpha
0.7.8-onfoss
0.7.5-alpha
0.7.0-alpha
0.6.0-alpha
0.5.0-alpha
0.4.0-alpha
0.3.0-alpha
0.2.0-alpha
0.1.0-alpha
Test-release
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
wastedgames/wasted-code#76
Reference in a new issue
wastedgames/wasted-code
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?