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 147299 - Typing or clicking quickly causes attempt to resue compiler excpetion
Summary: Typing or clicking quickly causes attempt to resue compiler excpetion
Status: VERIFIED WORKSFORME
Alias: None
Product: javafx
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: PC Linux
: P4 blocker (vote)
Assignee: Anton Chechel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-15 19:00 UTC by jimidle
Modified: 2009-07-21 10:51 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
exception text (4.11 KB, text/plain)
2008-09-18 19:39 UTC, Lark Fitzgerald
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jimidle 2008-09-15 19:00:14 UTC
Open an existing project with a .fx file and as quickly as you can, click down the project, Source Packages, package,
xxx.fx tree. This will sometimes yield an exception (see below), as will typing in new code very quickly. Test platform
is Fedora FC9 64 bit SMP kernel, Netbeans 6.5.
Comment 1 David Strupl 2008-09-15 21:25:01 UTC
Jim, are you running with or without assertions enabled (check your $NETBEANS_HOME/etc/netbeans.conf for -J-ea). We
always run with assertions disabled (have deleted the -ea switch from the conf file).


The exception sent via mail was

java.lang.AssertionError: attempt to reuse JavaCompiler
	at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:733)
	at
com.sun.tools.javafx.main.JavafxJavaCompiler.backEnd(JavafxJavaCompiler.java:67)
	at
com.sun.tools.javafx.main.JavafxCompiler.backEnd(JavafxCompiler.java:813)
	at
com.sun.tools.javafx.main.JavafxCompiler.compile2(JavafxCompiler.java:766)
	at
com.sun.tools.javafx.main.JavafxCompiler.generate(JavafxCompiler.java:797)
	at
com.sun.tools.javafx.api.JavafxcTaskImpl.generate(JavafxcTaskImpl.java:266)
	at
org.netbeans.api.javafx.source.JavaFXSource.moveToPhase(JavaFXSource.java:268)
	at
org.netbeans.api.javafx.source.CompilationInfoImpl.toPhase(CompilationInfoImpl.java:131)
	at
org.netbeans.api.javafx.source.CompilationController.toPhase(CompilationController.java:72)
	at
org.netbeans.modules.javafx.source.scheduler.CompilationJob.run(CompilationJob.java:186)
	at java.util.concurrent.Executors
$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:885)
	at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:907)
[catch] at java.lang.Thread.run(Thread.java:619)
Comment 2 Lark Fitzgerald 2008-09-18 19:38:04 UTC
I do see an error when I type gibberish quickly, but it is not the same error.  I get:
NullPointerException at org.netbeans.lib.javafx.lexer.v4Lexer.mINVALIDC

It tends to happen most frequently when ( { or [ is used.  I'll attach the full error.


Comment 3 Lark Fitzgerald 2008-09-18 19:39:33 UTC
Created attachment 70116 [details]
exception text
Comment 4 Lark Fitzgerald 2008-09-18 19:40:42 UTC
Tested using FX Cont trunk build 191 on NB6.5:
Comment 5 Lark Fitzgerald 2008-09-18 19:58:25 UTC
Ah!  Turns out I can get this new error anytime I type the \
Comment 6 Lark Fitzgerald 2008-09-18 20:02:32 UTC
It also happens for:
`
~
!
@
^
&
Comment 7 Lark Fitzgerald 2008-09-18 20:14:52 UTC
Make sure that you do not confuse these two issues. Perhaps you should open a new bug for the abort when typing an 
unused character? The reuse of the java compiler is a different issue.

Jim

---------------------

Thanks! I have created a new issue for the NPE I have listed. http://www.netbeans.org/issues/show_bug.cgi?id=147654
Comment 8 David Strupl 2008-09-22 13:54:27 UTC
I am sorry to repeat the question but can you please answer this:

Jim, are you running with or without assertions enabled (check your $NETBEANS_HOME/etc/netbeans.conf for -J-ea)? We
always run with assertions disabled (have deleted the -ea switch from the conf file).
Comment 9 jimidle 2008-09-22 16:42:25 UTC
I don't turn off assertions as I need to see them for the compiler and so on. I wold have thought that turning off
assertions is just masking issues?
Comment 10 David Strupl 2008-09-22 22:04:38 UTC
Right - it is masking issues that we have no control over. The official policy for NetBeans builds is that the dev
builds are running with assertions enabled but the final release has the assertions disabled not to bother the end user.
By disabling the assertions we test the status that will the very end user see.

Please keep in mind that if the compiler fails to deliver something we just catch the exceptions and try to offer some
functionality without that information, e.g. no code completion, less colorful source code but are still able to
edit/save/compile/run/debug the source code for the end user.

I am putting also pnejedly to the Cc: of this issue - he is responsible for actual invoking the javafxc so he might also
cast some opinion on this.

In the ideal world I would also like to run with the assertions enabled but our job is to deliver something usable for
the end user and showing the exceptions is the last think the end user is interested in when editing his source. Of
course fixing the errors would be even nicer but before you came to this project our average time to fix an issue in the
compiler was rather high ;-)
Comment 11 Anton Chechel 2009-04-30 13:30:41 UTC
Jim, are you still able to reproduce it?
I am not on:

Product Version: NetBeans Platform 6.5 (Build 200903060201)
Java: 1.6.0_12; Java HotSpot(TM) Client VM 11.2-b01
System: Windows XP version 5.1 running on x86; Cp1251; ru_RU
Userdir: C:\Projects\NetBeans\trunk\javafx\build\testuserdir

lowering priority since end user won't see it, since -J-ea is disabled.
Comment 12 jimidle 2009-04-30 16:21:58 UTC
I don't seem to be getting this error any more, so I guess it can be closed. I think it might still be there though
unless someone has done something to avoid reusing the compiler object specifically.

Jim
Comment 13 Anton Chechel 2009-04-30 16:26:34 UTC
OK, thanks.
Comment 14 Alexandr Scherbatiy 2009-07-21 10:51:26 UTC
verified