Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] infinite loop in qt5 File Open or Save As dialog
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
ecko
Tux's lil' helper
Tux's lil' helper


Joined: 04 Jul 2010
Posts: 107

PostPosted: Sun Sep 15, 2024 9:59 pm    Post subject: [SOLVED] infinite loop in qt5 File Open or Save As dialog Reply with quote

For a month or two, whenever I open a qt5 application, File/Open and File/Save As dialogs hang on 100% (1 core) without any other option than killing the process.

For example it hangs designer5 but not designer6 (dev-qt/designer-5.15.14 vs. dev-qt/qttools-6.7.2)

It affects every qt5 application: cantor, kig, librecad, libreoffice[USE=kde], klayout, avidemux
but not those ported to qt6: spectacle, kwrite, freecad

Any idea of what I could do to get useful traces for the issue? When launching any of those under strace, there is no output during the hanging.


Last edited by ecko on Tue Sep 17, 2024 6:47 am; edited 2 times in total
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 9165

PostPosted: Mon Sep 16, 2024 7:16 am    Post subject: Reply with quote

What desktop environment, X11 or Wayland session, are you in? systemd or elogind?
Back to top
View user's profile Send private message
ecko
Tux's lil' helper
Tux's lil' helper


Joined: 04 Jul 2010
Posts: 107

PostPosted: Mon Sep 16, 2024 8:19 am    Post subject: Reply with quote

I use X11, fluxbox, elogind

Additional tests:
  • added "USE=debug" to qtcore, qtgui, qtwidgets. No particular useful output. Consistently using gcc-14.2.1_p20240817
  • played with qt5ct just in case the appearance (oxygen/breeze) would be a problem
  • upgraded to latest kernel (gentoo-sources-6.11.0)
Back to top
View user's profile Send private message
ecko
Tux's lil' helper
Tux's lil' helper


Joined: 04 Jul 2010
Posts: 107

PostPosted: Tue Sep 17, 2024 12:06 am    Post subject: Reply with quote

strace designer5 → the last thing it does before hanging is opening fonts. Though I don't know why it wants to open urw-fonts, qt5ct is configured to use Adobe Source Sans 3.

Code:
openat(AT_FDCWD, "/usr/share/fonts/urw-fonts/D050000L.ttf", O_RDONLY) = 15
fcntl(15, F_SETFD, FD_CLOEXEC)          = 0
fstat(15, {st_mode=S_IFREG|0644, st_size=37860, ...}) = 0
mmap(NULL, 37860, PROT_READ, MAP_PRIVATE, 15, 0) = 0x7f91dfe20000
close(15)                               = 0


After recompiling for debug (FEATURES="keeptemp keepwork installsources nostrip" CFLAGS="-Og -ggdb3 -pipe" USE="debug")

Code:
gdb -r kig
run
CTRL-C
backtrace

#0  0x00007ffff2028e8d in FcValueCanonicalize (v=v@entry=0x555555989fc8) at ../fontconfig-2.14.2/src/fcpat.c:73
#1  0x00007ffff202a21e in FcPatternObjectGetWithBinding (p=p@entry=0x555555981170, object=<optimized out>, id=id@entry=0, v=v@entry=0x7fffffffa050, b=b@entry=0x0) at ../fontconfig-2.14.2/src/fcpat.c:966
#2  0x00007ffff202a2f9 in IA__FcPatternGet (p=0x555555981170, object=<optimized out>, id=0, v=v@entry=0x7fffffffa050) at ../fontconfig-2.14.2/src/fcpat.c:991
#3  0x00007ffff202a5b0 in IA__FcPatternGetCharSet (p=<optimized out>, object=<optimized out>, id=<optimized out>, c=0x7fffffffa080) at ../fontconfig-2.14.2/src/fcpat.c:1116
#4  0x00007ffff210e93e in QFontEngineMultiFontConfig::shouldLoadFontEngineForCharacter(int, unsigned int) const () from /usr/lib64/libQt5XcbQpa.so.5
#5  0x00007ffff6be32fc in QFontEngineMulti::stringToCMap(QChar const*, int, QGlyphLayout*, int*, QFlags<QFontEngine::ShaperFlag>) const () from /usr/lib64/libQt5Gui.so.5
#6  0x00007ffff6c062c8 in QTextEngine::shapeText(int) const () from /usr/lib64/libQt5Gui.so.5
#7  0x00007ffff6c1a6c1 in QTextLine::layout_helper(int) () from /usr/lib64/libQt5Gui.so.5
#8  0x00007ffff739ab4b in viewItemTextLayout(QTextLayout&, int, int, int*) () from /usr/lib64/libQt5Widgets.so.5
...


I try with media-libs/fontconfig-2.14.2-r3 and -2.15.0, same result
If I temporarily rename /usr/share/fonts/urw-fonts, it still gets lost in qt font management

Code:
#0  0x00007ffff210e942 in QFontEngineMultiFontConfig::shouldLoadFontEngineForCharacter(int, unsigned int) const () from /usr/lib64/libQt5XcbQpa.so.5
#1  0x00007ffff6be32fc in QFontEngineMulti::stringToCMap(QChar const*, int, QGlyphLayout*, int*, QFlags<QFontEngine::ShaperFlag>) const () from /usr/lib64/libQt5Gui.so.5
#2  0x00007ffff6c062c8 in QTextEngine::shapeText(int) const () from /usr/lib64/libQt5Gui.so.5
#3  0x00007ffff6c1a6c1 in QTextLine::layout_helper(int) () from /usr/lib64/libQt5Gui.so.5
#4  0x00007ffff739ab4b in viewItemTextLayout(QTextLayout&, int, int, int*) () from /usr/lib64/libQt5Widgets.so.5
#5  0x00007ffff739ef7c in QCommonStylePrivate::viewItemSize(QStyleOptionViewItem const*, int) const () from /usr/lib64/libQt5Widgets.so.5
...


Is there a way I can reset the qt font system?
Back to top
View user's profile Send private message
ecko
Tux's lil' helper
Tux's lil' helper


Joined: 04 Jul 2010
Posts: 107

PostPosted: Tue Sep 17, 2024 6:46 am    Post subject: Reply with quote

I found the problem. ~/.config/QtProject.conf was corrupt. I deleted it, all good.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum