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 267333 - NullPointerException at org.netbeans.modules.python.project2.PythonProjectSourceLevelQuery.findValue
Summary: NullPointerException at org.netbeans.modules.python.project2.PythonProjectSou...
Status: STARTED
Alias: None
Product: python
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.2
Hardware: All All
: P4 normal (vote)
Assignee: Jenselme
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-27 13:31 UTC by Jenselme
Modified: 2016-09-19 13:00 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 224312


Attachments
stacktrace (2.99 KB, text/plain)
2016-07-27 13:31 UTC, Jenselme
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jenselme 2016-07-27 13:31:30 UTC
Build: NetBeans IDE Dev (Build 201607250002)
VM: OpenJDK 64-Bit Server VM, 25.92-b14, OpenJDK Runtime Environment, 1.8.0_92-b14
OS: Linux

User Comments:
GUEST: <Proporcione una descripci
Comment 1 Jenselme 2016-07-27 13:31:32 UTC
Created attachment 161464 [details]
stacktrace
Comment 2 Jenselme 2016-07-27 13:37:30 UTC
Jenselme: 1. Right click on package
2. Add module (for python)
3. Enter file name (auth)
4. Click Finish

Exception occurred. 

Side note: This happened just after I switched branch: from branch A with a file auth.py that existed to a branch B without this file. I then tried to create the file.
Comment 3 Jenselme 2016-09-13 16:09:46 UTC
I can reproduce when I create a file with a project opened from a symlink.
Comment 4 Jenselme 2016-09-19 13:00:58 UTC
changeset:   18427:4c0a7a6488cf
tag:         tip
user:        Julien Enselme <jenselme@netbeans.org>
date:        Mon Sep 19 14:59:43 2016 +0200
files:       python.project2/src/org/netbeans/modules/python/project2/PythonProject2.java
description:
#267333 Prevent NullPointerException if no platform is defined for project

In PythonProjectSourceLevelQuery.findValue we relied on the platform for the project but it may not be defined. In this case, we use the default platfrom instead.