Skip to content

fix: Don't recursively call processEvents#10314

Merged
mgallien merged 1 commit into
nextcloud:masterfrom
Xaymar:10312-recursive-events
Jul 9, 2026
Merged

fix: Don't recursively call processEvents#10314
mgallien merged 1 commit into
nextcloud:masterfrom
Xaymar:10312-recursive-events

Conversation

@Xaymar

@Xaymar Xaymar commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Resolves

Fixes #10312

Summary

Removes the re-entrant main QEventLoop handling caused by calling QCoreApplication::processEvents() which eventually causes a stack overflow. It's unclear what this call was supposed to do as the main QEventLoop is already handled by calling QApplication::exec() which is necessary anyway. This appears to be a remnant of someone not being well versed in asynchronous workloads, though that doesn't appear to be the only issue with the code in question.

TODO

  • Verify if this actually fixes the issue as your build process does not work on Windows at all.

Checklist

AI (if applicable)

@mgallien mgallien left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

thanks

@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.

thanks for your contribution!

@mgallien mgallien enabled auto-merge July 8, 2026 07:30
@mgallien mgallien force-pushed the 10312-recursive-events branch from 81dba5f to a51523b Compare July 8, 2026 07:30
@nilsding

nilsding commented Jul 8, 2026

Copy link
Copy Markdown
Member

/backport to stable-34.0 please

@nilsding nilsding added this to the 34.0.0 milestone Jul 8, 2026
@mgallien mgallien disabled auto-merge July 9, 2026 07:27
Calling QCoreApplication::processEvents() causes a recursive re-entrant
event loop that will eventually run out of stack space. This should have
broken way earlier, but it appears that it went under the radar until
a sufficiently fast network and storage is attached. It's unclear why
this was even called in the first place - QApplication::exec() already
runs the GUI QEventLoop anyway.

Fixes nextcloud#10312.

Signed-off-by: Xaymar <info@xaymar.com>
@mgallien mgallien force-pushed the 10312-recursive-events branch from a51523b to 22bf46a Compare July 9, 2026 07:27
@mgallien mgallien merged commit fca13e6 into nextcloud:master Jul 9, 2026
16 of 17 checks passed
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

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

Digest: sha256:3095e5d7364b191ac1901c28b40eaac2ec080a59540695b444299975870db705

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.

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.

OCC::LsColJob::finished() recursively calls itself forever at random

3 participants