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 due to invalid footpathEntry in path_paint #3589

Closed
chrismilne300 opened this issue May 13, 2016 · 4 comments
Closed

Crash due to invalid footpathEntry in path_paint #3589

chrismilne300 opened this issue May 13, 2016 · 4 comments
Labels
crash Game exits suddenly. investigate Not sure what the problem is yet. multiplayer Related to the multiplayer functionality of OpenRCT2.

Comments

@chrismilne300
Copy link

OS: Windows 10
Version: 0.0.5
Commit: 0710eb7

Dump file
Dump Files .zip

@chrismilne300
Copy link
Author

chrismilne300 commented May 13, 2016

It seems to be related to the Mine train coaster, also crashes in vanilla.

@janisozaur
Copy link
Member

Save game can reproduce the crash, just scroll a bit to the left.

#0  RCT2_CALLPROC_X (address=0x6a3590, _eax=0, _ebx=0, _ecx=3, _edx=192, _esi=16282616, _edi=0, _ebp=0) at /home/janisozaur/workspace/OpenRCT2/src/addresses.c:31
#1  0x014f1915 in path_paint (direction=3 '\003', height=192, mapElement=0xf873f8) at /home/janisozaur/workspace/OpenRCT2/src/paint/map_element/path.c:22
#2  0x014f276b in sub_68B3FB (x=<optimized out>, y=<optimized out>) at /home/janisozaur/workspace/OpenRCT2/src/paint/map_element/map_element.c:246
#3  0x014f2a0f in map_element_paint_setup (x=<optimized out>, y=<optimized out>) at /home/janisozaur/workspace/OpenRCT2/src/paint/map_element/map_element.c:64
#4  0x014f744a in viewport_paint_setup () at /home/janisozaur/workspace/OpenRCT2/src/paint/paint.c:682
#5  0x0147d6bc in viewport_paint (viewport=0x164a760 <g_viewport_list>, dpi=0xffc7c160, left=<optimized out>, top=<optimized out>, right=<optimized out>, bottom=<optimized out>)
    at /home/janisozaur/workspace/OpenRCT2/src/interface/viewport.c:789
#6  0x0147d81a in viewport_render (dpi=<optimized out>, viewport=<optimized out>, left=<optimized out>, top=<optimized out>, right=<optimized out>, bottom=<optimized out>)
    at /home/janisozaur/workspace/OpenRCT2/src/interface/viewport.c:691
#7  0x014364ad in window_main_paint (w=0x164ac80 <g_window_list>, dpi=0xffc7c160) at /home/janisozaur/workspace/OpenRCT2/src/windows/main.c:98
#8  0x01481230 in window_event_paint_call (dpi=0xffc7c160, w=0x164ac80 <g_window_list>) at /home/janisozaur/workspace/OpenRCT2/src/interface/window.c:2011
#9  window_draw (w=<optimized out>, left=0, top=<optimized out>, right=1169, bottom=<optimized out>) at /home/janisozaur/workspace/OpenRCT2/src/interface/window.c:1580
#10 0x014be78c in gfx_redraw_screen_rect (left=0, top=0, right=1169, bottom=28) at /home/janisozaur/workspace/OpenRCT2/src/drawing/drawing.c:359
#11 0x0147d0a7 in sub_6E7F34 (w=0x164b140 <g_window_list+1216>, viewport=0x164a760 <g_viewport_list>, x_diff=72, y_diff=56)
    at /home/janisozaur/workspace/OpenRCT2/src/interface/viewport.c:426
#12 0x0147d1fe in sub_6E7DE1 (x=538, y=-2437, w=0x164ac80 <g_window_list>, viewport=0x164a760 <g_viewport_list>) at /home/janisozaur/workspace/OpenRCT2/src/interface/viewport.c:500
#13 0x0147dc45 in viewport_update_position (window=0x164ac80 <g_window_list>) at /home/janisozaur/workspace/OpenRCT2/src/interface/viewport.c:628
#14 0x0147ec88 in window_update_all_viewports () at /home/janisozaur/workspace/OpenRCT2/src/interface/window.c:160
#15 0x01480c88 in window_update_all () at /home/janisozaur/workspace/OpenRCT2/src/interface/window.c:174
#16 0x01507c9f in rct2_draw () at /home/janisozaur/workspace/OpenRCT2/src/rct2.c:280
#17 0x014fd00f in openrct2_loop () at /home/janisozaur/workspace/OpenRCT2/src/openrct2.c:420
#18 openrct2_launch () at /home/janisozaur/workspace/OpenRCT2/src/openrct2.c:321
#19 0x01429286 in main (argc=2, argv=0xffc7c464) at /home/janisozaur/workspace/OpenRCT2/src/platform/posix.c:60

@Gymnasiast Gymnasiast added investigate Not sure what the problem is yet. multiplayer Related to the multiplayer functionality of OpenRCT2. labels May 17, 2016
@Gymnasiast Gymnasiast added the crash Game exits suddenly. label May 24, 2016
@janisozaur
Copy link
Member

Crash in native code, we don't use it anymore.

Save game still (as of 3653baf) still reproduces crash with following stack trace:

#0  0x00000000005cd819 in path_paint (direction=3 '\003', height=176, map_element=0x28b4c38 <gMapElements+137528>) at /home/janisozaur/workspace/OpenRCT2/src/paint/map_element/path.c:769
        word_F3F038 = true
        sceneryImageFlags = 0
        imageFlags = 0
        x = 2400
        y = 1920
        surface = 0x28b4c30 <gMapElements+137520>
        bl = 22
        pathType = 15 '\017'
        footpathEntry = 0xffffffffffffffff
#1  0x00000000005c6792 in sub_68B3FB (x=2432, y=1952) at /home/janisozaur/workspace/OpenRCT2/src/paint/map_element/map_element.c:251
        direction = 3
        height = 176
        dword_9DE574 = {
          x = 2400, 
          y = 1920
        }
        dpi = 0x7fffffffd270
        map_element = 0x28b4c38 <gMapElements+137528>
        rotation = 2 '\002'
        dx = -2484
        bx = -2140
        element = 0x28b4c30 <gMapElements+137520>
        max_height = 232
        segmentPositions = {[0] = {[0] = 0, [1] = 6, [2] = 2}, [1] = {[0] = 5, [1] = 4, [2] = 8}, [2] = {[0] = 1, [1] = 7, [2] = 3}}
#2  0x00000000005c536a in map_element_paint_setup (x=2400, y=1920) at /home/janisozaur/workspace/OpenRCT2/src/paint/map_element/map_element.c:70
#3  0x00000000005ea4df in paint_generate_structs (dpi=0x7fffffffd270) at /home/janisozaur/workspace/OpenRCT2/src/paint/paint.c:689
#4  0x000000000055baf4 in viewport_paint_column (dpi=0x7fffffffd270, viewFlags=1024) at /home/janisozaur/workspace/OpenRCT2/src/interface/viewport.c:750
#5  0x000000000055b925 in viewport_paint (viewport=0x273e620 <g_viewport_list>, dpi=0x7fffffffd400, left=511, top=-2399, right=1725, bottom=-2371) at /home/janisozaur/workspace/OpenRCT2/src/interface/viewport.c:734
#6  0x000000000055aad4 in viewport_render (dpi=0x7fffffffd400, viewport=0x273e620 <g_viewport_list>, left=511, top=-2399, right=1725, bottom=-2371) at /home/janisozaur/workspace/OpenRCT2/src/interface/viewport.c:664
#7  0x0000000000d410d1 in window_main_paint (w=0x273ed60 <g_window_list>, dpi=0x7fffffffd400) at /home/janisozaur/workspace/OpenRCT2/src/windows/main.c:97
#8  0x0000000000590e9e in window_event_paint_call (w=0x273ed60 <g_window_list>, dpi=0x7fffffffd400) at /home/janisozaur/workspace/OpenRCT2/src/interface/window.c:2041
#9  0x000000000058c417 in window_draw_single (dpi=0x7fffffffd400, w=0x273ed60 <g_window_list>, left=0, top=0, right=1214, bottom=28) at /home/janisozaur/workspace/OpenRCT2/src/interface/window.c:1688
#10 0x000000000058a788 in window_draw (dpi=0x7fffffffd530, w=0x273ed60 <g_window_list>, left=0, top=0, right=1214, bottom=28) at /home/janisozaur/workspace/OpenRCT2/src/interface/window.c:1584
#11 0x000000000050124d in window_draw_all (dpi=0x61a00000a710, left=0, top=0, right=1214, bottom=28) at /home/janisozaur/workspace/OpenRCT2/src/drawing/drawing.c:460
#12 0x0000000000556cdd in viewport_shift_pixels (dpi=0x61a00000a710, w=0x273f240 <g_window_list+1248>, viewport=0x273e620 <g_viewport_list>, x_diff=74, y_diff=10) at /home/janisozaur/workspace/OpenRCT2/src/interface/viewport.c:399
#13 0x000000000055863c in viewport_move (x=511, y=-2399, w=0x273ed60 <g_window_list>, viewport=0x273e620 <g_viewport_list>) at /home/janisozaur/workspace/OpenRCT2/src/interface/viewport.c:479
#14 0x000000000055982e in viewport_update_position (window=0x273ed60 <g_window_list>) at /home/janisozaur/workspace/OpenRCT2/src/interface/viewport.c:608
#15 0x000000000057c36d in window_update_all_viewports () at /home/janisozaur/workspace/OpenRCT2/src/interface/window.c:154
#16 0x0000000000f73a44 in SoftwareDrawingEngine::Draw (this=0x61a00000a280) at /home/janisozaur/workspace/OpenRCT2/src/drawing/engines/SoftwareDrawingEngine.cpp:391
#17 0x0000000000f59494 in drawing_engine_draw () at /home/janisozaur/workspace/OpenRCT2/src/drawing/NewDrawing.cpp:134
#18 0x000000000069dad3 in platform_draw () at /home/janisozaur/workspace/OpenRCT2/src/platform/shared.c:171
#19 0x00000000005bbdd1 in openrct2_loop () at /home/janisozaur/workspace/OpenRCT2/src/openrct2.c:440
#20 0x00000000005bb035 in openrct2_launch () at /home/janisozaur/workspace/OpenRCT2/src/openrct2.c:342
#21 0x0000000000696334 in main (argc=2, argv=0x7fffffffdb18) at /home/janisozaur/workspace/OpenRCT2/src/platform/posix.c:59

footpathEntry = 0xffffffffffffffff

Place of crash:

if (footpathEntry->var_0A == 0) {

@janisozaur janisozaur changed the title Crash In Multiplayer Crash due to invalid footpathEntry in path_paint Nov 4, 2016
@Chaosmeister
Copy link
Contributor

there are only 15 saved pathvariants in the save but the 16th variant is used.

janisozaur added a commit to janisozaur/OpenRCT2 that referenced this issue Aug 9, 2017
- Feature: [OpenRCT2#5815] Add cheat to ignore research status and access rides/scenery not yet invented.
- Feature: [OpenRCT2#5857] Keyboard shortcut for clear scenery.
- Feature: [OpenRCT2#5877] Allow up to 16 stations to be synchronised
- Feature: [OpenRCT2#5970] The Bobsleigh Roller Coaster now supports on-ride photos.
- Feature: [OpenRCT2#5991] Allow all tracked rides that can be tested without guests to the Track Designer
- Fix: [OpenRCT2#2127, OpenRCT2#2229, OpenRCT2#5586] Mountain tool cost calculation
- Fix: [OpenRCT2#3589] Crash due to invalid footpathEntry in path_paint
- Fix: [OpenRCT2#3852] Constructing path not clearing scenery on server.
- Fix: [OpenRCT2#4455] Crash in window_sign_invalidate due to original bug
- Fix: [OpenRCT2#4715] Fix OpenGL rendering of water when zoomed. See OpenRCT2#5890.
- Fix: [OpenRCT2#4931] Crash in path_paint - footpathentry was null
- Fix: [OpenRCT2#5629] Issue with tower ride modes approach to station - incorrect sum caused sawtooth in velocity
- Fix: [OpenRCT2#5768] Prevent loading non-existent title sequences.
- Fix: [OpenRCT2#5858] Crash when using custom ride with no colour presets.
- Fix: [OpenRCT2#5865] Ride preview flickering on uneven terrain or mid air.
- Fix: [OpenRCT2#5872] Incorrect OpenGL rendering of masked sprites
- Fix: [OpenRCT2#5880] Leaving bumper cars without building causes assertion.
- Fix: [OpenRCT2#5890] Fix zoomed OpenGL rendering of special sprites with primary and secondary colours.
- Fix: [OpenRCT2#5912] Negative queue when moving entrance in paused state.
- Fix: [OpenRCT2#5920] Placing guest spawn doesn't do anything every 3rd click
- Fix: [OpenRCT2#5939] Crash when importing 'Six Flags Santa Fe'.
- Fix: [OpenRCT2#5977] Custom music files not showing up in music list
- Fix: [OpenRCT2#5981] Ride list doesn't update after using quick demolish.
- Fix: [OpenRCT2#5984] Allow socket binding to same port after crash
- Fix: [OpenRCT2#5998] Staff not getting paid / no loan interest.
- Fix: [OpenRCT2#6026] 'Select ride to advertise' dropdown does not display all items.
- Fix: [OpenRCT2#6052] Unable to place entrance/exit on certain ride types.
- Fix: [OpenRCT2#6071] Quick demolish can delete protected ride.
- Fix: [OpenRCT2#6111] Mute button always visible in editor.
- Fix: [OpenRCT2#6113] Track preview shows incorrect highest drop height.
- Improved: [OpenRCT2#2223] Change mountain tool to ignore higher surrounding tiles.
- Improved: [OpenRCT2#4301] Leading and trailing whitespace in player name is now removed.
- Improved: [OpenRCT2#5859] OpenGL rendering performance
- Improved: [OpenRCT2#5863] Switching drawing engines no longer requires the application to restart.
- Improved: [OpenRCT2#6003] Doors placed on tracks will now work with all vehicles
- Improved: [OpenRCT2#6037] Autosaves are now stored in a subfolder
- Improved: The land tool buttons can now be held down to increase/decrease size.
- Improved: Dropdowns longer than 32 items overflow into columns.
- Improved: Ride Type option in ride window is now a dropdown.
- Improved: "About OpenRCT2" window redesigned, now contains OpenRCT2 info and access to changelog
janisozaur added a commit that referenced this issue Aug 9, 2017
- Feature: [#5815] Add cheat to ignore research status and access rides/scenery not yet invented.
- Feature: [#5857] Keyboard shortcut for clear scenery.
- Feature: [#5877] Allow up to 16 stations to be synchronised
- Feature: [#5970] The Bobsleigh Roller Coaster now supports on-ride photos.
- Feature: [#5991] Allow all tracked rides that can be tested without guests to the Track Designer
- Fix: [#2127, #2229, #5586] Mountain tool cost calculation
- Fix: [#3589] Crash due to invalid footpathEntry in path_paint
- Fix: [#3852] Constructing path not clearing scenery on server.
- Fix: [#4455] Crash in window_sign_invalidate due to original bug
- Fix: [#4715] Fix OpenGL rendering of water when zoomed. See #5890.
- Fix: [#4931] Crash in path_paint - footpathentry was null
- Fix: [#5629] Issue with tower ride modes approach to station - incorrect sum caused sawtooth in velocity
- Fix: [#5768] Prevent loading non-existent title sequences.
- Fix: [#5858] Crash when using custom ride with no colour presets.
- Fix: [#5865] Ride preview flickering on uneven terrain or mid air.
- Fix: [#5872] Incorrect OpenGL rendering of masked sprites
- Fix: [#5880] Leaving bumper cars without building causes assertion.
- Fix: [#5890] Fix zoomed OpenGL rendering of special sprites with primary and secondary colours.
- Fix: [#5912] Negative queue when moving entrance in paused state.
- Fix: [#5920] Placing guest spawn doesn't do anything every 3rd click
- Fix: [#5939] Crash when importing 'Six Flags Santa Fe'.
- Fix: [#5977] Custom music files not showing up in music list
- Fix: [#5981] Ride list doesn't update after using quick demolish.
- Fix: [#5984] Allow socket binding to same port after crash
- Fix: [#5998] Staff not getting paid / no loan interest.
- Fix: [#6026] 'Select ride to advertise' dropdown does not display all items.
- Fix: [#6052] Unable to place entrance/exit on certain ride types.
- Fix: [#6071] Quick demolish can delete protected ride.
- Fix: [#6111] Mute button always visible in editor.
- Fix: [#6113] Track preview shows incorrect highest drop height.
- Improved: [#2223] Change mountain tool to ignore higher surrounding tiles.
- Improved: [#4301] Leading and trailing whitespace in player name is now removed.
- Improved: [#5859] OpenGL rendering performance
- Improved: [#5863] Switching drawing engines no longer requires the application to restart.
- Improved: [#6003] Doors placed on tracks will now work with all vehicles
- Improved: [#6037] Autosaves are now stored in a subfolder
- Improved: The land tool buttons can now be held down to increase/decrease size.
- Improved: Dropdowns longer than 32 items overflow into columns.
- Improved: Ride Type option in ride window is now a dropdown.
- Improved: "About OpenRCT2" window redesigned, now contains OpenRCT2 info and access to changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash Game exits suddenly. investigate Not sure what the problem is yet. multiplayer Related to the multiplayer functionality of OpenRCT2.
Projects
None yet
Development

No branches or pull requests

4 participants