[jira] [Commented] (NETBEANS-5251) NPE when opening js file

2021-02-12 Thread Roman Ciloci (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-5251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17284085#comment-17284085
 ] 

Roman Ciloci commented on NETBEANS-5251:


I looked through the code a little bit following the stack trace.

Looks like NodeJsDataProvider.java is copying the NodeJS API doc from 
[https://nodejs.org/api/] and putting it in the /nodejs-doc 
folder in the all.json file. It's a big file, ~4MB of API documentation in JSON 
format

The file is parsed first time I open NetBeans, looks like.

When parsing the file it seems some (or just one) of the nodes in the all.json 
file don't have a "desc" attribute

-

String doc = getJSONStringProperty(jsonObject, DESCRIPTION);
 object.setDocumentation(Documentation.create(doc, 
getDocumentationURL(propertyName)));

-

And since the description is null hence it throws the NPE exception in 
Documentation.java.

I don't have a dev environment set up to be able to debug which exact node 
doesn't have a description and the file is too big to scan it visually.

I do have Node.js installed on my machine.

Some questions:

Does NetBeans detect that I have Node installed on my machine and that's why 
it's trying to download the API and parse that all.json file ?

Maybe if someone doesn't have Node installed on their machine it doesn't happen 
for them since it's not trying to download he Node API documentation ?

> NPE when opening js file
> 
>
> Key: NETBEANS-5251
> URL: https://issues.apache.org/jira/browse/NETBEANS-5251
> Project: NetBeans
>  Issue Type: Bug
>  Components: javascript - Editor
>Affects Versions: 12.2
> Environment: Windows 10
> OpenJDK 11
>Reporter: Roman Ciloci
>Priority: Major
> Attachments: IDELog.txt, UILog.txt, testproject.zip
>
>
> # Installed NetBeans 12.2
>  # Started NetBeans
>  # Go to File -> Open File...
>  # Selected a js file to open
>  # Got a NullPointerException
>  
> Note:
> The file was somewhat big ~3MB. I did get the prompt about the file being too 
> large and it could cause memory issues.
> Eventually the file opened and I was able to edit it but I did get the dialog 
> about reporting the exception so I'm creating this issue with the information 
> from the issue reporting dialog.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[jira] [Commented] (NETBEANS-5251) NPE when opening js file

2021-02-11 Thread Roman Ciloci (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-5251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17283484#comment-17283484
 ] 

Roman Ciloci commented on NETBEANS-5251:


I cleared the cache folder multiple times without success.

The exception is thrown every time I (re)open NetBeans and open the first js 
file

 

One thing I noticed is the status bar shows 'Loading NodeJS Documentation' and 
then the error is shown in the notification area.

Not sure if it's related though.

Hope this helps.

> NPE when opening js file
> 
>
> Key: NETBEANS-5251
> URL: https://issues.apache.org/jira/browse/NETBEANS-5251
> Project: NetBeans
>  Issue Type: Bug
>  Components: javascript - Editor
>Affects Versions: 12.2
> Environment: Windows 10
> OpenJDK 11
>Reporter: Roman Ciloci
>Priority: Major
> Attachments: IDELog.txt, UILog.txt, testproject.zip
>
>
> # Installed NetBeans 12.2
>  # Started NetBeans
>  # Go to File -> Open File...
>  # Selected a js file to open
>  # Got a NullPointerException
>  
> Note:
> The file was somewhat big ~3MB. I did get the prompt about the file being too 
> large and it could cause memory issues.
> Eventually the file opened and I was able to edit it but I did get the dialog 
> about reporting the exception so I'm creating this issue with the information 
> from the issue reporting dialog.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[jira] [Created] (NETBEANS-5251) NPE when opening js file

2021-01-15 Thread Roman Ciloci (Jira)
Roman Ciloci created NETBEANS-5251:
--

 Summary: NPE when opening js file
 Key: NETBEANS-5251
 URL: https://issues.apache.org/jira/browse/NETBEANS-5251
 Project: NetBeans
  Issue Type: Bug
  Components: javascript - Editor
Affects Versions: 12.2
 Environment: Windows 10
OpenJDK 11
Reporter: Roman Ciloci
 Attachments: IDELog.txt, UILog.txt

# Installed NetBeans 12.2
 # Started NetBeans
 # Go to File -> Open File...
 # Selected a js file to open
 # Got a NullPointerException

 

Note:

The file was somewhat big ~3MB. I did get the prompt about the file being too 
large and it could cause memory issues.

Eventually the file opened and I was able to edit it but I did get the dialog 
about reporting the exception so I'm creating this issue with the information 
from the issue reporting dialog.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists