isshoni-soft / winry

Isshoni Bootstrapper, uses introspection & code generation to streamline bootstrapping & general development
0 stars 0 forks source link

Incorrect algorithm implementation in Araragi TypeMap leads to random unexpected crashing #31

Closed Dragovorn closed 2 years ago

Dragovorn commented 2 years ago

When I run my test case in the default IntelliJ runner it fails to inject some parameters, but when run in the debugger or via gradle in a terminal it's able to successfully run. Error:

java.lang.NullPointerException: Cannot invoke "tv.isshoni.winry.entity.context.IWinryContext.getLoggerFactory()" because "context" is null
  at tv.isshoni.winry.internal.annotation.processor.method.ProfileProcessor.<init>(ProfileProcessor.java:18)
  ... 36 more
Dragovorn commented 2 years ago

This seems to not be IntelliJ's fault, because now the issue has cleared up on the side of IntelliJ and now is failing inside of the gradle build run.

Dragovorn commented 2 years ago

After further investigation, it seems to be tied to the logger factory, depending on the log level different runners will produce the error.

Dragovorn commented 2 years ago

More investigation later: Issue might be in type map, I am using a lazy algorithm that relies on entrySet order and returns early. Going to need to change the algorithm (at least on the getParent side of things) to crawl up the inheritance tree like it did previously.

Dragovorn commented 2 years ago

Looks like this issue was a result of the above mentioned, after fixing a lazy algorithm implementation in TypeMap (https://github.com/isshoni-soft/araragi/commit/53eb1d1d4d4747cc00fed652887f19379babd8be) everything appears to be working swimmingly now. Closing this issue for now.