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 228429 - Saving files becomes no more possible for some unknown reason
Summary: Saving files becomes no more possible for some unknown reason
Status: RESOLVED DUPLICATE of bug 226254
Alias: None
Product: editor
Classification: Unclassified
Component: Painting & Printing (show other bugs)
Version: 7.3
Hardware: PC Linux
: P3 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords: USABILITY
Depends on:
Blocks:
 
Reported: 2013-04-10 09:05 UTC by maxevron
Modified: 2013-08-27 13:32 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (36.60 KB, text/plain)
2013-04-10 09:05 UTC, maxevron
Details
Screenshot (513.24 KB, image/png)
2013-04-10 09:08 UTC, maxevron
Details
Thread dump (NB profile) (250.69 KB, application/octet-stream)
2013-04-19 09:15 UTC, maxevron
Details
Wrong syntax coloration (38.21 KB, image/png)
2013-04-19 13:21 UTC, maxevron
Details

Note You need to log in before you can comment on or make changes to this bug.
Description maxevron 2013-04-10 09:05:22 UTC
Product Version = NetBeans IDE 7.3 (Build 201302132200)
Operating System = Linux version 3.2.0-40-generic running on amd64
Java; VM; Vendor = 1.7.0_15
Runtime = OpenJDK 64-Bit Server VM 23.7-b01

Very often, when editing some smarty template files in remote server configuration, the IDE starts actions which are being accumulated and makes file saving no more possible. The IDE is still responding, as well as menus, but saving is not performed anymore whatever you try to do to ask for the files to be saved (CTRL + S, Menu File > Save). The only way to get the files saved is to close the IDE. In this case, as some files are not saved yet, the IDE asks if the files as to be saved prior to quit. Meanwhile, I can see a dialog (see screenshot to come) informing me some actions are "in progress". Exiting the IDE seems to kill these actions and makes saving possible again.
Comment 1 maxevron 2013-04-10 09:05:30 UTC
Created attachment 133409 [details]
IDE log
Comment 2 maxevron 2013-04-10 09:08:23 UTC
Created attachment 133410 [details]
Screenshot

Screenshot of IDE being exited and displaying a dialog information some actions are being processed
Comment 3 Ondrej Brejla 2013-04-16 13:21:39 UTC
Maybe Smarty related. But I think that Martin will need at least one thread dump (e.g. from jstack) and profiling snapshot [1]. Because noone knows, what these blocking actions are.

[1] http://wiki.netbeans.org/FaqProfileMeNow
Comment 4 maxevron 2013-04-16 13:49:57 UTC
I will provide a dump and/or a profiling snapshot the next time the issue appears. Thanks.
Comment 5 Martin Fousek 2013-04-18 06:34:08 UTC
Thanks maxevron for reporting. As Ondra mentioned it's hard to guess what happens there w/out the thread dump. Please attach it using NB profile or rather 'jps' + 'jstack <pid>' and reopen the issue, thanks a lot...
Comment 6 maxevron 2013-04-19 09:14:51 UTC
Hi,

As requested, I reopened this issue and attached a thread dump (NB profile).

Note: while editing some Javascript included in a Smarty template file, the syntax coloration was not well applied. Meanwhile, undoing/redoing modified some text a few lines lower in the code (HTML), out of the javascript block I was editing. Crazy behavior. 

Hope this helps.
Comment 7 maxevron 2013-04-19 09:15:39 UTC
Created attachment 133587 [details]
Thread dump (NB profile)
Comment 8 Martin Fousek 2013-04-19 11:52:19 UTC
Thanks for the thread dump. Editor is not able to save document because of the lock on it, but hard to say what is holding it (what didn't release the lock). I'm going to investigate it more next week.
Comment 9 maxevron 2013-04-19 13:21:20 UTC
Created attachment 133597 [details]
Wrong syntax coloration
Comment 10 maxevron 2013-04-19 13:22:51 UTC
Thanks Martin.

The bug occured one more. As you can see in https://netbeans.org/bugzilla/attachment.cgi?id=133597 a syntax coloration problem occurs at this precise moment. Maybe a clue.
Comment 11 maxevron 2013-04-19 13:25:42 UTC
Oupps. I did not notice this exception displayed at the bottom of the IDE window:

java.lang.IllegalArgumentException: Illegal bounds: <82167,82180> outside of <82182,82191>
	at org.netbeans.modules.editor.lib2.view.ViewUtils.checkFragmentBounds(ViewUtils.java:402)
	at org.netbeans.modules.editor.lib2.view.HighlightsView.createFragment(HighlightsView.java:261)
	at org.netbeans.modules.editor.lib2.view.WrapInfoUpdater.createFragment(WrapInfoUpdater.java:525)
	at org.netbeans.modules.editor.lib2.view.WrapInfoUpdater.removeViewsAndSplitAtWordStart(WrapInfoUpdater.java:422)
	at org.netbeans.modules.editor.lib2.view.WrapInfoUpdater.initWrapInfo(WrapInfoUpdater.java:187)
	at org.netbeans.modules.editor.lib2.view.ParagraphViewChildren.buildWrapLines(ParagraphViewChildren.java:386)
	at org.netbeans.modules.editor.lib2.view.ParagraphViewChildren.updateLayout(ParagraphViewChildren.java:380)
	at org.netbeans.modules.editor.lib2.view.ParagraphView.updateLayoutAndScheduleRepaint(ParagraphView.java:277)
	at org.netbeans.modules.editor.lib2.view.ParagraphView.checkLayoutUpdate(ParagraphView.java:263)
	at org.netbeans.modules.editor.lib2.view.DocumentViewChildren.modelToViewChecked(DocumentViewChildren.java:316)
	at org.netbeans.modules.editor.lib2.view.DocumentView.modelToViewNeedsLock(DocumentView.java:738)
	at org.netbeans.modules.editor.lib2.view.DocumentView.modelToViewChecked(DocumentView.java:724)
	at org.netbeans.modules.editor.lib2.view.EditorView.modelToView(EditorView.java:249)
	at javax.swing.plaf.basic.BasicTextUI$RootView.modelToView(BasicTextUI.java:1509)
	at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:1047)
	at org.netbeans.editor.BaseCaret$2.run(BaseCaret.java:430)
	at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1383)
	at org.netbeans.editor.BaseCaret.updateCaretBounds(BaseCaret.java:413)
	at org.netbeans.editor.BaseCaret.update(BaseCaret.java:760)
	at org.netbeans.editor.BaseCaret$4.run(BaseCaret.java:725)
	at org.netbeans.editor.Utilities.runInEventDispatchThread(Utilities.java:1047)
	at org.netbeans.editor.BaseCaret.dispatchUpdate(BaseCaret.java:716)
	at org.netbeans.editor.BaseCaret.modifiedUpdate(BaseCaret.java:1445)
	at org.netbeans.editor.BaseCaret.atomicUnlock(BaseCaret.java:1462)
	at org.netbeans.editor.BaseDocument.fireAtomicUnlock(BaseDocument.java:1810)
	at org.netbeans.editor.BaseDocument.atomicUnlockImpl(BaseDocument.java:1746)
	at org.netbeans.editor.BaseDocument.atomicUnlockImpl(BaseDocument.java:1735)
	at org.netbeans.editor.GuardedDocument.runAtomicAsUser(GuardedDocument.java:356)
	at org.netbeans.modules.editor.lib.BeforeSaveTasks$TaskRunnable.run(BeforeSaveTasks.java:156)
	at org.netbeans.modules.editor.lib.TrailingWhitespaceRemove.runLocked(TrailingWhitespaceRemove.java:102)
	at org.netbeans.modules.editor.lib.BeforeSaveTasks$TaskRunnable.run(BeforeSaveTasks.java:153)
	at org.netbeans.modules.editor.impl.ReformatBeforeSaveTask.runLocked(ReformatBeforeSaveTask.java:124)
	at org.netbeans.modules.editor.lib.BeforeSaveTasks$TaskRunnable.run(BeforeSaveTasks.java:153)
	at org.netbeans.modules.editor.lib.BeforeSaveTasks.runTasks(BeforeSaveTasks.java:130)
	at org.netbeans.modules.editor.lib.BeforeSaveTasks$2.run(BeforeSaveTasks.java:111)
	at org.openide.text.CloneableEditorSupport.saveDocument(CloneableEditorSupport.java:1151)
	at org.openide.text.DataEditorSupport.superSaveDoc(DataEditorSupport.java:602)
	at org.openide.text.DataEditorSupport$SaveImpl.run(DataEditorSupport.java:1315)
	at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:127)
	at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:609)
	at org.openide.filesystems.FileUtil.runAtomicAction(FileUtil.java:415)
	at org.openide.text.DataEditorSupport.saveDocument(DataEditorSupport.java:598)
	at org.netbeans.modules.php.smarty.editor.TplEditorSupport.saveDocument(TplEditorSupport.java:124)
	at org.netbeans.core.spi.multiview.text.MultiViewCloneableEditor$1.actionPerformed(MultiViewCloneableEditor.java:240)
	at org.netbeans.core.spi.multiview.MultiViewFactory$DefaultCloseHandler.resolveCloseOperation(MultiViewFactory.java:301)
	at org.netbeans.core.multiview.MultiViewPeer.canClose(MultiViewPeer.java:680)
	at org.netbeans.core.multiview.MultiViewCloneableTopComponent.closeLast(MultiViewCloneableTopComponent.java:317)
	at org.openide.windows.CloneableTopComponent$Ref.unregister(CloneableTopComponent.java:412)
	at org.openide.windows.CloneableTopComponent$Ref.access$300(CloneableTopComponent.java:276)
	at org.openide.windows.CloneableTopComponent.canClose(CloneableTopComponent.java:215)
	at org.netbeans.core.windows.Central.removeModeTopComponent(Central.java:978)
	at org.netbeans.core.windows.Central.userClosedTopComponent(Central.java:2032)
	at org.netbeans.core.windows.view.DefaultView.userClosedTopComponent(DefaultView.java:794)
	at org.netbeans.core.windows.view.ui.TabbedHandler.actionPerformed(TabbedHandler.java:337)
	at org.netbeans.swing.tabcontrol.TabbedContainer.postActionEvent(TabbedContainer.java:730)
	at org.netbeans.swing.tabcontrol.TabbedContainerUI.shouldPerformAction(TabbedContainerUI.java:165)
	at org.netbeans.swing.tabcontrol.plaf.DefaultTabbedContainerUI.access$2700(DefaultTabbedContainerUI.java:112)
	at org.netbeans.swing.tabcontrol.plaf.DefaultTabbedContainerUI$DisplayerActionListener.actionPerformed(DefaultTabbedContainerUI.java:1285)
	at org.netbeans.swing.tabcontrol.TabDisplayer.postActionEvent(TabDisplayer.java:612)
	at org.netbeans.swing.tabcontrol.TabDisplayerUI.shouldPerformAction(TabDisplayerUI.java:193)
	at org.netbeans.swing.tabcontrol.plaf.BasicTabDisplayerUI.access$1700(BasicTabDisplayerUI.java:121)
	at org.netbeans.swing.tabcontrol.plaf.BasicTabDisplayerUI$BasicDisplayerMouseListener.performCommand(BasicTabDisplayerUI.java:782)
	at org.netbeans.swing.tabcontrol.plaf.BasicTabDisplayerUI$BasicDisplayerMouseListener.potentialCommand(BasicTabDisplayerUI.java:767)
	at org.netbeans.swing.tabcontrol.plaf.BasicTabDisplayerUI$BasicDisplayerMouseListener.mouseReleased(BasicTabDisplayerUI.java:816)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
	at java.awt.Component.processMouseEvent(Component.java:6505)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3312)
	at java.awt.Component.processEvent(Component.java:6270)
	at java.awt.Container.processEvent(Container.java:2229)
	at java.awt.Component.dispatchEventImpl(Component.java:4861)
	at java.awt.Container.dispatchEventImpl(Container.java:2287)
	at java.awt.Component.dispatchEvent(Component.java:4687)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
	at java.awt.Container.dispatchEventImpl(Container.java:2273)
	at java.awt.Window.dispatchEventImpl(Window.java:2719)
	at java.awt.Component.dispatchEvent(Component.java:4687)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:729)
	at java.awt.EventQueue.access$200(EventQueue.java:103)
	at java.awt.EventQueue$3.run(EventQueue.java:688)
	at java.awt.EventQueue$3.run(EventQueue.java:686)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.awt.EventQueue$4.run(EventQueue.java:702)
	at java.awt.EventQueue$4.run(EventQueue.java:700)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:699)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Comment 12 Martin Fousek 2013-04-22 07:26:57 UTC
It looks to me that the editor's IAE prevents unlocking of the document and the TPL DataObject is not able to save the document then. Passing to the editor, looks to be related.
Comment 13 Miloslav Metelka 2013-08-27 13:32:43 UTC

*** This bug has been marked as a duplicate of bug 226254 ***