question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NullPointerException when adding prototypical properties on a record in an extern

See original GitHub issue

Summary

In this commit to Polymer, I tried adding some instance properties of a mixin class onto the corresponding record and hit a 100% repro NullPointerException when compiling.

Setup

This requires Node and NPM

Output will look something like this:

[16:59:03] gulp-google-closure-compiler: java.lang.NullPointerException
	at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:770)
	at com.google.javascript.jscomp.GlobalTypeInfo.checkSuperProperty(GlobalTypeInfo.java:784)
	at com.google.javascript.jscomp.GlobalTypeInfo.checkAndFreezeNominalType(GlobalTypeInfo.java:647)
	at com.google.javascript.jscomp.GlobalTypeInfo.process(GlobalTypeInfo.java:484)
	at com.google.javascript.jscomp.PhaseOptimizer$NamedPass.process(PhaseOptimizer.java:305)
	at com.google.javascript.jscomp.PhaseOptimizer.process(PhaseOptimizer.java:231)
	at com.google.javascript.jscomp.Compiler.check(Compiler.java:1110)
	at com.google.javascript.jscomp.Compiler.performChecksAndTranspilation(Compiler.java:910)
	at com.google.javascript.jscomp.Compiler.access$000(Compiler.java:101)
	at com.google.javascript.jscomp.Compiler$3.call(Compiler.java:844)
	at com.google.javascript.jscomp.Compiler$3.call(Compiler.java:841)
	at com.google.javascript.jscomp.CompilerExecutor$2.call(CompilerExecutor.java:93)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:748)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
dimvarcommented, Jul 12, 2017

I sent a fix for this internally for review. Hopefully it will be pushed externally tomorrow.

0reactions
dimvarcommented, Jul 11, 2017

I reproduced this and I’m in the process of debugging. I haven’t gotten to a small repro yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix and Avoid NullPointerException in Java - Rollbar
The NullPointerException occurs due to a situation in application code where an uninitialized object is attempted to be accessed or modified.
Read more >
NullPointerException when reading from external properties file
Looks like your Environment object is not loaded and binded and is null. Try to inject the Environment variable using @Resource. Replace
Read more >
Java NullPointerException - Detect, Fix, and Best Practices
The NullPointerException can occur if the argument is being passed as null. The same method can be written as below to avoid  ......
Read more >
Preventing NullPointerException - Wikibooks, open books for ...
NullPointerException is thrown when an application attempts to use an object reference that has the null value. These include: Calling an instance method...
Read more >
NullPointerException de-reference a null object in Apex code ...
This error is caused by a line of code that is trying to use an object that has not been instantiated, or an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found