Beta builds crashing
#21
That looks like another Int3 trap.  Someone thought it could never happen, so they put an Int3 to see if it did.  In this case, an unexpected fate was returned from find_vector_intersection.  Can you show info locals?
Reply
#22
Is there any way to get info locals on a gdb that is no longer running?

I'm not sure how to duplicate this crash...in the future should I get info locals on all crashes as well as a backtrace?
Reply
#23
If you have a core file, you can use it to view the program's state.  If you kept a debugger attached while you were playing and did not save a core file, then no, you cannot recover that state.  I can still add a patch to disable the apparently bogus Int3, but I would like to know why it is triggering.

Based on the callstack, I think someone hit a robot with a smart missile or possibly an earthshaker.
Reply
#24
New crash!

Code:
#0  0x00007ffff63f24b7 in raise () from /usr/lib/libc.so.6
#1  0x00007ffff63f388a in abort () from /usr/lib/libc.so.6
#2  0x00007ffff6cddfcd in __gnu_cxx::__verbose_terminate_handler() ()
   from /usr/lib/libstdc++.so.6
#3  0x00007ffff6cdbe56 in __cxxabiv1::__terminate(void (*)()) ()
   from /usr/lib/libstdc++.so.6
#4  0x00007ffff6cdbea1 in std::terminate() () from /usr/lib/libstdc++.so.6
#5  0x00007ffff6cdc0b8 in __cxa_throw () from /usr/lib/libstdc++.so.6
#6  0x0000000000436555 in check_index_range<segment_array_t> (
    s=<optimized out>, a=...) at common/include/valptridx.h:80
#7  vvalptr_t<segment, short>::vvalptr_t<segment_array_t> (
    this=this@entry=0x7fffffffe450, a=..., i=<optimized out>)
    at common/include/valptridx.h:444
#8  0x000000000042f8dd in vsegptr_t<segment_array_t> (this=0x7fffffffe450)
    at common/main/segment.h:223
#9  operator() (i=<optimized out>, this=<synthetic pointer>)
    at common/include/valptridx.h:560
#10 openable_door_on_near_path (aip=..., obj=...) at similar/main/ai.cpp:2882
#11 0x000000000043186a in do_ai_frame (obj=...) at similar/main/ai.cpp:3475
#12 0x00000000004bc262 in object_move_one (obj=...)
    at similar/main/object.cpp:1687
#13 0x00000000004bd178 in object_move_all () at similar/main/object.cpp:1875
#14 0x000000000045b7cb in GameProcessFrame () at similar/main/game.cpp:1331
---Type <return> to continue, or q <return> to quit---
#15 game_handler (event=...) at similar/main/game.cpp:1109
#16 0x00000000004124d0 in window_send_event (wind=..., event=...)
    at common/arch/sdl/window.cpp:206
#17 0x0000000000429443 in event_process () at similar/arch/sdl/event.cpp:163
#18 0x000000000040affa in main (argc=<optimized out>, argv=<optimized out>)
    at similar/main/inferno.cpp:556

I forgot to add the fsanitize or whatever...I'll go do that now
Reply
#25
I don't think -fsanitize=address would help you here.  Unfortunately, the call stack is not enough in this case.  The call stack shows that an invalid segment index was used in openable_door_on_near_path, when it read back a segment from Point_segs.  The bug is probably in whatever wrote a bad value to Point_segs, or possibly in whatever arranged for openable_door_on_near_path to read that element of Point_segs.  Can you print the value of argument aip and the value of Point_segs[idx]?
Reply
#26
I've already closed that gdb session. In the future I'll start saving core dumps of crashes. Right now I'll go see if I can get this crash again...

Got it! I now did "set print frame-arguments all".
Here's the new backtrace:
Code:
#0  0x00007ffff63f24b7 in raise () from /usr/lib/libc.so.6
#1  0x00007ffff63f388a in abort () from /usr/lib/libc.so.6
#2  0x00007ffff6cddfcd in __gnu_cxx::__verbose_terminate_handler() ()
   from /usr/lib/libstdc++.so.6
#3  0x00007ffff6cdbe56 in __cxxabiv1::__terminate(void (*)()) ()
   from /usr/lib/libstdc++.so.6
#4  0x00007ffff6cdbea1 in std::terminate() () from /usr/lib/libstdc++.so.6
#5  0x00007ffff6cdc0b8 in __cxa_throw () from /usr/lib/libstdc++.so.6
#6  0x0000000000436555 in check_index_range<segment_array_t> (
    s=<optimized out>, a=<optimized out>) at common/include/valptridx.h:80
#7  vvalptr_t<segment, short>::vvalptr_t<segment_array_t> (
    this=this@entry=0x7fffffffe450, a=<optimized out>, i=<optimized out>)
    at common/include/valptridx.h:444
