Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 228429 - Saving files becomes no more possible for some unknown reason
Saving files becomes no more possible for some unknown reason
Status: RESOLVED DUPLICATE of bug 226254
Product: editor
Classification: Unclassified
Component: Painting & Printing
PC Linux
: P3 (vote)
: 7.4
Assigned To: Miloslav Metelka
Depends on:
  Show dependency treegraph
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

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

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 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.

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

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 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(
	at org.netbeans.modules.editor.lib2.view.HighlightsView.createFragment(
	at org.netbeans.modules.editor.lib2.view.WrapInfoUpdater.createFragment(
	at org.netbeans.modules.editor.lib2.view.WrapInfoUpdater.removeViewsAndSplitAtWordStart(
	at org.netbeans.modules.editor.lib2.view.WrapInfoUpdater.initWrapInfo(
	at org.netbeans.modules.editor.lib2.view.ParagraphViewChildren.buildWrapLines(
	at org.netbeans.modules.editor.lib2.view.ParagraphViewChildren.updateLayout(
	at org.netbeans.modules.editor.lib2.view.ParagraphView.updateLayoutAndScheduleRepaint(
	at org.netbeans.modules.editor.lib2.view.ParagraphView.checkLayoutUpdate(
	at org.netbeans.modules.editor.lib2.view.DocumentViewChildren.modelToViewChecked(
	at org.netbeans.modules.editor.lib2.view.DocumentView.modelToViewNeedsLock(
	at org.netbeans.modules.editor.lib2.view.DocumentView.modelToViewChecked(
	at org.netbeans.modules.editor.lib2.view.EditorView.modelToView(
	at javax.swing.plaf.basic.BasicTextUI$RootView.modelToView(
	at javax.swing.plaf.basic.BasicTextUI.modelToView(
	at org.netbeans.editor.BaseCaret$
	at org.netbeans.editor.BaseDocument.render(
	at org.netbeans.editor.BaseCaret.updateCaretBounds(
	at org.netbeans.editor.BaseCaret.update(
	at org.netbeans.editor.BaseCaret$
	at org.netbeans.editor.Utilities.runInEventDispatchThread(
	at org.netbeans.editor.BaseCaret.dispatchUpdate(
	at org.netbeans.editor.BaseCaret.modifiedUpdate(
	at org.netbeans.editor.BaseCaret.atomicUnlock(
	at org.netbeans.editor.BaseDocument.fireAtomicUnlock(
	at org.netbeans.editor.BaseDocument.atomicUnlockImpl(
	at org.netbeans.editor.BaseDocument.atomicUnlockImpl(
	at org.netbeans.editor.GuardedDocument.runAtomicAsUser(
	at org.netbeans.modules.editor.lib.BeforeSaveTasks$
	at org.netbeans.modules.editor.lib.TrailingWhitespaceRemove.runLocked(
	at org.netbeans.modules.editor.lib.BeforeSaveTasks$
	at org.netbeans.modules.editor.impl.ReformatBeforeSaveTask.runLocked(
	at org.netbeans.modules.editor.lib.BeforeSaveTasks$
	at org.netbeans.modules.editor.lib.BeforeSaveTasks.runTasks(
	at org.netbeans.modules.editor.lib.BeforeSaveTasks$
	at org.openide.text.CloneableEditorSupport.saveDocument(
	at org.openide.text.DataEditorSupport.superSaveDoc(
	at org.openide.text.DataEditorSupport$
	at org.openide.filesystems.EventControl.runAtomicAction(
	at org.openide.filesystems.FileSystem.runAtomicAction(
	at org.openide.filesystems.FileUtil.runAtomicAction(
	at org.openide.text.DataEditorSupport.saveDocument(
	at org.netbeans.modules.php.smarty.editor.TplEditorSupport.saveDocument(
	at org.netbeans.core.spi.multiview.text.MultiViewCloneableEditor$1.actionPerformed(
	at org.netbeans.core.spi.multiview.MultiViewFactory$DefaultCloseHandler.resolveCloseOperation(
	at org.netbeans.core.multiview.MultiViewPeer.canClose(
	at org.netbeans.core.multiview.MultiViewCloneableTopComponent.closeLast(
	at org.netbeans.swing.tabcontrol.TabbedContainer.postActionEvent(
	at org.netbeans.swing.tabcontrol.TabbedContainerUI.shouldPerformAction(
	at org.netbeans.swing.tabcontrol.plaf.DefaultTabbedContainerUI.access$2700(
	at org.netbeans.swing.tabcontrol.plaf.DefaultTabbedContainerUI$DisplayerActionListener.actionPerformed(
	at org.netbeans.swing.tabcontrol.TabDisplayer.postActionEvent(
	at org.netbeans.swing.tabcontrol.TabDisplayerUI.shouldPerformAction(
	at org.netbeans.swing.tabcontrol.plaf.BasicTabDisplayerUI.access$1700(
	at org.netbeans.swing.tabcontrol.plaf.BasicTabDisplayerUI$BasicDisplayerMouseListener.performCommand(
	at org.netbeans.swing.tabcontrol.plaf.BasicTabDisplayerUI$BasicDisplayerMouseListener.potentialCommand(
	at org.netbeans.swing.tabcontrol.plaf.BasicTabDisplayerUI$BasicDisplayerMouseListener.mouseReleased(
	at java.awt.AWTEventMulticaster.mouseReleased(
	at java.awt.AWTEventMulticaster.mouseReleased(
	at java.awt.Component.processMouseEvent(
	at javax.swing.JComponent.processMouseEvent(
	at java.awt.Component.processEvent(
	at java.awt.Container.processEvent(
	at java.awt.Component.dispatchEventImpl(
	at java.awt.Container.dispatchEventImpl(
	at java.awt.Component.dispatchEvent(
	at java.awt.LightweightDispatcher.retargetMouseEvent(
	at java.awt.LightweightDispatcher.processMouseEvent(
	at java.awt.LightweightDispatcher.dispatchEvent(
	at java.awt.Container.dispatchEventImpl(
	at java.awt.Window.dispatchEventImpl(
	at java.awt.Component.dispatchEvent(
	at java.awt.EventQueue.dispatchEventImpl(
	at java.awt.EventQueue.access$200(
	at java.awt.EventQueue$
	at java.awt.EventQueue$
	at Method)
	at java.awt.EventQueue$
	at java.awt.EventQueue$
	at Method)
	at java.awt.EventQueue.dispatchEvent(
	at org.netbeans.core.TimableEventQueue.dispatchEvent(
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(
	at java.awt.EventDispatchThread.pumpEventsForFilter(
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(
	at java.awt.EventDispatchThread.pumpEvents(
	at java.awt.EventDispatchThread.pumpEvents(
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 ***

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo