Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#935 OSX: QProcess killed during compilation

None
fixed
nobody
None
1
2014-06-29
2014-03-19
Anonymous
No

I have the following problem:

I have a rather large tex file to compile, including pgfplots, which take a while to compile, when using no externalize function. I switched from Windows with Miktex to a Mac with TexLive. When I start the compilation with

/usr/texbin/pdflatex -shell-escape -output-directory=build -synctex=1 -interaction=nonstopmode %.tex

it works fine. When I start the compilation within Texstudio (F1), it compiles, when I comment parts of the file, no matter which one it is. However, when the compilation takes too long (mostly after exactly 30s), the compilation crashes, leaving the .aux and the .log unfinished, but without any error message. When I start texstudio from the command line and compile with F1, the error

QProcess: Destroyed while process ("/usr/texbin/pdflatex") is still running.

is printed in the terminal. Some research brought me to the function waitForFinished(), which apparently has a timeout after 30s. Searching for that function in the texstudio folder with grep gave no result.

Has anyone of you got a clue why this is happening and how to stop it? I don't give a minimum working example, since the file compiles alright in the terminal and also from texstudio, when commenting some part of it, no matter which.

Since I found no other way to upload an example, I re-submitted the the ticket.

1 Attachments

Discussion

  • Where did you define the command? As user or quickbuild command?

    It does not seem to consider it a latex command. (as is does for "pdflatex" or "compile"). The names of all latex commands are listed in the texstudio.ini under the Tools\Kind\LaTeX key

     
  • Jakob
    Jakob
    2014-03-21

    I use F1, so quick build and view, which is defined as

    txs:///compile | txs:///bibtex | txs:///view

    where the standard compiler is

    txs:///pdflatex

    and the command for that is

    /usr/texbin/pdflatex -shell-escape -output-directory=build -synctex=1 -interaction=nonstopmode %.tex

    To be honest, I don't quite get what you mean by "it does not considere a latex command". It compiles alright, when the tex file is short enough (in terms of compilation time). Just if there are too many 3D pgf, which need to be recompiled, it chrashes, even though it works for each one individually.

     
  • That looks all correct

    What does it list in texstudio.ini in the Tools\Kind\LaTeX key?

    Can you compile it from source to test some stuff?

    it does not considere a latex command".

    If you call a latex command, it waits till the command has stopped and shows the log afterwards

    If you call a non-latex command, it kills it after 30s

     
  • Jakob
    Jakob
    2014-03-28

    I would love to do so, but compilation fails. Any ideas on that:

    TeXstudio compilation :

    Darwin
    -n Enter SYSTEM (1: UNIX ; 2: MACOSX)
    (default is 2) :

    -n Enter path to QT4 (e.g. /usr/lib/qt4, you can leave it empty if qmake is in PATH)
    (default is /usr/local) :

    -n Do you want to use the internal pdf viewer (requires the Poppler library)? (yes/no)
    (default is yes) :

    -n Do you want to use the video player in pdf files (requires the Phonon library)? (yes/no)
    (default is no) :

    -n Do you want to build a debug or release version?
    (default is debug) :

    -n Do you want to include tests in the debug build? (yes/no)
    (default is yes) :

    readlink: illegal option -- f
    usage: readlink [-n] [file ...]
    Starting compilation
    dyld: Symbol not found: __cg_jpeg_resync_to_restart
    Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
    Expected in: /usr/local/lib/libJPEG.dylib
    in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
    BUILD.sh: line 115: 25133 Trace/BPT trap: 5 $QMAKE -macx -spec macx-g++ $TXSCOMPILEOPTIONS texstudio.pro
    clang++ -c -Xclang -include-pch -Xclang .obj/texstudio/c++.pch -pipe -stdlib=libc++ -mmacosx-version-min=10.7 -g -Wall -Wextra -Winit-self -Wmissing-include-dirs -Wtrigraphs -Wunused -Wunknown-pragmas -Wundef -Wpointer-arith -Wwrite-strings -Wempty-body -Wsign-compare -Waddress -Winline -arch x86_64 -Wall -W -DHUNSPELL_STATIC -D_QCODE_EDIT_BUILD_ -DQNFA_BUILD -DQUAZIP_STATIC -DQT_TESTLIB_LIB -DQT_SCRIPT_LIB -DQT_SVG_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Cellar/qt/4.8.5/mkspecs/unsupported/macx-clang-libc++ -I. -I/usr/local/Cellar/qt/4.8.5/include/QtUiTools -I/usr/local/Cellar/qt/4.8.5/lib/QtCore.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/lib/QtCore.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/lib/QtNetwork.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/lib/QtNetwork.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/lib/QtGui.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/lib/QtGui.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/lib/QtXml.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/lib/QtXml.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/lib/QtSvg.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/lib/QtSvg.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/lib/QtScript.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/lib/QtScript.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/lib/QtTest.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/lib/QtTest.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/include -Iqtsingleapplication -Iqcodeedit/lib -Iqcodeedit/lib/document -Iqcodeedit/lib/widgets -Iqcodeedit/lib/qnfa -Iquazip/quazip -I/usr/local/Cellar/poppler/0.24.5_1/include/poppler/qt4 -I.moc -I.ui -F/usr/local/Cellar/qt/4.8.5/lib -o .obj/debughelper.o debughelper.cpp
    debughelper.cpp:651:19: error: use of undeclared identifier 'pthread_self'
    mainThreadID = pthread_self();
    ^
    1 error generated.
    make: *** [.obj/debughelper.o] Error 1

    clang++ -c -Xclang -include-pch -Xclang .obj/texstudio/c++.pch -pipe -stdlib=libc++ -mmacosx-version-min=10.7 -g -Wall -Wextra -Winit-self -Wmissing-include-dirs -Wtrigraphs -Wunused -Wunknown-pragmas -Wundef -Wpointer-arith -Wwrite-strings -Wempty-body -Wsign-compare -Waddress -Winline -arch x86_64 -Wall -W -DHUNSPELL_STATIC -D_QCODE_EDIT_BUILD_ -DQNFA_BUILD -DQUAZIP_STATIC -DQT_TESTLIB_LIB -DQT_SCRIPT_LIB -DQT_SVG_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Cellar/qt/4.8.5/mkspecs/unsupported/macx-clang-libc++ -I. -I/usr/local/Cellar/qt/4.8.5/include/QtUiTools -I/usr/local/Cellar/qt/4.8.5/lib/QtCore.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/lib/QtCore.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/lib/QtNetwork.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/lib/QtNetwork.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/lib/QtGui.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/lib/QtGui.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/lib/QtXml.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/lib/QtXml.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/lib/QtSvg.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/lib/QtSvg.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/lib/QtScript.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/lib/QtScript.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/lib/QtTest.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/lib/QtTest.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/include -Iqtsingleapplication -Iqcodeedit/lib -Iqcodeedit/lib/document -Iqcodeedit/lib/widgets -Iqcodeedit/lib/qnfa -Iquazip/quazip -I/usr/local/Cellar/poppler/0.24.5_1/include/poppler/qt4 -I.moc -I.ui -F/usr/local/Cellar/qt/4.8.5/lib -o .obj/debughelper.o debughelper.cpp
    debughelper.cpp:651:19: error: use of undeclared identifier 'pthread_self'
    mainThreadID = pthread_self();
    ^
    1 error generated.
    make: *** [.obj/debughelper.o] Error 1
    Compilation and installation done

     
  • The crash handler (that stops a crash and prints a backtrace instead) fails to compile. Perhaps it only works with gcc, not clang. Afair you can disable it with:

    ./BUILD.sh DEFINES+=NO_CRASH_HANDLER

     
  • Jakob
    Jakob
    2014-04-01

    Alright: When I comment the if in texstudio.pro in order to enforce DEFINES+=NO_CRASH_HANDLER, the compilation (in debug mode) runs through and the funny thing is: Without changing anything in the source code I can compile my whole dissertation, which did not work on the pre-compiled version. Furthermore, texstudio is still usable during compilation, while it freezes in the pre-compiled version (which is actually annoying). But the scaling of bottoms etc. changed quite a bit, so it looks quite ugly. Furhtermore, Mac's fullscreen mode works fine in the pre-compiled, while it is not available, when I compile it.
    The difference I can find: I compiled with QT 4.8.5, while you use 5.2.0. Any ideas, what is going on and how I could a version, that compiles and does not hurt my eyes?

     
    Last edit: Jakob 2014-04-05
  • Tim Hoffmann
    Tim Hoffmann
    2014-06-19

    Does it still happen with version 2.8?

     
  • Jakob
    Jakob
    2014-06-21

    Awesome, problem solved + texstudio responds during compilation! Thanks a lot for your effort!

     
  • Tim Hoffmann
    Tim Hoffmann
    2014-06-29

    • status: open --> fixed
    • Group: -->