Fix DBus name case mismatch breaking Linux single-instance file passing - #11826
Merged
lanewei120 merged 1 commit intoAug 7, 2026
Merged
Conversation
On Linux with single_instance enabled, a second instance sends the paths of files to open to the running instance via a DBus method call. The sender in send_message() built the destination/interface name as "com.bambulab.BambuStudio.InstanceCheck.Object<hash>", while the listener registers and matches "com.BambuLab.BambuStudio.InstanceCheck.Object<hash>". DBus names are case-sensitive, so the call went to a nonexistent destination: the running instance never received the message and the second instance silently exited without the file being loaded. Align the sender's interface name (and the introspection XML) with the listener's spelling. The object path already matched on both sides. Affects both X11 and Wayland.
Contributor
|
LGTM @lanewei120 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On Linux with
single_instanceenabled, opening a file in a second instance is supposed to forward the file path to the already-running instance via a DBus method call. This has been silently broken: the second instance just exits and nothing happens in the running instance.The cause is a case mismatch in
src/slic3r/GUI/InstanceCheck.cpp:send_message) builds the destination/interface name ascom.bambulab.BambuStudio.InstanceCheck.Object<hash>(lowercasebambulab).OtherInstanceMessageHandler::listen/handle_dbus_object_message) registers and matchescom.BambuLab.BambuStudio.InstanceCheck.Object<hash>(capitalB,L).DBus names are case-sensitive, so the method call targets a bus name nobody owns and is dropped.
Verified with
dbus-monitor: the message is published to the lowercase name with no effect, while sending the identical message viadbus-sendto the correctly-cased name is delivered and triggers the file load in the running instance.Fix
Align the sender's interface name with the listener's spelling, and fix the same casing in the introspection XML for consistency. The object path (
/com/BambuLab/...) already matched on both sides.Affects both X11 and Wayland.
Testing
"single_instance": "true"underappin<datadir>/BambuStudio.conf.