Closed szpeter80 closed 2 years ago
Tried in a new directory with venv, the crash does not happen. But Webkit renderer is not available (greyed out), and that is much needed for complex CSS styled HTML output, which cannot be rendered (colors / fonts gone, some borders are rendered incorrectly etc) by the default renderer.
Hi!
I just checked on Ubuntu 22.04 installation and ReText from official repos, and I cannot reproduce this. Does it happen with any file or only with some specific one? Does it matter with any search term, or it happens only with ???
?
Can you help me debug this by running python3 /usr/bin/retext
in gdb and obtaining a stack trace? I will give you more details if you can.
Tried in a new directory with venv, the crash does not happen. But Webkit renderer is not available (greyed out)
Run pip install PyQtWebEngine
, it will make a similar Qt WebEngine renderer available.
Sorry for late reply, it was a busy few days...
Updated the venv to latest packages and installed the PyQtWebEngine
package - live preview now selectable but the output is blank white.
Did some experiments to help it narrow down:
I can try the gdb method, can you give some pointers how to properly do that?
Updated the venv to latest packages and installed the PyQtWebEngine package - live preview now selectable but the output is blank white.
Please check for errors in terminal. If it says that it can't find QtWebEngineProcess, then setting QTWEBENGINEPROCESS_PATH may help. But then it's a bug in PyQt, not ReText.
the crash happens at a specific part of the document
Does it still happen if you remove everything except that part? Can you share that part with me? Please attach it here or send it to mitya57@gmail.com.
I can try the gdb method, can you give some pointers how to properly do that?
If you can share the document then maybe I will reproduce it itself and debugging it on your side won't be needed. Anyway, here is an instruction:
sudo apt install python3-dbg libqt5core5a-dbgsym libqt5gui5-dbgsym libqt5widgets5-dbgsym libqt5webkit5-dbgsym python3-pyqt5-dbgsym
.gdb python3
.run /usr/bin/retext
.bt
(same as backtrace
).The document contains a lot of personal and sensitive data, i tried to make an anonimized version, but changing it makes the crash disappear. I noticed that the crash happens if i freshly open Retext, and the search for ?? is the first action. If i mess around (scroll, switch to other tab, edit etc), the crash is not happening with the same document.
I did the backtrace, hope it helps.
I dont know if it matters, but the document has embedded CSS
It is helpful, thank you very much! I will look in the next few days.
Sorry for the delay in reply. I looked at this a couple of weeks ago, but did not figure out much. Today I looked again, and now I at least understand what the Qt code that crashes is supposed to do.
My hypothesis is that it's related to highlighting of current line. And I have a few more questions.
???
part you were searching for?I don't want to take much of your time, but if you have some time, maybe you can also try the version from master branch? It was ported to Qt 6, so it would be nice to know if this bug is fixed in Qt 6.
Here is how you can test it on Ubuntu:
sudo apt install git virtualenvwrapper
. /usr/share/virtualenvwrapper/virtualenvwrapper.sh
mkvirtualenv retext
pip install git+https://github.com/retext-project/retext.git
retext
to launch the installed version.I have just tested with master, and i am not able to trigger the problem anymore. As a check, it still trigger with the version installed from packages, so the still document has the cause.
As this bug is a very edge case and not present in the current master, i propose to close this with something like "fixed upstream" or so. And thanks for your efforts!
Ok, thank you again! I will try to make a new release soon.
Installed from Ubuntu ("Ubuntu 22.04 LTS") official repo, package is
retext/jammy,jammy,now 7.2.3-1 all [installed]
, python isPython 3.10.4
Searching for '???' in the markdown pane, makes the program to crash. It is repeatable, happens all the time. The source do contain the term '???', it does not affect (no crash, no glitch observed) rendering of the preview or html.
Is something broken in my system or it is a ReText bug?
The error message is the following: