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 128943 - make the "Generation Code..." dialog cancelable
Summary: make the "Generation Code..." dialog cancelable
Status: VERIFIED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: Manager (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Ayub Khan
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 129066 129069 129070
  Show dependency tree
 
Reported: 2008-03-02 20:53 UTC by Lukas Jungmann
Modified: 2008-03-05 17:06 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
waiting dialog from Find Usages (17.90 KB, image/png)
2008-03-02 20:54 UTC, Lukas Jungmann
Details
threaddump (18.31 KB, text/plain)
2008-03-04 16:18 UTC, Lukas Jungmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Jungmann 2008-03-02 20:53:23 UTC
-do something what causes long running classpath compilation task (ie open some NB module in the IDE for the first time)
-create some java app
-D'n'D some service from the web services manager into a class in javaapp

=> "Generation Code..." dialog appears, but since this dialog is modal, not cancelable and apparently waiting for the
end of classpath compilation task, user is forced to wait up to couple of minutes until classpath comp. ends - therefore
the dialog itself should be made cancelable
Comment 1 Lukas Jungmann 2008-03-02 20:54:17 UTC
Created attachment 57624 [details]
waiting dialog from Find Usages
Comment 2 Lukas Jungmann 2008-03-04 14:08:06 UTC
this can't be P3 since this also hides a kind of deadlock in following usecase:

-create java app
-dnd Zvent service into main method in main class
-select YouTubeVideos -> ListFeatured node in web service manager
-press Ctrl+C (Copy)
-open ZventService in the editor
-go to line 28
-press Ctrl+V (Paste)

=> see attached threaddump for details, briefly:

"Default RequestProcessor" daemon prio=10 tid=0x08385000 nid=0x5040 in Object.wait() [0xa9152000..0xa9152f40]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:485)
        at javax.swing.text.AbstractDocument.writeLock(AbstractDocument.java:1329)
        - locked <0x74887120> (a org.netbeans.modules.editor.java.JavaDocument)
        at org.netbeans.editor.BaseDocument.extWriteLock(BaseDocument.java:1413)
        - locked <0x74887120> (a org.netbeans.modules.editor.java.JavaDocument)
        at org.netbeans.editor.BaseDocument.atomicLock(BaseDocument.java:1448)
        - locked <0x74887120> (a org.netbeans.modules.editor.java.JavaDocument)
        at org.netbeans.modules.websvc.saas.codegen.java.SaasCodeGenerator.insert(SaasCodeGenerator.java:655)
        at
org.netbeans.modules.websvc.saas.codegen.java.JaxRsCodeGenerator.insertSaasServiceAccessCode(JaxRsCodeGenerator.java:371)
        at
org.netbeans.modules.websvc.saas.codegen.java.JaxRsJavaClientCodeGenerator.generate(JaxRsJavaClientCodeGenerator.java:85)
        at org.netbeans.modules.websvc.saas.codegen.java.JaxRsEditorDrop$1.run(JaxRsEditorDrop.java:146)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
...

"Java Source Worker Thread" prio=10 tid=0xb1221000 nid=0x4acc in Object.wait() [0xb47f8000..0xb47f90c0]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:485)
        at javax.swing.text.AbstractDocument.readLock(AbstractDocument.java:1372)
        - locked <0x74887120> (a org.netbeans.modules.editor.java.JavaDocument)
        at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1203)
        at org.netbeans.modules.java.source.parsing.SourceFileObject.getCharContentImpl(SourceFileObject.java:386)
        at org.netbeans.modules.java.source.parsing.SourceFileObject.<init>(SourceFileObject.java:109)
        at org.netbeans.modules.java.source.parsing.FileObjects.nbFileObject(FileObjects.java:227)
        at org.netbeans.api.java.source.JavaSource$DefaultJavaFileObjectProvider.createJavaFileObject(JavaSource.java:2402)
        at org.netbeans.api.java.source.CompilationInfoImpl.<init>(CompilationInfoImpl.java:92)
        at org.netbeans.api.java.source.JavaSource.createCurrentInfo(JavaSource.java:1992)
        at org.netbeans.api.java.source.JavaSource.access$3100(JavaSource.java:188)
        at org.netbeans.api.java.source.JavaSource$CompilationJob.run(JavaSource.java:1610)
        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)
        at java.lang.Thread.run(Thread.java:619)
...
Comment 3 Lukas Jungmann 2008-03-04 16:18:24 UTC
Created attachment 57748 [details]
threaddump
Comment 4 Ayub Khan 2008-03-05 00:09:58 UTC
Fixed in trunk as well as in nb6.1beta1 branch.
Comment 5 Lukas Jungmann 2008-03-05 14:39:51 UTC
v. in trunk and beta branch
Comment 6 Lukas Jungmann 2008-03-05 16:17:50 UTC
filed issue 129315 for fixing this properly for FCS