Multibit-Legacy / multibit-hd

Deprecated Bitcoin Wallet
https://multibit.org/blog/2017/07/26/multibit-shutdown.html
Other
173 stars 114 forks source link

No TitleFontDecorator class #703

Closed jim618 closed 9 years ago

jim618 commented 9 years ago

New error report uploaded. Id: 5096af7

MultiBit HD version: 0.1.2 Operating system: 64 6.3 Windows 8.1

No user notes

Number of stack traces: 2 First stack trace: java.lang.NoClassDefFoundError: Could not initialize class org.multibit.hd.ui.views.fonts.TitleFontDecorator at org.multibit.hd.ui.languages.LanguageKey.(LanguageKey.java:33) ~[multibit-hd.jar:na] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:202) [na:1.8.0] at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) [na:1.8.0] at java.awt.E

jim618 commented 9 years ago

This is caused by the static initialisation of the fonts in TitleFontDecorator. Presumably the font is either not created or registered correctly - the log does not indicate which.

Any UIException thrown in assignFont will crash the app which is no good.

@gary-rowe what is the best way to degrade if one of the fonts does not load for any reason ?

gary-rowe commented 9 years ago

I've hardened the exception handling throughout. The process is as follows:

  1. load Impact (or Dialog if that isn't present)
  2. If Impact/Dialog fail then the environment is too messed up to function (error report)
  3. Load Corben etc with fallback to Impact/Dialog on failure

This should gracefully absorb all errors in the environment that lead to the absence of required fonts. It's unlikely that Corben etc will fail because they should be loaded from a signed JAR.

Ready for review and close.

jim618 commented 9 years ago

Code review looks ok. Closing.