/home/mrw/Files/各种学习/各种毕业设计/各种测试/ROOTTest/cmake-build-debug/ROOTTest
*** Break *** segmentation violation
===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0 0x00007f9a6e5a44ca in __GI___waitpid (pid=18271, stat_loc=stat_loc
entry=0x7ffd38cda180, options=options
entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29
#1 0x00007f9a6e51dfbb in do_system (line=<optimized out>) at ../sysdeps/posix/system.c:148
#2 0x00007f9a6f5ac274 in TUnixSystem::Exec (shellcmd=<optimized out>, this=0x223a4f0) at /opt/root/core/unix/src/TUnixSystem.cxx:2073
#3 TUnixSystem::StackTrace (this=0x223a4f0) at /opt/root/core/unix/src/TUnixSystem.cxx:2301
#4 0x00007f9a6f5ae35c in TUnixSystem::DispatchSignals (this=0x223a4f0, sig=kSigSegmentationViolation) at /opt/root/core/unix/src/TUnixSystem.cxx:3539
#5 <signal handler called>
#6 0x0000000000400c34 in hello () at /home/mrw/Files/各种学习/各种毕业设计/各种测试/ROOTTest/main.cpp:39
#7 0x0000000000400d24 in main () at /home/mrw/Files/各种学习/各种毕业设计/各种测试/ROOTTest/main.cpp:53
===========================================================
The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug report at
http://root.cern.ch/bugs. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#6 0x0000000000400c34 in hello () at /home/mrw/Files/各种学习/各种毕业设计/各种测试/ROOTTest/main.cpp:39
#7 0x0000000000400d24 in main () at /home/mrw/Files/各种学习/各种毕业设计/各种测试/ROOTTest/main.cpp:53
===========================================================
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
The code you posted (only main()) doesn’t correspond to the crash (main() calls hello()). And as the crash happens in hello() you’ve skipped the relevant part.
Hello!The error is like this. I just can’t use TBrowser in main function. The other functions are OK
/home/mrw/Files/各种学习/各种毕业设计/各种测试/MyROOTTest/cmake-build-debug/MyROOTTest
*** Break *** segmentation violation
===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0 0x00007f1eead184ca in __GI___waitpid (pid=5643, stat_loc=stat_loc
entry=0x7ffe0468f8c0, options=options
entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29
#1 0x00007f1eeac91fbb in do_system (line=<optimized out>) at ../sysdeps/posix/system.c:148
#2 0x00007f1eeb87b274 in TUnixSystem::Exec (shellcmd=<optimized out>, this=0x1e964f0) at /opt/root/core/unix/src/TUnixSystem.cxx:2073
#3 TUnixSystem::StackTrace (this=0x1e964f0) at /opt/root/core/unix/src/TUnixSystem.cxx:2301
#4 0x00007f1eeb87d35c in TUnixSystem::DispatchSignals (this=0x1e964f0, sig=kSigSegmentationViolation) at /opt/root/core/unix/src/TUnixSystem.cxx:3539
#5 <signal handler called>
#6 TApplication::InitializeGraphics (this=0x0) at /opt/root/core/base/src/TApplication.cxx:273
#7 0x00007f1eeb7871dd in TBrowser::TBrowser (this=0x1ececc0, name=0x400d4d "Browser", title=0x400d39 "ROOT Object Browser", extimp=0x0, opt=0x400d38 "") at /opt/root/core/base/src/TBrowser.cxx:97
#8 0x0000000000400b67 in main () at /home/mrw/Files/各种学习/各种毕业设计/各种测试/MyROOTTest/main.cpp:19
===========================================================
The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug report at
http://root.cern.ch/bugs. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#6 TApplication::InitializeGraphics (this=0x0) at /opt/root/core/base/src/TApplication.cxx:273
#7 0x00007f1eeb7871dd in TBrowser::TBrowser (this=0x1ececc0, name=0x400d4d "Browser", title=0x400d39 "ROOT Object Browser", extimp=0x0, opt=0x400d38 "") at /opt/root/core/base/src/TBrowser.cxx:97
#8 0x0000000000400b67 in main () at /home/mrw/Files/各种学习/各种毕业设计/各种测试/MyROOTTest/main.cpp:19
===========================================================
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)