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 <[email protected]>
@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.

@Xaymar
Xaymar deleted the 10312-recursive-events branch July 11, 2026 06:00
@Xaymar

Xaymar commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

Tested out the daily builds with this in it, and it does indeed fix the disappearing client issue! No more stack overflows.

@mgallien mgallien modified the milestones: 34.0.0, 35.0.0 Jul 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants