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 268865

Summary: Netbeans hangs on save
Product: editor Reporter: adaniels
Component: Painting & PrintingAssignee: Miloslav Metelka <mmetelka>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: 8.2   
Hardware: PC   
OS: Windows 10 x64   
Issue Type: DEFECT Exception Reporter:
Attachments: thread dump
thread dump
netbeans hangs on orginize imports on save

Description adaniels 2016-11-07 05:59:17 UTC
Created attachment 162805 [details]
thread dump

I believe I was just trying to save a file and the editor completely locked up. This has happened to me multiple times over the last few days. I may have had one of those new pinned watch windows open in one of the files. Not sure if that has anything to do with it or not.
Comment 1 adaniels 2016-11-07 06:18:51 UTC
Created attachment 162806 [details]
thread dump

Happened again just a few minutes after, I think on the exact same file. Don't think it has anything to do with the pinned windows as I had not started a debugger session. I think it occurred trying to save the same file as before.
Comment 2 adaniels 2016-11-15 14:26:44 UTC
Turning off the "On Save" actions "Organize Imports" and "Remove Unused Imports" seemed to make the hang go away. There was one particular file that would reliably hang on save with these save actions on. It has 63 imports and 3230 lines of code. When I performed the organize imports operation separately (not on save), it worked fine. After separately performing the organize imports command and turning the save actions back on, the hang on save was gone. So maybe it had something to do with a particularly complex arrangement of imports.
Comment 3 user2128506 2017-01-12 13:51:01 UTC
Created attachment 163380 [details]
netbeans hangs on orginize imports on save
Comment 4 Exilor 2017-06-08 17:32:49 UTC
This does seem to happen only in classes/files with pinned watches floating around.
Comment 5 aquaglia 2017-07-06 13:01:38 UTC
I am also experiencing the hanging of the editor on a specific Java file.
Turning off the "On Save" actions "Organize Imports" and "Remove Unused Imports" does not help in my case.
My impression is that it is linked to the Java Stream syntax.