Menu

#2207 Starting tutorial (twice?) on c172 crashes FG

None
Done
Low
2024-01-19
2020-04-12
No

On the forum it was reported, that starting a tutorial on the default c172 twice crashes the sim. This was on FG from Ubuntu (fgfs version 2019.1.1). See forum thread: https://forum.flightgear.org/viewtopic.php?f=20&t=37233

I can replicate this on next, but for me the c172 crashes the sim immediatly when starting the preflight tutorial. Crashlog:

In file /home/daniel/bin/fgfs/fgdata/Aircraft/c172p/Systems/fuel.xml: line 11
      Property /engines/active-engine/already-started-in-session is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/Generic/JSBSim/Systems/hydrodynamics.xml: line 225
      Property hydro/environment/water-level-ft is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/Generic/JSBSim/Systems/hydrodynamics.xml: line 226
      Property hydro/environment/rho-slug_ft3 is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/Generic/JSBSim/Systems/hydrodynamics.xml: line 227
      Property hydro/environment/kinematic-viscosity-ft2_sec is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/Generic/JSBSim/Systems/hydrodynamics.xml: line 229
      Property hydro/environment/current-from-north-fps is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/Generic/JSBSim/Systems/hydrodynamics.xml: line 230
      Property hydro/environment/current-from-east-fps is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/Generic/JSBSim/Systems/hydrodynamics.xml: line 232
      Property hydro/environment/waves-from-deg is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/Generic/JSBSim/Systems/hydrodynamics.xml: line 233
      Property hydro/environment/wave-amplitude-ft is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/Generic/JSBSim/Systems/hydrodynamics.xml: line 234
      Property hydro/environment/wave-length-ft is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/c172p/Systems/c172p-hydrodynamics.xml: line 34
      Property metrics/hydro-rp-x-in is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/c172p/Systems/c172p-hydrodynamics.xml: line 35
      Property metrics/hydro-rp-y-in is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/c172p/Systems/c172p-hydrodynamics.xml: line 36
      Property metrics/hydro-rp-z-in is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/c172p/Systems/c172p-hydrodynamics.xml: line 38
      Property metrics/hydro-beam-ft is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/c172p/Systems/c172p-hydrodynamics.xml: line 39
      Property metrics/hydro-length-ft is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/c172p/Systems/c172p-hydrodynamics.xml: line 46
      Property hydro/float-beam-ft is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/c172p/Systems/c172p-hydrodynamics.xml: line 47
      Property hydro/float-beam-ft2 is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/c172p/Systems/c172p-hydrodynamics.xml: line 48
      Property hydro/float-beam-ft3 is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/c172p/Systems/c172p-hydrodynamics.xml: line 49
      Property hydro/float-beam-ft4 is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/c172p/Systems/c172p-hydrodynamics.xml: line 52
      Property hydro/hull-length-ft is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/c172p/Systems/c172p-hydrodynamics.xml: line 55
      Property hydro/drag-tweak-factor is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/c172p/Systems/c172p-hydrodynamics.xml: line 56
      Property hydro/side-tweak-factor is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/c172p/Systems/c172p-hydrodynamics.xml: line 57
      Property hydro/lift-tweak-factor is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/c172p/Systems/c172p-hydrodynamics.xml: line 58
      Property hydro/pitch-tweak-factor is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/c172p/Systems/c172p-hydrodynamics.xml: line 59
      Property hydro/yaw-tweak-factor is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/c172p/Systems/c172p-hydrodynamics.xml: line 60
      Property hydro/yaw-stability-tweak-factor is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/c172p/Systems/c172p-hydrodynamics.xml: line 63
      Property hydro/fbx-lbs is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/c172p/Systems/c172p-hydrodynamics.xml: line 64
      Property hydro/fby-lbs is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/c172p/Systems/c172p-heat.xml: line 22
      Property heat/human-body-temp-degc is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/c172p/Systems/indicated-airspeed.xml: line 45
      Property /instrumentation/airspeed-indicator/indicated-speed-kt is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/c172p/Systems/mooring-jsbsim.xml: line 81
      Property mooring/mooring-connected is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/c172p/Systems/mooring-jsbsim.xml: line 84
      Property mooring/latitude-deg is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/c172p/Systems/mooring-jsbsim.xml: line 85
      Property mooring/longitude-deg is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/c172p/Systems/mooring-jsbsim.xml: line 86
      Property mooring/altitude-ft is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/c172p/Systems/mooring-jsbsim.xml: line 89
      Property mooring/rope-spring-coeff-lbs_ft is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/c172p/Systems/mooring-jsbsim.xml: line 90
      Property mooring/max-rope-force-lbs is already defined.

In file /home/daniel/bin/fgfs/fgdata/Aircraft/c172p/Systems/mooring-jsbsim.xml: line 91
      Property mooring/rope-length-ft is already defined.
fgfs: /home/daniel/src/fgfs/simgear.git/simgear/structure/subsystem_mgr.cxx:251: virtual void SGSubsystemGroup::init(): Assertion `_state == State::BIND' failed.
bin/runfglaunch.sh: line 4: 74138 Aborted                 DRI_PRIME=1 LD_LIBRARY_PATH=$FG_INSTALL_DIR/lib/:$FG_INSTALL_DIR/lib64:$LD_LIBRARY_PATH $FG_INSTALL_DIR/bin/fgfs --launcher

Discussion

  • James Turner

    James Turner - 2020-04-13

    @stuartbuchanan can you take this one, initially?

     
  • Stuart Buchanan

    Stuart Buchanan - 2020-05-01

    I'm reproing something similar, where there's a mismatch between the airport and selected runway, causing an unknown runway exception in AICreateFlightplan.cxx. However even fixing that I'm still seeing SIGSEGV in model loading on reset.

    What I don't understand is why frame #18 would call the destructor in frame #17.

    Here's the line referenced by frame #18:

    SGBinObject tile;

    So that should just call the constructor for SGBinObject.

    #0  0x00007ffff1551e97 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
    #1  0x00007ffff1553801 in __GI_abort () at abort.c:79
    #2  0x00007ffff159c897 in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff16c9b9a "%s\n")
        at ../sysdeps/posix/libc_fatal.c:181
    #3  0x00007ffff15a390a in malloc_printerr (str=str@entry=0x7ffff16cb800 "free(): invalid next size (fast)") at malloc.c:5350
    #4  0x00007ffff15aaf60 in _int_free (have_lock=0, p=0x7fff8c236380, av=0x7fff8c000020) at malloc.c:4213
    #5  0x00007ffff15aaf60 in __GI___libc_free (mem=0x7fff8c236390) at malloc.c:3124
    #6  0x000055555732b97d in __gnu_cxx::new_allocator<int>::deallocate(int*, unsigned long) (this=0x7fff8c490230, __p=<optimised out>) at /usr/include/c++/7/ext/new_allocator.h:125
    #7  0x000055555732b97d in std::allocator_traits<std::allocator<int> >::deallocate(std::allocator<int>&, int*, unsigned long) (__a=..., __n=<optimised out>, __p=<optimised out>) at /usr/include/c++/7/bits/alloc_traits.h:462
    #8  0x000055555732b97d in std::_Vector_base<int, std::allocator<int> >::_M_deallocate(int*, unsigned long) (this=0x7fff8c490230, __n=<optimised out>, __p=<optimised out>) at /usr/include/c++/7/bits/stl_vector.h:180
    #9  0x000055555732b97d in std::_Vector_base<int, std::allocator<int> >::~_Vector_base() (this=0x7fff8c490230, __in_chrg=<optimised out>) at /usr/include/c++/7/bits/stl_vector.h:162
    #10 0x000055555732b97d in std::vector<int, std::allocator<int> >::~vector() (this=0x7fff8c490230, __in_chrg=<optimised out>)
        at /usr/include/c++/7/bits/stl_vector.h:435
    #11 0x000055555732b97d in std::array<std::vector<int, std::allocator<int> >, 4ul>::~array() (this=<optimised out>, __in_chrg=<optimised out>) at /usr/include/c++/7/array:94
    #12 0x000055555732b97d in std::_Destroy<std::array<std::vector<int, std::allocator<int> >, 4ul> >(std::array<std::vector<int, std::allocator<int> >, 4ul>*) (__pointer=<optimised out>) at /usr/include/c++/7/bits/stl_construct.h:98
    #13 0x000055555732b97d in std::_Destroy_aux<false>::__destroy<std::array<std::vector<int, std::allocator<int> >, 4ul>*>(std::array<std::vector<int, std::allocator<int> >, 4ul>*, std::array<std::vector<int, std::allocator<int> >, 4ul>*) (__last=<optimised out>, __first=0x7fff8c490230) at /usr/include/c++/7/bits/stl_construct.h:108
    #14 0x000055555732b97d in std::_Destroy<std::array<std::vector<int, std::allocator<int> >, 4ul>*>(std::array<std::vector<int, std::allocator<int> >, 4ul>*, std::array<std::vector<int, std::allocator<int> >, 4ul>*) (__last=<optimised out>, __first=<optimised out>) at /usr/include/c++/7/bits/stl_construct.h:137
    #15 0x000055555732b97d in std::_Destroy<std::array<std::vector<int, std::allocator<int> >, 4ul>*, std::array<std::vector<int, std::allocator<int> >, 4ul> >(std::array<std::vector<int, std::allocator<int> >, 4ul>*, std::array<std::vector<int, std::allocator<int> >, 4ul>*, std::allocator<std::array<std::vector<int, std::allocator<int> >, 4ul> >&) (__last=<optimised out>, __first=<optimised out>) at /usr/include/c++/7/bits/stl_construct.h:206
    #16 0x000055555732b97d in std::vector<std::array<std::vector<int, std::allocator<int> >, 4ul>, std::allocator<std::array<std::vector<int, std::allocator<int> >, 4ul> > >::~vector() (this=0x7fff97d66aa8, __in_chrg=<optimised out>)
        at /usr/include/c++/7/bits/stl_vector.h:434
    #17 0x000055555732b97d in SGBinObject::~SGBinObject() (this=0x7fff97d66910, __in_chrg=<optimised out>)
        at /home/stuart/FlightGear/next/src/simgear/simgear/io/sg_binobj.hxx:142
    #18 0x000055555732a759 in SGLoadBTG(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, simgear::SGReaderWriterOptions const*) (path="/home/stuart/.fgfs/TerraSync/Terrain/w160n10/w156n19/400230.btg", options=<optimised out>) at /home/stuart/FlightGear/next/src/simgear/simgear/scene/tgdb/obj.cxx:43
    #19 0x00005555573206b2 in SGReaderWriterBTG::readNode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, osgDB::Options const*) const (this=<optimised out>, fileName="/home/stuart/.fgfs/TerraSync/Terrain/w160n10/w156n19/400230.btg", options=<optimised out>) at /home/stuart/FlightGear/next/src/simgear/simgear/scene/tgdb/SGReaderWriterBTG.cxx:66
    
     

    Last edit: Stuart Buchanan 2020-05-01
  • Stuart Buchanan

    Stuart Buchanan - 2020-05-01
    • status: New --> Accepted
    • assigned_to: Stuart Buchanan
     
  • Stuart Buchanan

    Stuart Buchanan - 2020-05-06

    I've been unable to repro this specific issue under reposition.

     
  • Daniel Meissner

    Daniel Meissner - 2020-05-09

    Hm funny. An hour ago I could still reproduce the crash with my recent build from next. Then I did a debug build to get a backtrace but the crash is gone. Back to release build, it's gone there, too... Maybe it has to do with the reposition crash that James fixed?

     
  • James Turner

    James Turner - 2020-05-09

    Yes the assert is debug only, and it's the issue I fixed. I still don't understand why it occurs for some people and not others, but please do confirm that updarting to next fixes it.

     
    • Daniel Meissner

      Daniel Meissner - 2020-05-10

      I never had any reposition issues. Is there a way to reproduce it?

       
  • James Turner

    James Turner - 2020-05-10

    No we don't figure out a way to reproduce it, for people who don't have it

     
  • xDraconian

    xDraconian - 2020-08-06
    • labels: --> Tutorial, Crash, PropertyTree
     
  • Gijs

    Gijs - 2024-01-19

    Based on the comments this appears to have been fixed. Please comment if you can still reproduce it, then we can re-open it.

     
  • Gijs

    Gijs - 2024-01-19
    • status: Accepted --> Done
     

Log in to post a comment.

MongoDB Logo MongoDB