Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash in vala outline when entering some invalid code #1356

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jeremypw
Copy link
Collaborator

@jeremypw jeremypw commented Jul 20, 2023

Fixes #1355

The root of the issue is in the libvala library - the parser never finishes on some invalid code lines and there is no obvious way of cancelling it.

To fix the crashes this PR ensures that if one parsing thread stalls and never finishes, a new one is not started.

A limitation of this is that if the code is edited to fix the problematic line, the outline is not re-parsed until the outline pane is hidden and then shown again (or the document closed and reopened - this PR ensures the outline is destroyed on closing the document).

It is questionable whether this issue is likely to occur often enough warrant implementing a more complex fix.

Any advice on how to force the thread to end when the parser has stalled would be welcome.

@jeremypw jeremypw changed the title Jpw/fix vala outline Fix crash in vala outline when entering some invalid code Jul 24, 2023
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.

Vala scanner goes into loop and may crash with certain code
1 participant