The International Simutrans Forum

 

Author Topic: [r8296] dragging signal tool causes SIGSEGV  (Read 1772 times)

0 Members and 1 Guest are viewing this topic.

Offline captain crunch

  • *
  • Posts: 116
[r8296] dragging signal tool causes SIGSEGV
« on: September 27, 2017, 01:16:09 PM »
Dragging the rail signal tool causes the program to terminate with SIGSEGV.

gdb backtrace:
Code: [Select]
Core was generated by `./sim -objects pak'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000000000071c9f1 in vector_tpl<unsigned char>::append (this=0x3e9a5f0, elem=@0x7ffcf850491f: 8 '\b')
    at dataobj/../tpl/vector_tpl.h:96
96                              data[count++] = elem;
[Current thread is 1 (Thread 0x7f2de2fdd900 (LWP 31593))]
(gdb) bt
#0  0x000000000071c9f1 in vector_tpl<unsigned char>::append (this=0x3e9a5f0, elem=@0x7ffcf850491f: 8 '\b')
    at dataobj/../tpl/vector_tpl.h:96
#1  0x000000000070ea02 in tool_build_roadsign_t::mark_tiles (this=0x3e9a550, player=0x36df2b0, start=..., ziel=...)
    at simtool.cc:4839
#2  0x00000000006efab9 in two_click_tool_t::move (this=0x3e9a550, player=0x36df2b0, buttonstate=<optimized out>,
    pos=...) at simmenu.cc:1055
#3  0x00000000006dd0c7 in interaction_t::move_cursor (this=this@entry=0x4096be0, ev=...) at siminteraction.cc:106
#4  0x00000000006ddb54 in interaction_t::process_event (this=this@entry=0x4096be0, ev=...) at siminteraction.cc:412
#5  0x00000000006ddf43 in interaction_t::check_events (this=0x4096be0) at siminteraction.cc:439
#6  0x000000000073c204 in karte_t::interactive (this=0x41d11b0, quit_month=2147483647) at simworld.cc:6580
#7  0x00000000006e6a46 in simu_main (argc=3, argv=0x7ffcf8506c18) at simmain.cc:1348
#8  0x00000000006f9726 in sysmain (argc=3, argv=0x7ffcf8506c18) at simsys.cc:824
#9  0x00007f2de1983b45 in __libc_start_main (main=0x40a7a0 <main(int, char**)>, argc=3, argv=0x7ffcf8506c18,
    init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffcf8506c08)
    at libc-start.c:287
#10 0x000000000040a7ce in _start ()

edit: fixed typo
« Last Edit: September 27, 2017, 05:52:05 PM by captain crunch »

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4597
  • Languages: EN, DE, AT
Re: [r8296] dragging signal tool causes SIGSEGV
« Reply #1 on: October 01, 2017, 09:17:45 AM »
As the screenshot suggests, this crash happens also in very simple situations? Will try to reproduce in the next days

Edit: I cannot reproduce this.
« Last Edit: October 01, 2017, 03:47:19 PM by Dwachs »

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5535
  • Languages: EN, NO
Re: [r8296] dragging signal tool causes SIGSEGV
« Reply #2 on: October 01, 2017, 05:44:34 PM »
The debug information suggests that this is from some 64-bit build. As far as I know, that is pretty much unsupported. Unsupported in what I believe is the original sense: we won't stop you, but you get to deal with stuff yourself. (Which I did years ago, but not anymore.)

Offline captain crunch

  • *
  • Posts: 116
Re: [r8296] dragging signal tool causes SIGSEGV
« Reply #3 on: October 02, 2017, 06:30:26 AM »
Please apologize me, it seems the PEBKAC. After doing a 'make clean' and a new build the problem vanished into thin air.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5535
  • Languages: EN, NO
Re: [r8296] dragging signal tool causes SIGSEGV
« Reply #4 on: October 02, 2017, 04:08:41 PM »
The problem might still be there, it is just that the rebuild caused a different alignment of the code. A new rebuild could make it appear again.

But it is indeed also possible that some out-of-date files went into the linking process. That would be a bug in itself, except in the build scripts rather than the source code.