Because I don't see a way to report bugs, I'm going to report it here.
There's a NullPointerException when joxy is applied to jEdit using the -Dswing.defaultlaf command line switch. It works fine when joxy is added to the swing.installedlafs and then selected in jEdit.
First of all, thank you very much for your bug report. It is much appreciated that you take the time to let us know about this problem and improve Joxy with that. Special thanks for how detailed your bug report is :)
What I did
Now, for real. I installed jEdit (stable, 4.5.2) from the Debian repositories and was then able to reproduce your bug. However: I could not figure out what was the error! I tried to use my normal debugging routine, but apparently jEdit somehow suppresses output. Maybe I should note that as far as I can see, there should not be a NullPointerException, but of course, it occurs, so there probably is something wrong. As this error does not occur when starting other programs, I started to suspect this is really jEdit related. Thus, I commented out the line that caused the NullPointerException and changed it to something that would make it work (basically, I hardcoded a black colour somewhere). Now, jEdit started, but had the Metal LAF applied to it! Weird, I would say. So I reverted Joxy to its original state and did the following.
Workaround
Then, I started jEdit without the -Dswing.defaultlaf=joxy.JoxyLookAndFeel option. Now, jEdit started properly and had the Metal LAF applied to it. Then, I went to Utilities > Global Options (Ctrl + F12) > jEdit > Appearance and change the Swing LAF to Joxy in the dropdown menu. After clicking apply, Joxy was applied to jEdit and after that, I could start jEdit normally: Joxy would still be applied.
Conclusion & further work
So, to conclude this I would say that jEdit has some nasty code somewhere, ignoring the default or system LAF and using its own system to change the LAF. This is obviously no reason for Joxy to crash however! Therefore, I will do some more research and I will try to fix the bug. For this, I first need to find out how to log (probably have to use some jEdit logging utility), so that will take some time.
When I find something or fix something, I will update this thread.
Hopefully this helps you, otherwise, I'd like to hear from you.
Cheers!
Thom
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Because I don't see a way to report bugs, I'm going to report it here.
There's a NullPointerException when joxy is applied to jEdit using the -Dswing.defaultlaf command line switch. It works fine when joxy is added to the swing.installedlafs and then selected in jEdit.
Steps to reproduce
$ export _JAVA_OPTIONS="-Dswing.defaultlaf=joxy.JoxyLookAndFeel"
$ jedit
Result
jedit hangs on "init look and feel" and the following stacktrace is printed to console:
Additional information
The same happens with pdfsam 2.2.1e
Hello Lukas,
Thanks
First of all, thank you very much for your bug report. It is much appreciated that you take the time to let us know about this problem and improve Joxy with that. Special thanks for how detailed your bug report is :)
What I did
Now, for real. I installed jEdit (stable, 4.5.2) from the Debian repositories and was then able to reproduce your bug. However: I could not figure out what was the error! I tried to use my normal debugging routine, but apparently jEdit somehow suppresses output. Maybe I should note that as far as I can see, there should not be a
NullPointerException
, but of course, it occurs, so there probably is something wrong. As this error does not occur when starting other programs, I started to suspect this is really jEdit related. Thus, I commented out the line that caused theNullPointerException
and changed it to something that would make it work (basically, I hardcoded a black colour somewhere). Now, jEdit started, but had the Metal LAF applied to it! Weird, I would say. So I reverted Joxy to its original state and did the following.Workaround
Then, I started jEdit without the
-Dswing.defaultlaf=joxy.JoxyLookAndFeel
option. Now, jEdit started properly and had the Metal LAF applied to it. Then, I went to Utilities > Global Options (Ctrl + F12
) > jEdit > Appearance and change the Swing LAF to Joxy in the dropdown menu. After clicking apply, Joxy was applied to jEdit and after that, I could start jEdit normally: Joxy would still be applied.Conclusion & further work
So, to conclude this I would say that jEdit has some nasty code somewhere, ignoring the default or system LAF and using its own system to change the LAF. This is obviously no reason for Joxy to crash however! Therefore, I will do some more research and I will try to fix the bug. For this, I first need to find out how to log (probably have to use some jEdit logging utility), so that will take some time.
When I find something or fix something, I will update this thread.
Hopefully this helps you, otherwise, I'd like to hear from you.
Cheers!
Thom
Hello Lukas,
Apparently, Willem was faster than I and fixed the bug, see commit 6c48ea. Could you check if this solves the problem for you and report back?
Thanks a lot in advance!
Thom
Thank you, it fixes both jEdit and pdfsam.