Summary: | kgraphviewer crashes when loading file | ||
---|---|---|---|
Product: | [Applications] kgraphviewer | Reporter: | Lova <lova> |
Component: | general | Assignee: | Gaël de Chalendar (aka Kleag) <kleagg> |
Status: | RESOLVED DOWNSTREAM | ||
Severity: | crash | CC: | gszymaszek |
Priority: | NOR | Keywords: | drkonqi |
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | file that crashes kgraphview |
Description
Lova
2022-11-27 20:18:49 UTC
Created attachment 154092 [details]
file that crashes kgraphview
I cannot reproduce the bug using the attached file on kgraphviewer 2.4.3 built from current master, commit 2347c7de3fba1789a5b7138afe4989b1e55c3062. Distribution: Debian bookworm Qt Version: 5.15.6 Frameworks Version: 5.101.0 Operating System: Linux (from Debian package linux-image-6.0.0-6-amd64 6.0.12-1) Windowing System: Wayland (Sway, from Debian package sway 1.7-6) I can still reproduce it. Will try building kgraphviewer from your commit and report back. Ok, so I can confirm that the build from the commit you provided does not crash. Compiling using the source for https://download.kde.org/stable/kgraphviewer/2.4.3/kgraphviewer-2.4.3.tar.xz however, which is the version that Arch uses for its package, does crash. Therefore, I believe it's safe to assume that this issue has been fixed at some point in master :) I’m afraid I’m still unable to reproduce it here. I’ve tried both the linked tarball and the source from git tag v2.4.3, but neither of them wants to crash. Could you try to bisect git commits between the tag and the current master to find out which one possibly fixed the problem? Ok, the plot thickens. I realized that the reason why one build (your commit) worked, while the other did not, was the fact that the one I built from the tarball, I had issued "make install" for. This meant that the library and the binary got separated into bin and lib respectively, and I was running the binary from the locally installed bin directory without setting LD_LIBRARY_PATH, and thus it was picking up the globally installed libkgraphviewer.so.2.4.3. In the case of the master build, I was simply running the binary from the bin folder in the build directory, which apparently bundles all cmake target outputs together. So I tried setting LD_LIBRARY_PATH manually to force the built libkgraphviewer.so.2.4.3 to be used... and then both master and even the 2.4.3 tarball worked. Manually copying my built libkgraphviewer.so.2.4.3 to /usr/lib also allowed my installed kgraphviewer to work. I figured it must be something with the way Arch builds the package, but the PKGBUILD could not be any simpler: https://raw.githubusercontent.com/archlinux/svntogit-community/packages/kgraphviewer/trunk/PKGBUILD My next idea was the compiler flags. I checked /etc/makepkg, which sets the following global CXXFLAGS: -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS Compiling with these flags did not make a difference. I could still not get kgraphviewer to crash. Finally, I downloaded the PKGBUILD and ran makepkg manually, and installed my manually built package, just in case there would be something in the makepkg process that sets any flags that I am not aware of. Guess what? It worked wonderfully, no crash at all. So right now, it *seems* like the package on the Arch package mirrors for some reason has this crash. But compiling the source myself from the very same PKGBUILD does not yield the problem. I imagine that this is some kind of downstream problem, so I will report it to Arch Linux instead. I’ve checked a few build scripts of other CMake-based programs (kquickimageeditor, plasma-pass, qgis), and the build() and package() functions are written in a quite different way; but I’m not sure which one is better. Could you try to compare the contents of the Arch package and the one you’ve built? Perhaps the build environment, ie the libraries available and their versions make the difference, perhaps you should build it in a fresh chroot that has only those dependencies the Arch-package-building-software deems necessary. I created a bug report at https://bugs.archlinux.org/task/76957 and the package has now been rebuilt, fixing the issue. I will close this :) |