GNU TeXmacs - Bugs: bug #60931, qtpipe issue with Qt 5.15.x ->...
You are not allowed to post comments on this tracker with your current authentication level.
bug #60931: qtpipe issue with Qt 5.15.x -> external plugins cause segfault
Submitter: | zongtao wang <wztdream> | ||
Submitted: | Sat 17 Jul 2021 04:50:17 PM UTC | ||
Category: | Editor | Priority: | 9 - Immediate |
Item Group: | Error | Status: | Need Info |
Privacy: | Public | Assigned to: | vdhoeven |
Originator Name: | Open/Closed: | Open | |
Release: | None | Release: | |
Fixed Release: | None | Fixed Release: | |
Keywords: |
( Jump to the original submission )
Thu 10 Nov 2022 06:22:08 PM UTC, comment #10: |
Philippe Joyez <pjoyez>![]() |
Sun 06 Nov 2022 09:50:17 PM UTC, comment #9: Could you please investigate with which versions of Qt you have this problem.
I tried with Qt 5.9.9 and did not experience any problems.
|
Joris van der Hoeven <vdhoeven>![]() ![]() |
Fri 29 Jul 2022 11:44:50 AM UTC, comment #8: I can successfully compile and use plugins when compiling with cmake (on Fedora with Qt 5.15.5 and on Debian with Qt 5.15.2). I only get this segfault when using autotools (configure). |
Jeroen Wouters <jeronim>![]() |
Sun 12 Dec 2021 03:24:45 PM UTC, comment #7: The proposed fix is to modify the configure script so that it disables qtpipes when Qt version is 5.15. However, I'm not skilled enough with m4 to propose a patch.
I changed again the summary to make clear it's not only a spellchecker issue |
Philippe Joyez <pjoyez>![]() |
Thu 16 Sep 2021 07:10:26 AM UTC, comment #6: Unsurprisingly, this bug also affects interactive sessions (bug 61163). |
Philippe Joyez <pjoyez>![]() |
Tue 27 Jul 2021 11:50:58 AM UTC, comment #5: In Suse's Open Build Service I have build AppImages based on Leap 42.3 (Qt 5.6) and Leap 15.2 (Qt 5.12) and in both, spell checking works fine (even without #3 patch).
Actually, ahead of qt6 release, there was a change in qprocess_unix.cpp in the area where the issue occurs and which refers to QTBUG-86285 (https://github.com/qt/qtbase/commit/2ed99ff5ca338ac02f71c347b1449d4662e6c221). And the lines that are changed in that commit had been introduced in Qt 5.15. So it's likely only Qt 5.15 that has an issue, and for which we need a workaround.
I change the summary from "spell check trigger segmentation fault error for ubuntu .deb version" to "spell check trigger segmentation fault error with Qt 5.15.x" |
Philippe Joyez <pjoyez>![]() |
Sun 25 Jul 2021 04:34:55 PM UTC, comment #4: A possible workaround for the Qt5 issue is to disable qt pipes (e.g. configure with --disable-qtpipes)
This requires to adjust in socket_notifier.cpp :
#ifndef QTTEXMACS -> #if !(defined (QTTEXMACS) && defined (QTPIPES))
Tested to give functional spellcheck. |
Philippe Joyez <pjoyez>![]() |
Sun 25 Jul 2021 02:39:02 PM UTC, comment #3: I could make the qt6 version to spellcheck correctly with the following patch:
--- /A/QTMPipeLink.cpp
However, with this patch the qt5 version still segfaults in Qt, just as in the previous comment. After installing libqt5core5a-dbgsym, gdb says the segfault is at line 461 of https://github.com/qt/qtbase/blob/5.15.2/src/corelib/io/qprocess_unix.cpp (I'm using the current Qt 5.15.2+dfsg-9 official Debian Bullseye build; there is no debian patch on this file) which, surprisingly, is an innoccuous assignment. Nevertheless, when setting up a break point close to the segfault, the program seemingly execs line 462 before 461 (see below)! I do not understand what is wrong nor why gdb gives weird inconsistent info, but most likely the crash is not really occuring at line 461. In any case I presently do not see what to do to solve the issue. Since it works fine in qt6, it could be a qt5 bug for which we would have to find a workaround...
Below I had set the break point at line 461 (I'm sure of that) and gdb first stops saying the break point is at 462. Then, when you step with "n" it says a segfault occurs at line 461...
Thread 1 "texmacs.bin" hit Breakpoint 1, QProcessPrivate::startProcess (
Thread 1 "texmacs.bin" received signal SIGSEGV, Segmentation fault.
|
Philippe Joyez <pjoyez>![]() |
Thu 22 Jul 2021 09:25:16 AM UTC, comment #2: By comparing
the problem seems that qt5 no longer accepts a single string containing the program and its arguments in start(). |
Philippe Joyez <pjoyez>![]() |
Thu 22 Jul 2021 09:00:07 AM UTC, comment #1: I confirm the issue. There seems to be a problem with Qt pipes when using Qt>=5 (which the xUbuntu_20.04 package uses). I believe the static package still uses Qt4.
With a Qt5 build, on Debian 11:
TeXmacs] debug-shell, Launching 'hunspell -a -i utf-8 -d en_US'
Thread 1 "texmacs.bin" received signal SIGSEGV, Segmentation fault.
It's broken too with a Qt6 build, but not as badly:
(ran with --debug-io)
Both hunspell and aspell are installed on my system and there is no error when launching "hunspell -a -i utf-8 -d en_US" or "aspell -a --encoding=utf-8 --language-tag=en_US" in a console (they wait for input). |
Philippe Joyez <pjoyez>![]() |
Sat 17 Jul 2021 04:50:17 PM UTC, original submission:
Hi,
I installed texmacs from [here](https://www.texmacs.org/tmweb/download/linux-packages.en.html#ubuntu), and use **TeXmacs package for xUbuntu_20.04 with a 64 bits Intel/AMD processor**
But if I try to spell check the document, will trigger below error and spell check not work.
I have installed aspell and it works correctly.
I re-installed the static binary version and it works fine. So it seems there is bug for the ubuntu .deb version.
```
System information:
Editor status:
Backtrace of C++ stack:
-------------------------------------------------
|
zongtao wang <wztdream> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 9 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2022-11-06 | vdhoeven | Priority | 7 - High | ![]() |
9 - Immediate |
Assigned to | None | ![]() |
vdhoeven | ||
2022-11-06 | vdhoeven | Priority | 5 - Normal | ![]() |
7 - High |
Status | Confirmed | ![]() |
Need Info | ||
Assigned to | _86389 | ![]() |
None | ||
2021-12-12 | pjoyez | Summary | spell check trigger segmentation fault error with Qt 5.15.x | ![]() |
qtpipe issue with Qt 5.15.x -> external plugins cause segfault |
2021-11-10 | vdhoeven | Assigned to | None | ![]() |
_86389 |
2021-07-27 | pjoyez | Summary | spell check trigger segmentation fault error for ubuntu .deb version | ![]() |
spell check trigger segmentation fault error with Qt 5.15.x |
2021-07-22 | pjoyez | Status | None | ![]() |
Confirmed |
Yes, see my comment #5: most likely it affects only Qt 5.15.x, not before, nor after. Alas, most linux distros currently use this last Qt 5 version.
Also Jeroen's finding is really strange since it points to a build configuration issue, but this is black magic for me.