Skip to content

fix: avoid null logger dereference in error dialogs - #70

Open
aminya wants to merge 1 commit into
CachyOS:developfrom
aminya:error-log-null
Open

fix: avoid null logger dereference in error dialogs#70
aminya wants to merge 1 commit into
CachyOS:developfrom
aminya:error-log-null

Conversation

@aminya

@aminya aminya commented Aug 29, 2026

Copy link
Copy Markdown

This fixes the spdlog logger null pointer deference when an exception is thrown when an error dialog is shown. The logger is initialized before all paths now. This means all the error dialogs are shown properly

For example, !alpm::is_valid_alpm_dbs() calls spdlog in catch before spdlog is initialized resilting in segmentation fault
https://github.com/aminya/packageinstaller/blob/077021749fe83765ab2b7b844838188f1eec4066/src/alpm_manager.cpp#L178-L185

Before:
image

After:
image

After fixing the issue that's now visible in the dialog:
image

This fixes the spdlog logger null pointer deference when an exception is thrown. The logger is initialized before all paths now
@aminya aminya changed the title fix: avoid null logger dereference in exceptions fix: avoid null logger dereference in error dialogs Aug 29, 2026
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.

1 participant