Bug 404436 - ktouch crashes on start without bringing up the UI
Summary: ktouch crashes on start without bringing up the UI
Status: RESOLVED NOT A BUG
Alias: None
Product: ktouch
Classification: Applications
Component: general (other bugs)
Version First Reported In: 18.12.2
Platform: FreeBSD Ports FreeBSD
: NOR crash
Target Milestone: ---
Assignee: Sebastian Gottfried
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-16 11:48 UTC by Matthias Apitz
Modified: 2019-02-17 09:51 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Apitz 2019-02-16 11:48:28 UTC
SUMMARY
I compiled FreeBSD OS and ports collection out of SVN from around December 20, 2018. The trainer "ktouch" crashes on start:

$ ktouch -v
QSqlDatabase: QSQLITE driver not loaded
QSqlDatabase: available drivers: 
"Driver not loaded Driver not loaded"
ktouch 18.12.0
$ ktouch 
QSqlDatabase: QSQLITE driver not loaded
QSqlDatabase: available drivers: 
"Driver not loaded Driver not loaded"
libGL error: failed to open drm device: Permission denied
libGL error: failed to load driver: i965
qCoreApp Application(0x7fffffffe450)
qrc:/qml/main.qml:129:5: Type HomeScreen unavailable
qrc:/qml/homescreen/HomeScreen.qml:20:1: module "QtQuick.Controls" is not installed
Segmentation fault (core dumped)



STEPS TO REPRODUCE
1. login 
2. start xterm
3. start ktouch as seen above

OBSERVED RESULT
crash

EXPECTED RESULT
UI

SOFTWARE/OS VERSIONS
FreeBSD: FreeBSD 13.0-CURRENT GENERIC  amd64
KDE Frameworks Version: 4.13.3
Qt Version: qt5 5.12.0

ADDITIONAL INFORMATION
Comment 1 Sebastian Gottfried 2019-02-16 15:01:25 UTC
Hello Matthias,

I never tried to run KTouch on FreeBSD, but it seems you have installed Qt without the Qt Quick Controls. This is mandatory runtime dependency of KTouch.

Maybe you are also missing the Qt SQLite driver, which is also required, but this not the cause of this particular crash.

You probably want to check you USE flags.
Comment 2 Matthias Apitz 2019-02-16 16:05:03 UTC
Hello Sebastian, I installed in addition:

# pkg install qt5-quickcontrols
# pkg install qt5-quickcontrols2
# pkg install qt5-sqldrivers-sqlite3

(which is a bug in this port if it is not done as runtime dependency)

now the messages are only:

$ ktouch
libGL error: failed to open drm device: Permission denied
libGL error: failed to load driver: i965
qCoreApp Application(0x7fffffffe4c0)
qrc:/qml/main.qml:129:5: Type HomeScreen unavailable
qrc:/qml/homescreen/HomeScreen.qml:125:13: Type CourseSelector unavailable
qrc:/qml/homescreen/CourseSelector.qml:194:13: Type CoursePage unavailable
qrc:/qml/homescreen/CoursePage.qml:70:5: Type LessonSelector unavailable
qrc:/qml/homescreen/LessonSelector.qml:89:5: Type LessonSelectorBase unavailable
qrc:/qml/homescreen/LessonSelectorBase.qml:60:13: Type LessonLockedNotice unavailable
qrc:/qml/homescreen/LessonLockedNotice.qml:22:1: module "QtGraphicalEffects" is not installed
Comment 3 Sebastian Gottfried 2019-02-16 17:10:23 UTC
Hi Matthias,

> (which is a bug in this port if it is not done as runtime dependency)
yes, but not mine. KDE only provides source tarballs. It's the responsibility of the FreeBSD packagers to get the packaging right.


> libGL error: failed to open drm device: Permission denied
> libGL error: failed to load driver: i965
You need to have permissions to access your graphics accelerator. On Linux you would have to be a member of the 'video' group.

> qCoreApp Application(0x7fffffffe4c0)
> qrc:/qml/main.qml:129:5: Type HomeScreen unavailable
> qrc:/qml/homescreen/HomeScreen.qml:125:13: Type CourseSelector unavailable
> qrc:/qml/homescreen/CourseSelector.qml:194:13: Type CoursePage unavailable
> qrc:/qml/homescreen/CoursePage.qml:70:5: Type LessonSelector unavailable
> qrc:/qml/homescreen/LessonSelector.qml:89:5: Type LessonSelectorBase
> unavailable
> qrc:/qml/homescreen/LessonSelectorBase.qml:60:13: Type LessonLockedNotice
> unavailable
> qrc:/qml/homescreen/LessonLockedNotice.qml:22:1: module "QtGraphicalEffects"
> is not installed
You need qt5-graphicaleffects as well.
Comment 4 Matthias Apitz 2019-02-16 17:53:04 UTC
The permission problem went away after adding 'video' as group to the account. The pkg  qt5-graphicaleffects was there:

$ id
uid=1001(guru) gid=0(wheel) groups=0(wheel),44(video)
$ export LIBGL_DEBUG=verbose 
$ ktouch
libGL: OpenDriver: trying /usr/local/lib/dri/i965_dri.so
libGL: Can't open configuration file /home/guru/.drirc: No such file or directory.
libGL: Can't open configuration file /home/guru/.drirc: No such file or directory.
libGL: Using DRI2 for screen 0
libGL: Can't open configuration file /home/guru/.drirc: No such file or directory.
qCoreApp Application(0x7fffffffe430)
qrc:/qml/main.qml:129:5: Type HomeScreen unavailable
qrc:/qml/homescreen/HomeScreen.qml:162:26: Type ProfileSelector unavailable
qrc:/qml/homescreen/ProfileSelector.qml:92:13: Type ProfileDetailsItem unavailable
qrc:/qml/homescreen/ProfileDetailsItem.qml:23:1: module "org.kde.charts" is not installed
$ pkg info | grep qt5-graphicaleffects
qt5-graphicaleffects-5.12.0    Qt Quick graphical effects

It seems there is another KDE pkg missing: kqtquickcharts-kde4, compiling now ...
Comment 5 Matthias Apitz 2019-02-16 18:59:26 UTC
This didn't help. Monitoring the ktouch start with truss (like Linux strace) shows what it is missing:

$ grep org/kde/charts tr
fstatat(AT_FDCWD,"/usr/local/bin/org/kde/charts.0.1",0x7fffdf9fa340,0x0) ERR#2 'No such file or directory'
fstatat(AT_FDCWD,"/usr/local/lib/qt5/qml/org/kde/charts.0.1",0x7fffdf9fa340,0x0) ERR#2 'No such file or directory'
fstatat(AT_FDCWD,"/usr/local/bin/org/kde/charts.0",0x7fffdf9fa340,0x0) ERR#2 'No such file or directory'
fstatat(AT_FDCWD,"/usr/local/lib/qt5/qml/org/kde/charts.0",0x7fffdf9fa340,0x0) ERR#2 'No such file or directory'
fstatat(AT_FDCWD,"/usr/local/bin/org/kde/charts",0x7fffdf9fa340,0x0) ERR#2 'No such file or directory'
fstatat(AT_FDCWD,"/usr/local/lib/qt5/qml/org/kde/charts",0x7fffdf9fa340,0x0) ERR#2 'No such file or directory'

The charts subdir isn't there and I don't know which pkg should provide it:
 
$ ls -l /usr/local/lib/qt5/qml/org/kde/
total 44
drwxr-xr-x  2 root  wheel  512 16 feb.  09:05 draganddrop
drwxr-xr-x  2 root  wheel  512 16 feb.  09:05 kcm
drwxr-xr-x  2 root  wheel  512 16 feb.  09:05 kconfig
drwxr-xr-x  2 root  wheel  512 16 feb.  09:05 kcoreaddons
drwxr-xr-x  2 root  wheel  512 16 feb.  09:05 kio
drwxr-xr-x  2 root  wheel  512 16 feb.  09:05 kquickcontrols
drwxr-xr-x  2 root  wheel  512 16 feb.  09:05 kquickcontrolsaddons
drwxr-xr-x  2 root  wheel  512 16 feb.  09:05 kwindowsystem
drwxr-xr-x  3 root  wheel  512 16 feb.  09:06 newstuff
drwxr-xr-x  3 root  wheel  512 16 feb.  09:05 private
drwxr-xr-x  2 root  wheel  512 16 feb.  09:05 solid
Comment 6 Sebastian Gottfried 2019-02-16 19:17:49 UTC
Hi Matthias

> The charts subdir isn't there and I don't know which pkg should provide it:
In KDE it is an independent component part of the KDE Edu suite: 
kqtquickcharts.
Comment 7 Matthias Apitz 2019-02-17 03:52:53 UTC
I've built KDE Edu again, this creates among other packages one with the name kqtquickcharts-kde4-4.14.3_3.txz which contains:

# tar tzf kqtquickcharts-kde4-4.14.3_3.txz
+COMPACT_MANIFEST
+MANIFEST
/usr/local/lib/kde4/imports/org/kde/charts/BarChart.qml
/usr/local/lib/kde4/imports/org/kde/charts/Label.qml
/usr/local/lib/kde4/imports/org/kde/charts/LegendItem.qml
/usr/local/lib/kde4/imports/org/kde/charts/LineChart.qml
/usr/local/lib/kde4/imports/org/kde/charts/LineLabel.qml
/usr/local/lib/kde4/imports/org/kde/charts/libkqtquickcharts.so
/usr/local/lib/kde4/imports/org/kde/charts/qmldir


i.e. not in the place where ktouch looks up the files.
Comment 8 Sebastian Gottfried 2019-02-17 09:17:53 UTC
> I've built KDE Edu again, this creates among other packages one with the
> name kqtquickcharts-kde4-4.14.3_3.txz which contains:
This is old KDE 4.x version of KDE Edu. You need the new KF5-based one.
Comment 9 Matthias Apitz 2019-02-17 09:51:57 UTC
Thanks, your last comment pointed me in the right direction. The FreeBSD ports tree contains for KDE the version 4 and 5 and as I'm still using KDE4 I must install misc/ktouch-kde4 and not misc/ktouch. All is fine for now.

Thanks,