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 Linux paths to detect installed location #462

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

1337joe
Copy link

@1337joe 1337joe commented Mar 10, 2023

The line immediately above the line where the logger is initialized (properties = current.loadAppProperties();) can cause logging to occur. With logger not initialized this throws a NPE, but this happens in a static initializer and causes the class to not load, producing a NoClassDefFoundError instead of a more helpful stack trace.

As evidenced by the missing path.properties, when installing the application from the AUR the application paths don't resolve as the code expected.

Changes:

  • Fix order of initialization/use of logger
  • Change method of finding app directory for linux
  • Update linux external tool paths

As far as I've experienced the bug, this fixes #380 for Linux. I suspect the getAppPath() changes I made for Linux could be applied to other platforms but without a way to test that I wasn't going to commit that change.

@1337joe 1337joe marked this pull request as draft March 10, 2023 02:38
@1337joe 1337joe marked this pull request as ready for review March 10, 2023 05:48
@1337joe 1337joe changed the title Initialize logger before using it when loading properties Fix Linux paths to detect installed location Mar 10, 2023
@yermak
Copy link
Owner

yermak commented Nov 17, 2023

@1337joe , thank you for patch.
I don't have Linux atm, need to install VM to test it.
First part regarding logging is no longer relevant, I need to rest Linux path detection.

@asm0dey
Copy link

asm0dey commented Mar 11, 2024

@1337joe it seems we're on the same page with a delay of exactly a year :)

@yermak do you need any assistance in fixing the issue?

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.

Unable to Add Files
3 participants