rostanek / freemarker-support-for-netbeans

FreeMarker support for NetBeans including syntax coloring, parsing etc. new features will be added soon.
GNU General Public License v3.0
19 stars 7 forks source link

Netbeans freezes after opening a freemarker template #10

Closed lallafa closed 8 years ago

lallafa commented 8 years ago

Netbeans does not reponse after opening a template (Plugin version 1.7).

Messages.log has no message.Threaddump shows this thread.

"AWT-EventQueue-0" #21 prio=6 os_prio=0 tid=0x000000001a2e0800 nid=0x1460 in Object.wait() [0x0000000020acd000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at org.openide.text.CloneableEditorInitializer.waitForFinishedInitialization(CloneableEditorInitializer.java:138)
    - locked <0x0000000082a25c90> (a java.util.ArrayList)
    at org.openide.text.CloneableEditor.getEditorPane(CloneableEditor.java:698)
    at org.netbeans.core.multiview.MultiViewCloneableTopComponent.getEditorPane(MultiViewCloneableTopComponent.java:299)
    at org.openide.text.CloneableEditorSupport.getOpenedPanes(CloneableEditorSupport.java:853)
    at org.netbeans.freemarker.highlight.FTLHighlighter.<init>(FTLHighlighter.java:50)
    at org.netbeans.freemarker.highlight.FTLHighlightFactory.getHighlighter(FTLHighlightFactory.java:19)
    at org.netbeans.freemarker.highlight.FTLHighlightFactory.createLayers(FTLHighlightFactory.java:26)
    at org.netbeans.modules.editor.lib2.highlighting.HighlightingManager$Highlighting.rebuildAllLayersImpl(HighlightingManager.java:397)
    at org.netbeans.modules.editor.lib2.highlighting.HighlightingManager$Highlighting$4.run(HighlightingManager.java:376)
    at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1386)
    at org.netbeans.modules.editor.lib2.highlighting.HighlightingManager$Highlighting.rebuildAllLayers(HighlightingManager.java:373)
    - locked <0x00000000db23d1d0> (a org.netbeans.modules.editor.lib2.highlighting.HighlightingManager$Highlighting)
    at org.netbeans.modules.editor.lib2.highlighting.HighlightingManager$Highlighting.rebuildAll(HighlightingManager.java:359)
    - locked <0x00000000db23d1d0> (a org.netbeans.modules.editor.lib2.highlighting.HighlightingManager$Highlighting)
    at org.netbeans.modules.editor.lib2.highlighting.HighlightingManager$Highlighting.<init>(HighlightingManager.java:227)
    at org.netbeans.modules.editor.lib2.highlighting.HighlightingManager.<init>(HighlightingManager.java:175)
    at org.netbeans.modules.editor.lib2.highlighting.HighlightingManager.getInstance(HighlightingManager.java:103)
    - locked <0x0000000084ceaef8> (a java.lang.Class for org.netbeans.modules.editor.lib2.highlighting.HighlightingManager)
    at org.netbeans.modules.editor.lib2.view.HighlightsViewFactory.<init>(HighlightsViewFactory.java:155)
    at org.netbeans.modules.editor.lib2.view.HighlightsViewFactory$HighlightsFactory.createEditorViewFactory(HighlightsViewFactory.java:437)
    at org.netbeans.modules.editor.lib2.view.ViewUpdates.initFactories(ViewUpdates.java:157)
    at org.netbeans.modules.editor.lib2.view.DocumentViewOp.parentViewSet(DocumentViewOp.java:586)
    at org.netbeans.modules.editor.lib2.view.DocumentView$4.run(DocumentView.java:637)
    at org.netbeans.modules.editor.lib2.view.DocumentView.runTransaction(DocumentView.java:226)
    at org.netbeans.modules.editor.lib2.view.DocumentView$1.run(DocumentView.java:239)
    at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1386)
    at org.netbeans.modules.editor.lib2.view.DocumentView.runReadLockTransaction(DocumentView.java:236)
    at org.netbeans.modules.editor.lib2.view.DocumentView.setParent(DocumentView.java:632)
    at javax.swing.plaf.basic.BasicTextUI$RootView.setView(BasicTextUI.java:1328)
    at javax.swing.plaf.basic.BasicTextUI.setView(BasicTextUI.java:693)
    at org.netbeans.editor.BaseTextUI.modelChanged(BaseTextUI.java:159)
    at javax.swing.plaf.basic.BasicTextUI$UpdateHandler.propertyChange(BasicTextUI.java:1794)
    at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
    at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327)
    at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263)
    at java.awt.Component.firePropertyChange(Component.java:8430)
    at org.openide.text.QuietEditorPane.firePropertyChange(QuietEditorPane.java:231)
    at javax.swing.text.JTextComponent.setDocument(JTextComponent.java:443)
    at org.openide.text.QuietEditorPane.setDocument(QuietEditorPane.java:184)
    at org.openide.text.CloneableEditorInitializer.setKitAndDocumentToPaneInEDT(CloneableEditorInitializer.java:588)
    at org.openide.text.CloneableEditorInitializer.run(CloneableEditorInitializer.java:341)
    at org.openide.text.CloneableEditorInitializer.processPendingEDTRequests(CloneableEditorInitializer.java:158)
    at org.openide.text.CloneableEditorInitializer$1.run(CloneableEditorInitializer.java:107)
    at org.netbeans.core.windows.WindowManagerImpl$Exclusive$1.run(WindowManagerImpl.java:1563)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
    at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
lallafa commented 8 years ago

I tried to find errors in the template but it turns out that the content of the template file does not matter (it can be empty).

It seems that the file names of the templates in the folder are relevant (see attached image). Opening "gm_kundenanschreiben.ftl" (can be empty, does not matter) causes the error:

zwischenablage01

rostanek commented 8 years ago

I'm not reproducing this bug. Can you prepare small project which always causes that error? Which version of NetBeans are you using? Do you have multiple editor views or something unusual?

lallafa commented 8 years ago

I'm using NetBeans IDE 8.1 (Build 201510222201).

I can't reproduce the error anymore. It happened over more than 10 IDE restarts (over several days). But it is gone now. Maybe it is related to version control status of files (SVN).