mirror of
https://github.com/mumble-voip/mumble.git
synced 2026-03-03 00:46:56 -05:00
Can't Save Shortcut Data #2934
Labels
No labels
GlobalShortcuts
Hacktoberfest
accessibility
acl
asio
audio
bonjour
bsd
bug
build
certificate
ci
client
code
documentation
external-bug
feature-request
gRPC
github
good first issue
help wanted
help-needed
ice
installer
linux
macOS
needs-ckeck-with-latest-version
needs-more-input
overlay
positional audio
priority/P0 - Blocker
priority/P1 - Critical
priority/P2 - Important
priority/P3 - Somewhat important
priority/P4 - Low
public-server-registration
qt
recording
release-management
server
stale-no-response
stale-support
support
task
test
theme
translation
triage
ui
windows
wontfix
x64
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/mumble-mumble-voip#2934
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MaxNarr on GitHub (Dec 11, 2024).
Description
The data field of a shortcut (for example Whisper/shout -> Subchannel #1) will not be saved after restarting. After restarting the data field says "empty" instead of Subchannel #1. The rest of the shortcut is stored correctly.
The command line prompts this when pressing apply :
QVariant::save: unable to save type 'ShortcutTarget' (type id: 65538).The command line prompts this on startup:
./mumble <X>2024-12-11 22:31:02.804 Loading settings from "/home/coms/.config/Mumble/Mumble/mumble_settings.json" <W>2024-12-11 22:31:02.804 QVariant::load: unable to load type 65538. <W>2024-12-11 22:31:02.804 QVariant::load: unable to load type 65538.Steps to reproduce
Mumble version
1.6.0
Mumble component
Client
OS
Linux
Reproducible?
Yes
Additional information
Mumble was compiled using the latest available code from git on a raspbian on RPI 5.
Using this manual https://wikiarchiv.natenom.de/mumble/entwicklung/mumble-selbst-bauen.html
Relevant log output
No response
Screenshots
No response
@Krzmbrzl commented on GitHub (Dec 11, 2024):
@davidebeatrici I strongly suspect this is due to some difference introduced with Qt 6 👀
@davidebeatrici commented on GitHub (Dec 11, 2024):
The error is usually caused by the data type not being registered, but we're doing that:
github.com/mumble-voip/mumble@edd4588c8a/src/mumble/Settings.h (L71-L87)github.com/mumble-voip/mumble@edd4588c8a/src/mumble/Settings.cpp (L513-L521)One difference I'm aware of is the deprecation of
qRegisterMetaTypeStreamOperators, in fact in #6516 all instances were surrounded by a Qt version check:From https://www.qt.io/blog/whats-new-in-qmetatype-qvariant:
I suspect we may have to implement the stream operators in the class ourselves.
And, if that's actually the case, I would expect the same issue with
ChannelTargetandPluginSettingas well.@MaxNarr commented on GitHub (Jan 8, 2025):
Can this warning while running make influence this behavior ?
In member function ‘__ct ’, inlined from ‘detached’ at /usr/include/aarch64-linux-gnu/qt6/QtCore/qhash.h:575:20, inlined from ‘detach’ at /usr/include/aarch64-linux-gnu/qt6/QtCore/qhash.h:939:75, inlined from ‘remove’ at /usr/include/aarch64-linux-gnu/qt6/QtCore/qhash.h:956:15, inlined from ‘remove’ at /home/coms2/mumble/mumble/src/mumble/GlobalShortcut.cpp:1061:28, inlined from ‘__dt_base ’ at /home/coms2/mumble/mumble/src/mumble/GlobalShortcut.cpp:1078:30: /usr/include/aarch64-linux-gnu/qt6/QtCore/qhash.h:559:17: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 559 | spans = new Span[nSpans]; | ^ /usr/include/c++/12/new: In member function ‘__dt_base ’: /usr/include/c++/12/new:128:26: note: in a call to allocation function ‘operator new []’ declared here 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^ [ 99%] Built target mumble [ 99%] Generating delayed configure script configure_files_1.cmake [100%] Executing delayed configure script configure_files_1.cmake [100%] Built target delayed_configure_files_target_1@davidebeatrici commented on GitHub (Jan 8, 2025):
Unlikely, still a warning that shouldn't appear though.
@Krzmbrzl commented on GitHub (Jan 9, 2025):
This is a Qt issue (see https://bugreports.qt.io/browse/QTBUG-105388) and if I understand the bug report correctly, it's harmless 🤷
@MaxNarr commented on GitHub (Jan 9, 2025):
What confuses me is that the problem is not there on Mac. But it's there on Raspberry PI
@Krzmbrzl commented on GitHub (Jan 10, 2025):
Most likely an issue due to different Qt versions that are installed 👀
@davidebeatrici commented on GitHub (Jan 10, 2025):
Most likely. I assume the package(s) on Mac come from Homebrew, while the ones on Raspberry Pi come from Debian.
@Krzmbrzl commented on GitHub (Jan 11, 2025):
Hm, this is interesting. From the docs:
@MaxNarr does the issue also occur when you start with a completely empty settings file? I.e. try to see what happens when you rename
~/.config/Mumble/Mumble/mumble_settings.jsonand~/.config/Mumble/Mumble/mumble_settings.json.backto something else and then start Mumble to create the shortcut etc.My suspicion kinda is that this might be due to the shortcut having been created before the move to Qt 6 and the type IDs and/or the QVariant serialization format has changed from Qt 5 to Qt 6. Hence, the old format can't be read/is misinterpreted 🤔
@MaxNarr commented on GitHub (Jan 12, 2025):
@Krzmbrzl I renamed the two mentioned files. Unfortunately the behavior is still the same. After restarting mumble the shortcut is listed but the target field is empty
this is the section about shortcuts from mumble_settings.json
"shortcuts": { "defined": [ { "buttons": [ "AAAAAgAAAAAp" ], "data": "AAAEAAAAAAAPU2hvcnRjdXRUYXJnZXQA", "index": 12, "suppress": false } ], "enable_global_shortcuts": true },this is from mumble_settings.json.back
"shortcuts": { "defined": [ { "buttons": [], "data": "AAAEAAAAAAAPU2hvcnRjdXRUYXJnZXQA", "index": 12, "suppress": false } ], "enable_global_shortcuts": true },@MaxNarr commented on GitHub (Feb 5, 2025):
is there any way to make the shortcuts usable again ?
@Krzmbrzl commented on GitHub (Feb 6, 2025):
If you find out why they are broken in the first place, then most likely yes. But until then it is unclear what needs to be done about it.
@MaxNarr commented on GitHub (Feb 19, 2025):
@davidebeatrici
Aren't they already implemented in Settings.cpp:323?
On Raspberry Pi the latest version is Qt6.4.2
Is that a problem ?
@MaxNarr commented on GitHub (Feb 20, 2025):
@Krzmbrzl @davidebeatrici
After playing around for a night it appears there's a solution.
The following worked for me:
Move the stream operators from the .cpp file to the .h file (as inline)
are there any issues with doing that ?
@davidebeatrici commented on GitHub (Feb 21, 2025):
No, sounds good to me!
@Krzmbrzl commented on GitHub (Feb 21, 2025):
I would like to understand why this fixes the issue though... is it enough to have declarations of these operators in the header file? 🤔
@MaxNarr commented on GitHub (Feb 23, 2025):
@Krzmbrzl I checked. It is enough to have the additional declarations in the headers. Probably it's the same problem with all the operators. I checked ListenToChannel (ChannelTarget) as well, same issue. I have no overview how many things are affected by this.
@Dessix commented on GitHub (May 27, 2025):
It's been a few months, but this appears to still be occurring on Linux builds on the latest main branch. Do you have a patch with the workaround you mentioned @MaxNarr? Is there anything I can provide to help, since I have it reproing?
@davidebeatrici commented on GitHub (May 29, 2025):
@Dessix Could you test #6832, please?
@Dessix commented on GitHub (May 29, 2025):
That worked, but I'll note that it assumed the topmost channel as the default when it decoded what was otherwise blank, instead of nothing. It may be better to leave it blank on first-working-decode than to select the root channel? Otherwise- yeah, it worked.
@davidebeatrici commented on GitHub (May 29, 2025):
Thank you for testing so quickly!
The PR simply moves the operator definitions and doesn't change the settings behavior itself.
@Krzmbrzl
@Krzmbrzl commented on GitHub (May 29, 2025):
Yeah, idk what's up with that. Would have to get into the implementation to see whether I can find some sense in that ^^
@Hartmnt commented on GitHub (May 31, 2025):
@MaxNarr Thanks for poking at this so a solution could be found! 🎉