Skip to content

Crash when use gz sim with invalid combo (sdf file and --playback flag) #3132

@XINJIANGMO

Description

@XINJIANGMO

Environment

  • OS Version: Ubuntu 24.04
  • Source or binary build?
    source,gz-sim10

Description

  • Expected behavior: only error messages , no crash
  • Actual behavior: gazebo crashes

Steps to reproduce

  1. gz sim gz sim shapes.sdf --playback ~/.gz/sim/log/[anyone you have recorded]
  2. crash

Output

(2025-10-17 18:02:27.986) [error] [gz.cc:453] Both an SDF file and playback flag are specified. Only specify one.
terminate called without an active exception
Stack trace (most recent call last):
#11   Object "", at 0xffffffffffffffff, in 
#10   Object "/home/momo/gz_jetty/install/libexec/gz/sim10/gz-sim-main", at 0x5ef0007e6c84, in _start
#9    Source "../csu/libc-start.c", line 360, in __libc_start_main_impl [0x75ae86c2a28a]
#8    Source "../sysdeps/nptl/libc_start_call_main.h", line 58, in __libc_start_call_main [0x75ae86c2a1c9]
#7    Source "/home/momo/gz_jetty/src/gz-sim/src/cmd/sim_main.cc", line 525, in main [0x5ef0007f068f]
        522:     #endif
        523: 
        524:     gzdbg << "Shutting down gz-sim-server" << std::endl;
      > 525:   }
        526:   else
        527:   {
        528:     if(opt->launchServer)
#6  | Source "/usr/include/c++/13/bits/std_thread.h", line 173, in __terminate
    |   171:     {
    |   172:       if (joinable())
    | > 173: 	std::__terminate();
    |   174:     }
      Source "/usr/include/x86_64-linux-gnu/c++/13/bits/c++config.h", line 322, in ~thread [0x5ef0007fb50a]
        319:   inline void __terminate() _GLIBCXX_USE_NOEXCEPT
        320:   {
        321:     void terminate() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__noreturn__));
      > 322:     terminate();
        323:   }
        324: #pragma GCC visibility pop
        325: }
#5    Source "../../../../src/libstdc++-v3/libsupc++/eh_terminate.cc", line 58, in terminate [0x75ae870a5a54]
#4    Source "../../../../src/libstdc++-v3/libsupc++/eh_terminate.cc", line 48, in __terminate [0x75ae870bb0d9]
#3    Source "../../../../src/libstdc++-v3/libsupc++/vterminate.cc", line 95, in __verbose_terminate_handler [0x75ae870a5ff4]
#2    Source "./stdlib/abort.c", line 79, in abort [0x75ae86c288fe]
#1    Source "../sysdeps/posix/raise.c", line 26, in raise [0x75ae86c4527d]
#0  | Source "./nptl/pthread_kill.c", line 89, in __pthread_kill_internal
    | Source "./nptl/pthread_kill.c", line 78, in __pthread_kill_implementation
      Source "./nptl/pthread_kill.c", line 44, in __pthread_kill [0x75ae86c9eb2c]
Aborted (Signal sent by tkill() 264450 1000)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Inbox

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions