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

Sketcher: fixes #13999 #14029

Merged
merged 2 commits into from
May 17, 2024
Merged

Sketcher: fixes #13999 #14029

merged 2 commits into from
May 17, 2024

Conversation

PaddleStroke
Copy link
Contributor

fixes #13999
@wwmayer I could not reproduce the crash on windows. Can you please check and feedback if this solves correctly the crash ?

@github-actions github-actions bot added the WB Sketcher Related to the Sketcher Workbench label May 15, 2024
@wwmayer
Copy link
Contributor

wwmayer commented May 15, 2024

No need to test it because I can tell you straightaway that it will still crash. handleContinuousMode() calls purgeHandler that destroys the handler but returns true. So, the calling instance onModeChanged() still calls toolWidgetManager.afterHandlerModeChanged() after its destruction.

@PaddleStroke
Copy link
Contributor Author

No need to test it because I can tell you straightaway that it will still crash. handleContinuousMode() calls purgeHandler that destroys the handler but returns true. So, the calling instance onModeChanged() still calls toolWidgetManager.afterHandlerModeChanged() after its destruction.

Actually you missed that the boolean is changed in the middle :
return !finish();

I'm not sure its the best but I felt the finish function would return true if the handler is purged. And onModeChanged return true if the mode changed, ie !finish().

Do you prefer that we avoid the '!' to keep things simpler?

@wwmayer
Copy link
Contributor

wwmayer commented May 16, 2024

Actually you missed that the boolean is changed in the middle :

Oh, you're right. OK will test it and report back.

Do you mind to change the comment right to the call of !finish to move it one line above so that won't be broken into two lines?

@wwmayer
Copy link
Contributor

wwmayer commented May 16, 2024

OK, it works!

@PaddleStroke
Copy link
Contributor Author

Do you mind to change the comment right to the call of !finish to move it one line above so that won't be broken into two lines?

Done

@wwmayer wwmayer merged commit 6bac37d into FreeCAD:main May 17, 2024
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WB Sketcher Related to the Sketcher Workbench
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sketcher segfaults when using the symmetry tool
2 participants