After successful compilation of Qt terminal, I'm unable to use it. It all works fine until:
QtGnuplotApplication application(argc, (char**)( NULL));
in qt_term.cpp.
Since I'm not sure how to debug, I was using printf, but printf between
QtGnuplotApplication application(argc, (char**)( NULL));
and
QApplication* application = new QApplication(argc, (char**)( NULL));
doesn't output anything (even though a single time it did output one single printf just in front of the last command).
Usually gdb doesn't return anything useful. One time it did return this:
Terminal type set to 'qt'
gnuplot> plot sin(x)
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
Reading symbols for shared libraries . done
Program received signal SIGTRAP, Trace/breakpoint trap.
0x00007fff5fc01ef1 in __dyld__ZN4dyldL14clearAllDepthsEv ()
(gdb) backtrace
#0 0x00007fff5fc01ef1 in __dyld__ZN4dyldL14clearAllDepthsEv ()
#1 0x00007fff5fc0de85 in __dyld__ZN11ImageLoader4linkERKNS_11LinkContextEbbRKNS_10RPathChainE ()
#2 0x00007fff5fc05681 in __dyld__ZN4dyld4linkEP11ImageLoaderbRKNS0_10RPathChainE ()
#3 0x00007fff5fc09575 in __dyld_dlopen ()
#4 0x00007fff8d8dc95b in dlopen ()
#5 0x00007fff8a7b8109 in __CFLookupCoreServicesInternalFunction ()
#6 0x00007fff8a7e9ca0 in _CFURLGetCatalogInfo ()
#7 0x00007fff81bac3e3 in FSNodePrepareCatalogInfo ()
#8 0x00007fff81bac812 in _LSGetBundleClassForNode ()
#9 0x00007fff81bad2fd in _LSFindOrRegisterBundleNode ()
#10 0x00007fff81bb1459 in _LSRegisterSelf ()
#11 0x00007fff81bb033a in _LSApplicationCheckIn ()
#12 0x00007fff83607446 in _RegisterApplication ()
#13 0x00007fff83605d8d in GetCurrentProcess ()
#14 0x000000010238de53 in qt_init ()
#15 0x00000001023fdeea in QApplicationPrivate::construct ()
#16 0x00000001023fed1d in QApplication::QApplication ()
#17 0x000000010010a047 in qt_init () at qt_term.cpp:290
#18 0x00000001000e44ff in term_initialise () at term.c:537
#19 0x0000000100037180 in do_plot (plots=0x7fff5fbfed30, pcount=1606413616) at graphics.c:1610
#20 0x0000000100062a32 in eval_plots () at plot2d.c:2938
#21 0x000000010000d64f in command [inlined] () at /Users/mojca/app/gnuplot/gnuplot-new/src/command.c:604
#22 0x000000010000d64f in do_line () at command.c:403
#23 0x000000010000e581 in com_line () at command.c:327
#24 0x00000001000579c5 in main (argc=1, argv=0x7fff5fbff520) at plot.c:655
(gdb)
but it might be just a coincidence. I assume that something goes wrong with forking and thus a new thread works in a not-exactly-predictable-and-reproducible way.
PS: When is the following object destroyed?
QApplication* application = new QApplication(argc, (char**)( NULL));
Crash report