Skip to content
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

Crash due to attempting to restore incompatible window state #6577

Closed
sss123next opened this issue Sep 29, 2024 · 9 comments · Fixed by #6584
Closed

Crash due to attempting to restore incompatible window state #6577

sss123next opened this issue Sep 29, 2024 · 9 comments · Fixed by #6584
Labels
bug A bug (error) in the software client good first issue Good for first-time contributors ui

Comments

@sss123next
Copy link

Description

crash on startup

Steps to reproduce

run mumble binary.

Mumble version

0a033af

Mumble component

Client

OS

Linux

Reproducible?

Yes

Additional information

No response

Relevant log output

<W>2024-09-29 23:09:48.940 Theme: "Mumble"
<W>2024-09-29 23:09:48.940 Style: "Dark"
<W>2024-09-29 23:09:48.940 --> qss: ":themes/Default/Dark.qss"
<W>2024-09-29 23:09:48.941 Locale is "ru_RU" (System: "ru_RU")
<W>2024-09-29 23:09:48.978 Database SQLite: "3.46.0"
<W>2024-09-29 23:09:49.901 Updating application palette
[New Thread 0x7fffd3ef66c0 (LWP 246671)]
[New Thread 0x7fffd14f66c0 (LWP 246672)]
[New Thread 0x7fffceaf66c0 (LWP 246673)]
[New Thread 0x7fffc7ef66c0 (LWP 246674)]
[New Thread 0x7fffbbef66c0 (LWP 246675)]
<W>2024-09-29 23:09:49.920 GlobalShortcutX: Using XI2 2.4
<W>2024-09-29 23:09:49.952 QMetaObject::connectSlotsByName: No matching signal for on_qtvUsers_customContextMenuRequested(QPoint,bool)
<W>2024-09-29 23:09:49.952 QMetaObject::connectSlotsByName: No matching signal for on_muteCuePopup_triggered()

Thread 1 ".mumble-wrapped" received signal SIGSEGV, Segmentation fault.
0x00007ffff65c96cc in removeWidgetRecursively(QLayoutItem*, QObject*) () from /nix/store/fa7acm2risfzsqvx90myqavn3bq8fkrw-qtbase-6.7.2/lib/libQt6Widgets.so.6
(gdb) where
#0  0x00007ffff65c96cc in removeWidgetRecursively(QLayoutItem*, QObject*) () from /nix/store/fa7acm2risfzsqvx90myqavn3bq8fkrw-qtbase-6.7.2/lib/libQt6Widgets.so.6
#1  0x00007ffff65c9819 in QLayout::addChildWidget(QWidget*) () from /nix/store/fa7acm2risfzsqvx90myqavn3bq8fkrw-qtbase-6.7.2/lib/libQt6Widgets.so.6
#2  0x00007ffff6742b31 in QMainWindowLayout::splitDockWidget(QDockWidget*, QDockWidget*, Qt::Orientation) ()
   from /nix/store/fa7acm2risfzsqvx90myqavn3bq8fkrw-qtbase-6.7.2/lib/libQt6Widgets.so.6
#3  0x000000000061eaf6 in MainWindow::setupView(bool) ()
#4  0x00000000004a64af in MainWindow::setupGui() ()
#5  0x00000000004de0bd in MainWindow::MainWindow(QWidget*) [clone .constprop.0] ()
#6  0x00000000004e7284 in main ()


### Screenshots

_No response_
@sss123next sss123next added bug A bug (error) in the software triage This issue is waiting to be triaged by one of the project members labels Sep 29, 2024
@sss123next
Copy link
Author

sss123next commented Sep 29, 2024

interesting, if i remove ~/.config/Mumble, mumble start successfully (with all settings lost of course)

@Hartmnt
Copy link
Member

Hartmnt commented Sep 29, 2024

This reads like the layout of the Mumble client elements might have causing the crash. Have you used a custom layout when it was crashing? If so, do you remember how you had the elements placed?

@Hartmnt
Copy link
Member

Hartmnt commented Sep 29, 2024

Do you have - by any chance - kept a copy of the folder when Mumble was crashing?

@sss123next
Copy link
Author

it was very old config, maybe i changed something during last 10 years ....

interesting what removing ~/.config/Mumble/Mumble.conf and/or ~/.config/Mumble/Mumble/mumble_settings.json does not resolve problem...

@sss123next
Copy link
Author

ok, it seems what problem is in [ui] block, and if configs removed - backups is used.

@sss123next
Copy link
Author

ok, found it.

[ui]
░state=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\x1\0\0\0\0\0\0\x2%\0\0\x4R\xfc\x2\0\0\0\x2\xfb\0\0\0\f\0q\0\x64\0w\0L\0o\0g\x1\0\0\0H\0\0\x4)\0\0\0\x82\x1\0\0\a\xfb\0\0\0\xe\0q\0\x64\0w\0\x43\0h\0\x61\0t\x1\0\0\x4u\0\0\0%\0\0\0%\0\0\0%\0\0\x5W\0\0\x4R\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\x1\0\0\0\x2\0\0\0\x1\0\0\0\x1a\0q\0t\0I\0\x63\0o\0n\0T\0o\0o\0l\0\x62\0\x61\0r\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0)⇩  

causing crash

@sss123next
Copy link
Author

it's probably wise to implement some validation for whose who update on existing configs

@davidebeatrici
Copy link
Member

Thank you for investigating the cause!

The state is loaded and saved in Qt's own format:

QByteArray qbaMainWindowState = {};

LOAD(qbaMainWindowState, "ui/state");

restoreState(Global::get().s.qbaMainWindowState);

Global::get().s.qbaMainWindowState = Global::get().mw->saveState();

This could be considered an upstream bug that we should report...

But yeah, we should probably ignore the window state if Qt's major version doesn't match, in order to prevent potential glitches.

@Krzmbrzl
Copy link
Member

@davidebeatrici there exists a version parameter in restoreState for that exact purpose. We probably only have to make use of it:
https://doc.qt.io/qt-6/qmainwindow.html#restoreState

@Krzmbrzl Krzmbrzl added client ui good first issue Good for first-time contributors and removed triage This issue is waiting to be triaged by one of the project members labels Sep 30, 2024
@Krzmbrzl Krzmbrzl changed the title crash on startup after switching to qt6 Crash due to attempting to restore incompatible window state Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug (error) in the software client good first issue Good for first-time contributors ui
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants