This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 270218 - NullPointerException at org.jetbrains.kotlin.utils.ProjectUtils.getSourceFilesWithDependencies
Summary: NullPointerException at org.jetbrains.kotlin.utils.ProjectUtils.getSourceFile...
Status: RESOLVED WONTFIX
Alias: None
Product: third-party
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 8.2
Hardware: All All
: P3 normal (vote)
Assignee: issues@third-party
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-27 19:46 UTC by aplatypus
Modified: 2017-03-31 09:10 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 228572


Attachments
stacktrace (2.50 KB, text/plain)
2017-03-27 19:46 UTC, aplatypus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description aplatypus 2017-03-27 19:46:25 UTC
Build: NetBeans IDE 8.2 (Build 201609300101)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.121-b13, Java(TM) SE Runtime Environment, 1.8.0_121-b13
OS: Linux

User Comments:
aplatypus: I get this when I try to start the debugger from Gradle.  I have restarted Netbeans a few times that does not help.




Stacktrace: 
java.lang.NullPointerException
   at org.jetbrains.kotlin.utils.ProjectUtils.getSourceFilesWithDependencies(ProjectUtils.java:179)
   at org.jetbrains.kotlin.debugger.KotlinSourcePathProvider.getURLFromProject(KotlinSourcePathProvider.java:63)
   at org.jetbrains.kotlin.debugger.KotlinSourcePathProvider.getURL(KotlinSourcePathProvider.java:114)
   at org.netbeans.modules.debugger.jpda.SourcePath$CompoundContextProvider.getURL(SourcePath.java:378)
   at org.netbeans.modules.debugger.jpda.SourcePath$CompoundContextProvider.getURL(SourcePath.java:378)
   at org.netbeans.modules.debugger.jpda.SourcePath.getURL(SourcePath.java:152)
Comment 1 aplatypus 2017-03-27 19:46:29 UTC
Created attachment 163958 [details]
stacktrace
Comment 2 Martin Entlicher 2017-03-28 11:08:53 UTC
Please report this at https://github.com/JetBrains/kotlin-netbeans
Comment 3 aplatypus 2017-03-29 22:13:58 UTC
UPDATE / WORKAROUND
-------------------

Previously I had deleted and completely reinstalled Netbeans application software on the Linux system.  At that time, I also removed the user cache directory.

Last night I removed the Netbeans "user directory" and restarted Netbeans

  * This FIXES the problem

So something has corrupted the information in the Netbeans user folder(s).

Deleting the user directory also corrected another problem with "Featured Demo" not loading (id: #270008)

  * https://netbeans.org/bugzilla/show_bug.cgi?id=270008

I feel dumping the entire User directory is somewhat of a drastic step.

  * Is there some way for me to identify Which component or area in the User directory might have caused the problem based on the logs or error messages?  


  * Are there some tools to analyse the User area?

  * Finally -- Performing this step requires a user to completely reinstall plugins and re-configure Netbeans.  Is there some way to avoid that and keep plugins (for example)?

There is still a NullPointerException caused by something 'saved' in the User/ folder.  What ever led to that corruption needs to be identified.  I have kept the user area if someone wants it zipped-up.  BUT - I am pretty sure it will contain passwords.

So is there a way to sanitise it first?
Comment 4 aplatypus 2017-03-29 22:17:45 UTC
I do not think this is "resolved" -- The NullPointerException is merely a symptom of a corruption inside the Netbeans User folder.

Once I deleted the User directory this component (again) worked, because I was able to debug.  

Therefore it is NOT the component but something going awry with the Netbeans management of that area this component relies on.
Comment 5 Martin Entlicher 2017-03-31 09:10:23 UTC
Until they fix it at https://github.com/JetBrains it will not be fixed.
This is why I suggested you to report the issue at https://github.com/JetBrains/kotlin-netbeans

With the removal of the Netbeans "user directory" you removed the incriminated module, this is why it "fixed" the issue.