Skip to content

Fix Intel crash in ThemeManager on macOS #13543

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Kaan0029
Copy link
Contributor

@Kaan0029 Kaan0029 commented Jul 14, 2025

Closes #13536

Changes

  • Added try/catch block around themeWindowManager.install(scene) in ThemeManager
  • Prevents RuntimeException crash when native libraries are incompatible with ARM64 architecture

Testing

  • Tested on macOS ARM64 - no longer crashes on startup
  • Build passes successfully
  • Application starts and runs normally

Mandatory checks

  • I own the copyright of the code submitted and I license it under the MIT license
  • Change in CHANGELOG.md described in a way that is understandable for the average user (if change is visible to the user)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (if change is visible to the user)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

Kaan0029 added 3 commits July 14, 2025 20:05
- Add try/catch around themeWindowManager.install() to handle RuntimeException
- Prevents crash when native libraries are incompatible with ARM64 architecture
- Fixes JabRef#13536
Copy link

trag-bot bot commented Jul 14, 2025

@trag-bot didn't find any issues in the code! ✅✨

@@ -75,6 +75,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
- When creating a library, if you drag a PDF file containing only a single column, the dialog will now automatically close. [#13262](https://github.com/JabRef/jabref/issues/13262)
- We fixed an issue where the tab showing the fulltext search results would appear blank after switching library. [#13241](https://github.com/JabRef/jabref/issues/13241)
- Enhanced field selection logic in the Merge Entries dialog when fetching from DOI to prefer valid years and entry types. [#12549](https://github.com/JabRef/jabref/issues/12549)
- We fixed an issue where JabRef crashed on startup on Apple Silicon Macs due to native library compatibility issues in the theme manager. [#13536](https://github.com/JabRef/jabref/issues/13536)
Copy link
Member

Choose a reason for hiding this comment

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

No need; feature was introduced after the last release

@@ -73,7 +73,13 @@ public ThemeManager(WorkspacePreferences workspacePreferences,
this.workspacePreferences = Objects.requireNonNull(workspacePreferences);
this.fileUpdateMonitor = Objects.requireNonNull(fileUpdateMonitor);
this.updateRunner = Objects.requireNonNull(updateRunner);
this.themeWindowManager = ThemeWindowManagerFactory.create();
ThemeWindowManager tempThemeWindowManager = null;
Copy link
Member

Choose a reason for hiding this comment

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

We do not use "temp" prefix in JabRef. Do without.

With "this." you have the different scoping.

Maybe do without local variable and in the catch block set to null?

try {
tempThemeWindowManager = ThemeWindowManagerFactory.create();
} catch (UnsatisfiedLinkError | RuntimeException e) {
LOGGER.error("Failed to create ThemeWindowManager (likely due to native library compatibility issues on ARM64)", e);
Copy link
Member

Choose a reason for hiding this comment

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

Do debug instead of warn

It's Intel and not ARM

@koppor koppor changed the title Fix ARM64 crash in ThemeManager on macOS Fix Intel crash in ThemeManager on macOS Jul 15, 2025
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.

JabRef does not start on Intel macs
3 participants