#8  0x000000000042f8dd in vsegptr_t<segment_array_t> (this=0x7fffffffe450)
    at common/main/segment.h:223
#9  operator() (i=<optimized out>, this=<synthetic pointer>)
    at common/include/valptridx.h:560
#10 openable_door_on_near_path (aip=
          @0x103b3e8: {<prohibit_void_ptr<ai_static>> = {<No data fields>}, behavior = ai_behavior::AIB_NORMAL, flags = {_M_elems = "\000\003\003\001\000\000\000\000\377\000"}, hide_segment = 0, hide_index = 1161, path_length = 4, cur_path_index = 3 '\003', dying_sound_playing = 0 '\000', danger_laser_num = -1, danger_laser_signature = {signature = 0}, dying_start_time = 0, ail = {<prohibit_void_p---Type <return> to continue, or q <return> to quit---
tr<ai_local>> = {<No data fields>}, player_awareness_type = player_awareness_type_t::PA_WEAPON_WALL_COLLISION, retry_count = 0 '\000', consecutive_retries = 0 '\000', previous_visibility = 2 '\002', rapidfire_count = 0 '\000', mode = ai_mode::AIM_GOTO_PLAYER, goal_segment = 939, next_action_time = -19291243, next_fire = -30802, next_fire2 = 524288, player_awareness_time = 93782, time_since_processed = 0, time_player_seen = 25679561, time_player_sound_attacked = 23320724, next_misc_sound_time = 25791802, goal_angles = {_M_elems = {{p = 0, b = 0, h = 0}, {p = 0, b = 0, h = 0}, {p = 0, b = 0, h = 0}, {p = 0, b = 0, h = 0}, {p = 0, b = 0, h = 0}, {p = 0, b = 0, h = 0}, {p = 0, b = 0, h = 0}, {p = 0, b = 0, h = 0}, {p = 0, b = 0, h = 0}, {p = 0, b = 0, h = 0}}}, delta_angles = {_M_elems = {{p = 0, b = 0, h = 0}, {p = 0, b = 0, h = 0}, {p = 0, b = 0, h = 0}, {p = 0, b = 0, h = 0}, {p = 0, b = 0, h = 0}, {p = 0, b = 0, h = 0}, {p = 0, b = 0, h = 0}, {p = 0, b = 0, h = 0}, {p = 0, b = 0, h = 0}, {p = 0, b = 0, h = 0}}}, goal_state = {_M_elems = "\006\000\000\000\000\000\000\000\000"}, achieved_state = {_M_elems = "\000\000\000\000\000\000\000\000\000"}}}, obj=<optimized out>)
    at similar/main/ai.cpp:2882
#11 0x000000000043186a in do_ai_frame (obj=
            {<prohibit_void_ptr<vobjptridx_t>> = {<No data fields>}, <valptridx_template_t<true, object, short, object_magic_constant_t, object>> = {<vvalptr_t<object, short>> = {<valptr_t<object, short>> = {<valbaseptridxutil_t<object, short>> = {<No data fields>}, p = 0x103b300 <Objects+40832>}, <No data fields>}, <vvalidx_t<object, short, object_magic_constant_t>> = {<validx_t<object, short, object_magic_constant_t>> = {<valbaseptridxutil_t<object, short>> = {<No data fiel---Type <return> to continue, or q <return> to quit---
ds>}, i = 88}, <No data fields>}, <No data fields>}, <No data fields>})
    at similar/main/ai.cpp:3475
#12 0x00000000004bc262 in object_move_one (obj=
            {<prohibit_void_ptr<vobjptridx_t>> = {<No data fields>}, <valptridx_template_t<true, object, short, object_magic_constant_t, object>> = {<vvalptr_t<object, short>> = {<valptr_t<object, short>> = {<valbaseptridxutil_t<object, short>> = {<No data fields>}, p = 0x103b300 <Objects+40832>}, <No data fields>}, <vvalidx_t<object, short, object_magic_constant_t>> = {<validx_t<object, short, object_magic_constant_t>> = {<valbaseptridxutil_t<object, short>> = {<No data fields>}, i = 88}, <No data fields>}, <No data fields>}, <No data fields>})
    at similar/main/object.cpp:1687
#13 0x00000000004bd178 in object_move_all () at similar/main/object.cpp:1875
#14 0x000000000045b7cb in GameProcessFrame () at similar/main/game.cpp:1331
#15 game_handler (event=@0x2429: <error reading variable>)
    at similar/main/game.cpp:1109
#16 0x00000000004124d0 in window_send_event (wind=
      @0x2318b70: {w_canv = {<prohibit_void_ptr<grs_canvas>> = {<No data fields>}, cv_bitmap = {<prohibit_void_ptr<grs_bitmap>> = {<No data fields>}, bm_x = 0, bm_y = 0, bm_w = 800, bm_h = 600, bm_type = 5 '\005', bm_flags = 0 '\000', bm_rowsize = 800, {bm_data = 0x14c11e0 "", bm_mdata = 0x14c11e0 ""}, bm_handle = 35680, avg_color = 49 '1', avg_color_rgb = {_M_elems = {0, 1, 0}}, bm_parent = 0x14c1178, gltexture = 0x0}, cv_font = 0x1719af0, cv_color = 0 '\000', cv_drawmode = 0, cv_font_fg_color = 1, cv_font_bg_color = -1, cv_fade_level = 34, cv_blend_fun---Type <return> to continue, or q <return> to quit---
c = 0 '\000'}, w_callback = 0x45b050 <game_handler(window*, d_event const&, unused_window_userdata_t const*)>, w_visible = 1, w_modal = 1, data = 0x0, prev = 0x18f7430, next = 0x0}, event=@0x7fffffffe850: {type = EVENT_WINDOW_DRAW})
    at common/arch/sdl/window.cpp:206
#17 0x0000000000429443 in event_process () at similar/arch/sdl/event.cpp:163
#18 0x000000000040affa in main (argc=<optimized out>, argv=<optimized out>)
    at similar/main/inferno.cpp:556

I also saved the core dump so I can fiddle with it if you need me to Smile
Reply
#27
Good news.  While testing a planned change that was supposed to produce better crash reports when this happens, I got a crash that looks exactly like the callstack you provided.

Bad news.  My planned change has (so far) not affected how the crash is reported, so it still manifests as a crash trying to use bad data from a global list, but I want to convert it to a crash trying to store bad data into the global list, so that I can examine the state that causes it to make the bad store.

[Edit: please fetch e590cc59ee918a390cce18c12d18e7c52ad772ce and rebuild.  I have not found yet where the guidebot is creating the bad path, but I added a special case to avoid the crash when the bad path occurs.  This prevented the crash in my testing.]
Reply
#28
I just moved, but I should have my computer up and running this evening to test some new builds Smile
Reply
#29
Crash with 05/23/15 B:

Code:
#0  standard_handler (event=...) at similar/main/inferno.cpp:297
#1  0x00000000004233b2 in call_default_handler (event=...)
    at similar/arch/sdl/event.cpp:107
#2  event_send (event=...) at similar/arch/sdl/event.cpp:127
#3  0x0000000000423a9f in key_handler (kevent=kevent@entry=0x7fffffffe650)
    at similar/arch/sdl/key.cpp:434
#4  0x0000000000423502 in event_poll () at similar/arch/sdl/event.cpp:43
#5  0x0000000000423548 in event_process () at similar/arch/sdl/event.cpp:140
#6  0x0000000000468075 in kmatrix_view (network=<optimized out>)
    at similar/main/kmatrix.cpp:399
#7  0x000000000047a356 in multi_endlevel_score () at similar/main/multi.cpp:448
#8  0x00000000004546cd in AdvanceLevel (secret_flag=secret_flag@entry=0)
    at similar/main/gameseq.cpp:1297
#9  0x0000000000454ee3 in DoPlayerDead () at similar/main/gameseq.cpp:1443
#10 0x000000000043205f in do_countdown_frame ()
    at similar/main/cntrlcen.cpp:243
#11 do_controlcen_dead_frame () at similar/main/cntrlcen.cpp:158
#12 0x0000000000446441 in GameProcessFrame () at similar/main/game.cpp:1295
#13 game_handler (event=...) at similar/main/game.cpp:1121
#14 0x0000000000411760 in window_send_event (wind=..., event=...)
    at common/arch/sdl/window.cpp:206
#15 0x00000000004235c3 in event_process () at similar/arch/sdl/event.cpp:153
#16 0x0000000000409f50 in main (argc=<optimized out>, argv=<optimized out>)
    at similar/main/inferno.cpp:554
Reply
#30
You ran a debug-enabled build, focused on a window which does not process backspace, and then pressed backspace.  This triggered a legacy Int3, which (for debug builds) is an active crash as of Enable Int3 as d_debugbreak.  This Int3 is probably bogus and should be removed.  The original developers used them in places they thought should get the developer's attention if they were ever hit, but some of those places are easy to hit now.  The traps sat silently until btb asked for them to be turned on.  I am getting close to just turning them all off again because of the very high false failure rate.

[Edit: I pushed Remove bogus backspace Int3 to remove this trap.  The bad Int3 was only present in debug builds, so you do not need to rebuild the non-debug build.  You only need to update the debug build if you expect users to press backspace at inappropriate times. Smile]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)