Fix GUI crash when opening a file before the media player is ready - #794
Open
AlySerry0 wants to merge 1 commit into
Open
Fix GUI crash when opening a file before the media player is ready#794AlySerry0 wants to merge 1 commit into
AlySerry0 wants to merge 1 commit into
Conversation
This was referenced Aug 11, 2026
AlySerry0
force-pushed
the
fix/gui-crash-on-null-player
branch
2 times, most recently
from
August 11, 2026 18:14
8f555c5 to
cb789a3
Compare
browseMediapath(), OpenAddFilesToPlaylistDialog(), and
SyncplayClient.openFile() all dereferenced self._player without
checking it for None. The player stays None until it finishes
launching and connects back to Syncplay (see SyncplayClient.initPlayer),
so any of the following crash if they happen before that:
- opening a file from the File menu
- adding files to the playlist from the File menu
- double-clicking a file already in the playlist (playlistItemClicked
-> openFile), the same way even with a working player if you click
fast enough right after startup
All three hit:
AttributeError: 'NoneType' object has no attribute 'customOpenDialog'
AttributeError: 'NoneType' object has no attribute 'openFile'
This matches the crashes reported in Syncplay#787 and Syncplay#786. Guard all three call
sites with the existing playerIsNotReady() helper and show a message
instead of crashing.
AlySerry0
force-pushed
the
fix/gui-crash-on-null-player
branch
from
August 12, 2026 05:46
cb789a3 to
e135057
Compare
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.
Fixes #787 and #786.
browseMediapath(),OpenAddFilesToPlaylistDialog(), andSyncplayClient.openFile()all touchself._playerwithout checking if it'sNone. It staysNoneuntil the player process actually launches and connects back (SyncplayClient.initPlayer), so opening a file, adding to the playlist, or double-clicking a playlist entry before that happens crashes with:That's guaranteed if the player fails to launch at all (both linked issues), but it can also happen with a working player if you click fast enough right after startup - I hit the
openFileone by accident just double-clicking a playlist entry while testing the other two.Added a
playerIsNotReady()check before each one and show a message instead of crashing.Test plan: