hugo icon indicating copy to clipboard operation
hugo copied to clipboard

NullPointerException with hugo

Open vashisthg opened this issue 8 years ago • 4 comments

Getting null pointer exceptions with Hugo 1.2.1. Device Nexus6p, Android 7.1.1 (api 25)

Logs here:

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Class.isAnonymousClass()' on a null object reference
at hugo.weaving.internal.Hugo.asTag(Hugo.java:97)
at hugo.weaving.internal.Hugo.asTag(Hugo.java:98)
at hugo.weaving.internal.Hugo.enterMethod(Hugo.java:71)
at hugo.weaving.internal.Hugo.ajc$inlineAccessMethod$hugo_weaving_internal_Hugo$hugo_weaving_internal_Hugo$enterMethod(Hugo.java:1)
at hugo.weaving.internal.Hugo.logAndExecute(Hugo.java:36)

vashisthg avatar Dec 02 '16 15:12 vashisthg

Did you or anyone else find a root cause / solution for this?

ened avatar May 13 '17 15:05 ened

What's the cause of this?

DanielGod avatar Aug 09 '17 02:08 DanielGod

Had this problem recently. Seems to have been related to a listener imbrication (clickListener definition in another clickListener definition). Also this started happening after migration from source / target java version compatibility from 1.7 to 1.8.

Changed it to lambda expressions and it fixed it.

marian-eremia avatar Nov 06 '17 08:11 marian-eremia

@marian-eremia I'm getting this now, but moved to 1.8 a while ago. Could you elaborate on what exactly you changed?

ebabel avatar Nov 10 '17 18:11 ebabel