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 185366 - NullPointerException at com.sun.tools.javac.jvm.Code.typecode
Summary: NullPointerException at com.sun.tools.javac.jvm.Code.typecode
Status: RESOLVED WORKSFORME
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-03 15:32 UTC by lolo_101
Modified: 2012-05-23 12:08 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 154854


Attachments
stacktrace (4.39 KB, text/plain)
2010-05-03 15:32 UTC, lolo_101
Details
Patched javac (1.53 MB, application/octet-stream)
2010-05-05 12:10 UTC, Dusan Balek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lolo_101 2010-05-03 15:32:10 UTC
Build: NetBeans IDE 6.9 Beta (Build 201004200117)
VM: Java HotSpot(TM) Client VM, 16.3-b01, Java(TM) SE Runtime Environment, 1.6.0_20-b02
OS: Windows XP

User Comments:
GUEST: Update fresh commited files from svn repository




Stacktrace: 
java.lang.NullPointerException
   at com.sun.tools.javac.jvm.Code.typecode(Code.java:227)
   at com.sun.tools.javac.jvm.Items$Item.coerce(Items.java:269)
   at com.sun.tools.javac.jvm.Gen.genExpr(Gen.java:841)
   at com.sun.tools.javac.jvm.Gen.genArgs(Gen.java:858)
   at com.sun.tools.javac.jvm.Gen.visitNewClass(Gen.java:1763)
   at com.sun.tools.javac.tree.JCTree$JCNewClass.accept(JCTree.java:1355)
Comment 1 lolo_101 2010-05-03 15:32:14 UTC
Created attachment 98377 [details]
stacktrace
Comment 2 Dusan Balek 2010-05-04 11:14:11 UTC
Are you able to reproduce the issue? If so, is the issue reproducible even with
clean caches (deleted var/cache subdir of your userdir)? Thanks.
Comment 3 lolo_101 2010-05-04 20:00:28 UTC
Yes, this issue is systematic with this particuliar project. Event after deleting the entire cache directory and restarting NB.
Comment 4 Dusan Balek 2010-05-05 12:08:47 UTC
Great! 

Could you please try to clean your caches again, run NB with the patched javac (containing an additional logging), and attach then the messages.log file to this issue?

I will add the patched javac-impl.jar. You need to replace the netbeans/java/modules/ext/javac-impl-nb-7.0-b07.jar by it (it should be named javac-impl-nb-7.0-b07.jar)

cp javac-impl.jar netbeans/java/modules/ext/javac-impl-nb-7.0-b07.jar
Comment 5 Dusan Balek 2010-05-05 12:10:56 UTC
Created attachment 98483 [details]
Patched javac
Comment 6 lolo_101 2010-05-18 12:29:15 UTC
Hi Dusan Balek,

I patched my NB with your javac-impl.jar and the issue did not reproduce !
In addition, the project now runs fine !

Before that, one of the classes under the "build/classes" directory was deleted when I hit the "run" button and was replaced by a file with the same name but a ".rs" extension... Then the project obviously failed to run with a "ClassNotFoundException".

I couldn't find the messages.log, I guess it's because no exception rose this time. However I hope these clues will help to discover what was wrong.

Best regards