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 lens correction module due to accessing an unref'ed widget #18116

Merged
merged 1 commit into from
Dec 31, 2024

Conversation

ralfbrown
Copy link
Collaborator

How to crash master:

  1. open lens correction module
  2. click on camera-model button, select a different camera
  3. click on lens-model button, select a supported lens
  4. click on camera-model button again

The crash proved to be due to the model menu being unref'ed when closed and the next call then trying to destroy the unref'ed widget before recreating the menu hierarchy.

@ralfbrown ralfbrown added bugfix pull request fixing a bug priority: high core features are broken and not usable at all, software crashes scope: UI user interface and interactions labels Dec 30, 2024
@dterrahe
Copy link
Member

Why even have g->camera/lens_menu? Why not just return a new menu from _camera_menu_fill each time?

@TurboGit TurboGit added this to the 5.0.1 milestone Dec 30, 2024
@ralfbrown
Copy link
Collaborator Author

Yeah, that had occurred to me as I was testing the fix, but I wanted to stick to minimal and localized changes for 5.0.1. I can do the cleanup either as a separate PR for 5.2 or as an additional commit on this one. Pascal?

@TurboGit
Copy link
Member

I can do the cleanup either as a separate PR for 5.2 or as an additional commit on this one. Pascal?

Yes, works for me this way.

Copy link
Member

@TurboGit TurboGit left a comment

Choose a reason for hiding this comment

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

Thanks!

@TurboGit TurboGit merged commit e4b105e into darktable-org:master Dec 31, 2024
6 checks passed
@TurboGit
Copy link
Member

Merged in master and 5.0.x branch.

@ralfbrown ralfbrown deleted the lf_menu_crash branch December 31, 2024 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix pull request fixing a bug priority: high core features are broken and not usable at all, software crashes release notes: pending scope: UI user interface and interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants