[Solved] "ERROR: null" at SDK v4.1.6+

When trying to recompile my apps originally written in SDK v4.1.4, using a newer SDK, I am getting "ERROR: null" with no further details on the terminal. Recompiling with v4.1.5 is still OK, but using any SDK from v4.1.6 up to the recent v4.2.0 beta fails with this error.

When I attempt to compile the project from the command line, using the "-verbose" Java switch, I see when it happens, but still with no closer details. Looks to me as if I had some problem in a class initialization, but cannot see any, so I'd be thankful if someone who had a similar experience could offer some tips what to look for

...
[Loaded com.garmin.monkeybrains.compiler2.typechecker.InstanceMemberInitializerScanner$1 from file:.../connectiq-sdk-win-4.2.0.beta1-2022-10-11-bff57b73c/bin/monkeybrains.jar]
ERROR: null
...

  • OK, so I finally found it myself - nested try/catch exception handling was the culprit. I had to remove the nesting, although normally Java can handle it well, and it also works with older SDK's. Possibly a bug in the recent SDK's. Hope it can help others