Skip to content

fix(socketapi): defer move item dialog out of socket read loop. - #10552

Merged
camilasan merged 4 commits into
masterfrom
bugfix/10519/conflict-resolve-crash
Aug 11, 2026
Merged

fix(socketapi): defer move item dialog out of socket read loop.#10552
camilasan merged 4 commits into
masterfrom
bugfix/10519/conflict-resolve-crash

Conversation

@camilasan

@camilasan camilasan commented Aug 6, 2026

Copy link
Copy Markdown
Member

Resolves

#10519

Summary

command_MOVE_ITEM showed QFileDialog::getSaveFileUrl as a nested modal loop
from the Qt::DirectConnection socket dispatch. Defer the dialog to the
next event loop iteration after computing the default path.

One extra change: now the notification for conflicts in the activity list opens the conflict dialog directly.

TODO

Checklist

AI (if applicable)

@camilasan camilasan added this to the 34.0.2 milestone Aug 6, 2026
@camilasan

Copy link
Copy Markdown
Member Author

/backport to stable-34.0

@camilasan
camilasan force-pushed the bugfix/10519/conflict-resolve-crash branch from 43db3bd to b7294ce Compare August 6, 2026 20:45
@camilasan
camilasan marked this pull request as ready for review August 6, 2026 21:12
@camilasan
camilasan force-pushed the bugfix/10519/conflict-resolve-crash branch from b7294ce to 56e6b06 Compare August 7, 2026 09:27

@nilsding nilsding left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems fine for now, just one comment

Comment thread src/gui/socketapi/socketapi.cpp Outdated
@camilasan
camilasan force-pushed the bugfix/10519/conflict-resolve-crash branch from 56e6b06 to 9c4d9b4 Compare August 10, 2026 15:49
Fixes #10519

Running ConflictDialog::exec() from the Qt::DirectConnection socket dispatch
spun a nested modal loop inside slotReadSocket. If the socket disconnected
while the dialog was open, the QLocalSocket was freed and the read loop
dereferenced it again at socketapi.cpp:385, crashing with an access violation.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Camila Ayres <hello@camilasan.com>
command_MOVE_ITEM showed QFileDialog::getSaveFileUrl as a nested
modal loop from the Qt::DirectConnection socket dispatch, the same
reentrancy that can free the socket underneath the handler
causing a crash.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Camila Ayres <hello@camilasan.com>
…cked.

Clicking a conflict entry brought the user to the activity log.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Camila Ayres <hello@camilasan.com>
…als.

SocketApi built the conflict and move dialogs inline inside the socket read loop.
This keeps UI out of SocketApi and removes the modal loop that ran under slotReadSocket.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Camila Ayres <hello@camilasan.com>
@camilasan
camilasan force-pushed the bugfix/10519/conflict-resolve-crash branch from 9c4d9b4 to 15596e3 Compare August 11, 2026 07:59
@github-actions

Copy link
Copy Markdown
Contributor

Artifact containing the AppImage: nextcloud-appimage-pr-10552.zip

Digest: sha256:440708ab32e424d595ac9e82f3e0546d35dbf06b2abe1915b1da81a062db2989

To test this change/fix you can download the above artifact file, unzip it, and run it.

Please make sure to quit your existing Nextcloud app and backup your data.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)
4 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@camilasan
camilasan merged commit 94d4e28 into master Aug 11, 2026
22 of 23 checks passed
@camilasan
camilasan deleted the bugfix/10519/conflict-resolve-crash branch August 11, 2026 08:43
@mgallien mgallien modified the milestones: 34.0.2, 35.0.0 Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants