-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segfault when switching folders in file explorer #1083
Comments
Hello @scrubbbbs, thanks for reporting. Could you provide your system (windows?) and the version of nomacs? |
Could you specify which commit? Something like |
DkThumbNail::computeIntern() was being invoked with a QString reference, and was also referencing a member variable. Which made it non-reentrant and led to segfault in Qt string operations. This is corrected, in addition some refactoring is added to prevent this from happening again. - All params to lambda are copies (no "&" or "this" is passed) - computeIntern() is declared static - computeCall() has been dropped
DkThumbNail::computeIntern() was being invoked with a QString reference, and was also referencing a member variable. Which made it non-reentrant and led to segfault in Qt string operations. This is corrected, in addition some refactoring is added to prevent this from happening again. - All params to lambda are copies (no "&" or "this" is passed) - computeIntern() is declared static - computeCall() has been dropped
@scrubbbbs please add a |
Should be fixed by #1085. |
Thanks, I did not know that was possible. |
Nomacs segfaults when switching between two folders in the file explorer before allowing them to finishing thumbnailing. It doesn't always happen but only takes me a few tries.
It seems like DkThumbNail::computeIntern() is always on the stack so I guess this is a race or double-free on the
const QString& fileName
parameter since it tends to be passed to some function that segfaults (which varies). The problem might be the assumption that QString is thread-safe, in which case the solution could be to give each thread a copy.I think its a known bug in hibernation since there is a comment in DkThumbNail::computeIntern() about a crash though no specific details are mentioned.
Here's a couple of stack traces; both in different places but the QString filename is involved in both places.
This is Linux, git master 6dfc779. I can also confirm on 3.17.2206 Ubuntu package.
The text was updated successfully, but these errors were encountered: