Skip to content

Fix Intel crash in ThemeManager on macOS#13543

Merged
koppor merged 15 commits into
JabRef:mainfrom
Kaan0029:fix-theme-manager-arm64-crash
Jul 23, 2025
Merged

Fix Intel crash in ThemeManager on macOS#13543
koppor merged 15 commits into
JabRef:mainfrom
Kaan0029:fix-theme-manager-arm64-crash

Conversation

@Kaan0029

@Kaan0029 Kaan0029 commented Jul 14, 2025

Copy link
Copy Markdown
Contributor

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
Comment thread jabgui/src/main/java/org/jabref/gui/theme/ThemeManager.java
Comment thread CHANGELOG.md Outdated
Comment thread jabgui/src/main/java/org/jabref/gui/theme/ThemeManager.java Outdated
Comment thread jabgui/src/main/java/org/jabref/gui/theme/ThemeManager.java Outdated
@koppor koppor changed the title Fix ARM64 crash in ThemeManager on macOS Fix Intel crash in ThemeManager on macOS Jul 15, 2025

@koppor koppor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please adress my comments.

@subhramit

Copy link
Copy Markdown
Member

[x] Change in CHANGELOG.md described in a way that is understandable for the average user (if change is visible to the user)

Why is this ticked if there is no changelog entry (at least at the time of writing this)?

private final FileUpdateMonitor fileUpdateMonitor;
private final Consumer<Runnable> updateRunner;
private final ThemeWindowManager themeWindowManager;
private ThemeWindowManager themeWindowManager;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Add @Nullable; because we don't use Optionals in class variables; do we @Siedlerchr

@koppor

koppor commented Jul 23, 2025

Copy link
Copy Markdown
Member

Follow-up issue: dukke/FXThemes#14

@koppor

koppor commented Jul 23, 2025

Copy link
Copy Markdown
Member

I think, we have a different understanding of "Manually tested" and "fixed"

If I open preferences, I get an exception:

IMG_20250723_134013_883 (Medium)

@koppor

koppor commented Jul 23, 2025

Copy link
Copy Markdown
Member

I fixed all the issues

  • unnecessary null check - library never returns null (found by ctrl+click on create and reading the 20 lines of code there)
  • preference opening and changing the mode works.

Since external contributors rely on the issue, I go ahead with merging.

@jabref-machine

Copy link
Copy Markdown
Collaborator

You ticked that you modified CHANGELOG.md, but no new entry was found there.

If you made changes that are visible to the user, please add a brief description along with the issue number to the CHANGELOG.md file. If you did not, please replace the cross ([x]) by a slash ([/]) to indicate that no CHANGELOG.md entry is necessary. More details can be found in our Developer Documentation about the changelog.

@trag-bot

trag-bot Bot commented Jul 23, 2025

Copy link
Copy Markdown

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

@koppor koppor enabled auto-merge July 23, 2025 11:53
@koppor koppor added this pull request to the merge queue Jul 23, 2025
@koppor koppor mentioned this pull request Jul 23, 2025
4 tasks
Merged via the queue into JabRef:main with commit 4348224 Jul 23, 2025
1 check passed
dcarpentiero pushed a commit to dcarpentiero/jabref that referenced this pull request Jul 24, 2025
* Fix ARM64 crash in ThemeManager on macOS

- Add try/catch around themeWindowManager.install() to handle RuntimeException
- Prevents crash when native libraries are incompatible with ARM64 architecture
- Fixes JabRef#13536

* fix try catch error

* Added changelog entry

* adjusted changelog entry

* Added try catch also for instantiations in constructor

* Delete redundant changelog entry

* Removed usage of temp prefix to comply with jabref conventions

* changed debug message to specify intel related issue

* Fix handling of non-existing null

* Fix logger output

* Add mssing dots

* Fix exception

* Fix exception ... again ...

* Fix exception ... again ...

* Keep silent on intel mac when switchting dark mode does not work

---------

Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>
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

5 participants