Summary: | DJVU thumbnailer crashes kdeinit | ||
---|---|---|---|
Product: | [Frameworks and Libraries] kio-extras | Reporter: | Ilya Bizyaev <bizyaev> |
Component: | Thumbnails and previews | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | kde, mirchevmartin2203, norbert |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/network/kio-extras/commit/015a265d32bc216d198410f11d63cbf84245c124 | Version Fixed In: | |
Attachments: | attachment-28567-0.html |
Description
Ilya Bizyaev
2020-04-14 09:44:45 UTC
Calls
> exit(1);
But this is the child process.
*** Bug 420542 has been marked as a duplicate of this bug. *** I just realized that this is simply because `ddjvu` the program is not available. This means that in the pid==0 case the execvp fails and drops down to the exit(1). On my system, where I had the same problem, a simple installation of djvulibre-bin package fixed the crashes. Created attachment 131689 [details] attachment-28567-0.html Okay, so this means it can be added as general info for the tooltip right? On Tue, Sep 15, 2020, 18:00 Norbert Preining <bugzilla_noreply@kde.org> wrote: > https://bugs.kde.org/show_bug.cgi?id=420074 > > Norbert Preining <norbert@preining.info> changed: > > What |Removed |Added > > ---------------------------------------------------------------------------- > CC| |norbert@preining.info > > --- Comment #3 from Norbert Preining <norbert@preining.info> --- > I just realized that this is simply because `ddjvu` the program is not > available. This means that in the pid==0 case the execvp fails and drops > down > to the exit(1). > > On my system, where I had the same problem, a simple installation of > djvulibre-bin package fixed the crashes. > > -- > You are receiving this mail because: > You are on the CC list for the bug. (In reply to Martin Mirchev from comment #4) > Okay, so this means it can be added as general info for the tooltip right? Not sure what you mean with "tooltip", I see two options: - either make ddjvu binary a hard dependency via CMakeFile - fix the code that it does not crash (not call exit) if ddjvu is not available Both are possible solutions, but the current state is sub-optimal. Sorry, making it a dependency would be a best option but I do not really know how many people use Djvu these days so it may come as extra bloat for some people. On 9/16/20 8:32 AM, Norbert Preining wrote: > https://bugs.kde.org/show_bug.cgi?id=420074 > > --- Comment #5 from Norbert Preining <norbert@preining.info> --- > (In reply to Martin Mirchev from comment #4) >> Okay, so this means it can be added as general info for the tooltip right? > Not sure what you mean with "tooltip", I see two options: > > - either make ddjvu binary a hard dependency via CMakeFile > - fix the code that it does not crash (not call exit) if ddjvu is not available > > Both are possible solutions, but the current state is sub-optimal. > (In reply to Martin Mirchev from comment #6) > Sorry, making it a dependency would be a best option but I do not really > know how many people use Djvu these days so it may come as extra bloat > for some people. Well, the correct solution is to use _exit(1); instead of exit(1); because the normal exit(1) triggers the atexit registered functions to be executed, and that is not what we want (and crashed kdeinit5). I can confirm that with _exit(1) instead all works as expected - just that there are no thumbnails available, well, also this is expected. Okay, that is nice. Well all is good, I assume you can close the issue. Hope I helped On 9/16/20 9:25 AM, Norbert Preining wrote: > https://bugs.kde.org/show_bug.cgi?id=420074 > > --- Comment #7 from Norbert Preining <norbert@preining.info> --- > (In reply to Martin Mirchev from comment #6) >> Sorry, making it a dependency would be a best option but I do not really >> know how many people use Djvu these days so it may come as extra bloat >> for some people. > Well, the correct solution is to use > _exit(1); > instead of > exit(1); > because the normal exit(1) triggers the atexit registered functions to be > executed, and that is not what we want (and crashed kdeinit5). > > I can confirm that with _exit(1) instead all works as expected - just that > there are no thumbnails available, well, also this is expected. > Ok, I sent a merge request for this code. When it is merged, this bug can be closed, but for now it is still valid. A possibly relevant merge request was started @ https://invent.kde.org/network/kio-extras/-/merge_requests/30 Git commit 015a265d32bc216d198410f11d63cbf84245c124 by Stefan Brüns. Committed on 22/09/2020 at 13:49. Pushed by bruns into branch 'master'. [DjvuThumbnailer] Replace open coded ddjvu invocation with QProcess This also fixes a kdeinit crash due to calling exit(1) in case execvp failed (e.g. due to a missing ddjvu binary). M +5 -0 thumbnail/CMakeLists.txt M +29 -107 thumbnail/djvucreator.cpp M +5 -20 thumbnail/djvucreator.h https://invent.kde.org/network/kio-extras/commit/015a265d32bc216d198410f11d63cbf84245c124 |