[jboss-user] [JBoss Tools (users)] - Re: FreeMarker IDE Hangs Consistently
JIRA issue created here: https://jira.jboss.org/jira/browse/JBIDE-3661 I made an assumption that the cause actually is non-disposed images. I'll try to verify/fix myself in a few weeks if no one gets to it before then. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4205106#4205106 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4205106 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Tools (users)] - Re: FreeMarker IDE Hangs Consistently
Cool. I'll create the report in JIRA. I started looking through the code in SVN. I haven't done Eclipse plugin dev in a long time, and can't take the time to learn/setup a plugin dev environment right now. Maybe in a week or so. Just looking through code in SVN trunk though, I doesn't look like the label images used in the tree are ever being disposed. The ImageManager creates the image here: public static Image getImage(String filename) { | if (null == filename) return null; | ImageDescriptor temp = getImageDescriptor(filename); | if(null!=temp) { | return temp.createImage(); | } else { | return null; | } | } They get used in OutlineLabelProvider here: public Image getImage(Object anElement) { | if (null == anElement) | return null; | if (anElement instanceof Item) { | return ImageManager.getImage(((Item) anElement).getTreeImage()); | } | else { | return null; | } | } And from what I can see, they are never disposed. My guess is that the outline labels are reconstructed quite often, and so more and more images get created but never disposed. Assuming SWT images are immutable and can be reused, the fix could be as simple as modifying OutlineLabelProvider to cache the images in a map by filename. Then, making sure they are reused on every call to the provider. (Should also dispose them when the OutlineLabelProvider is disposed, but if the images are being reused, it probably doesn't matter much.) View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4205103#4205103 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4205103 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Tools (users)] - Re: FreeMarker IDE Hangs Consistently
That is probably a bug in freemarker ide code. Report it in jira - but even better provide a patch (the old maintainer is not active anymore, so contributions like this will be very welcome) View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4205093#4205093 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4205093 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Tools (users)] - Re: FreeMarker IDE Hangs Consistently
If a view is not shown, not minimized, and otherwise not part of what Eclipse is running, it shouldn't be loaded at all, as Eclipse lazy-loads classes only when they're actually referenced. -vm should point to java.exe or javaw.exe, not \bin. your Eclipse is running with your system's default VM, which may (coincidentally) be the one you think you've specified. You can check what Eclipse is actually using in Help > About > Configuration, or explicitly set -vm c:\path\to\java.exe to force a specific one. As to the "No more handles" SWT problem, I've only ever seen - and solved - that on Linux, which involved this: # fix for org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed] | # fix for Failed to invoke suite():org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed] | ulimit -c unlimited; # set corefile size to unlimited | export JAVA_HIGH_ZIPFDS=500 | export LANG=C. Here's what Google has to say: http://www.google.com/search?ie=UTF-8&oe=UTF-8&sourceid=navclient&gfns=1&q=swt+no+more+handles View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4205063#4205063 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4205063 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Tools (users)] - Re: FreeMarker IDE Hangs Consistently
I've done a little reading on Internet, but have not yet looked at Freemarker IDE source. My best guess at this point is that the Freemarker outline view has small resource leak somewhere with respect to the image icons that it uses. It might or might be multi-threading related. It's also possible that the image handle leak is actually somewhere else, but is accelerated when using FreeMarker plugin. Is there any way to disable the Freemarker outline view? (I can try hiding/removing it from my perspective, but I get the sense it is still executing in the background. I'll try it for a while though.) View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4205059#4205059 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4205059 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Tools (users)] - Re: FreeMarker IDE Hangs Consistently
Thanks for the reply. I have used adjusted the memory settings previously, and that did not make a difference. Fwiw, I'm currently using: -vm c:\jdk-1.6\bin -vmargs -Xms128M -Xmx1024M -XX:PermSize=256M -XX:MaxPermSize=512M | Your link to FAQ entries pointed me to the workspace log though, which I hadn't looked at previously. Looking there after crashing again (just now), I see the stack trace below that seems to orginate in the FreeMarker plugin. I've only pasted part of it here. It seems a number of unhandled exceptions get thrown once this starts. I can send the entire trace to whoever wants it. Should I post a JIRA issue for this? (I definitely would if anyone else confirmed they have same problem.) - !ENTRY org.eclipse.ui 4 0 2009-01-27 14:06:20.953 | !MESSAGE Unhandled event loop exception | !STACK 0 | org.eclipse.swt.SWTError: No more handles | at org.eclipse.swt.SWT.error(SWT.java:3803) | at org.eclipse.swt.SWT.error(SWT.java:3695) | at org.eclipse.swt.SWT.error(SWT.java:3666) | at org.eclipse.swt.internal.ImageList.copyWithAlpha(ImageList.java:175) | at org.eclipse.swt.internal.ImageList.set(ImageList.java:405) | at org.eclipse.swt.internal.ImageList.add(ImageList.java:66) | at org.eclipse.swt.widgets.Tree.imageIndex(Tree.java:3618) | at org.eclipse.swt.widgets.TreeItem.setImage(TreeItem.java:1685) | at org.eclipse.jface.viewers.TreeViewerRow.setImage(TreeViewerRow.java:166) | at org.eclipse.jface.viewers.ViewerCell.setImage(ViewerCell.java:170) | at org.eclipse.jface.viewers.WrappedViewerLabelProvider.update(WrappedViewerLabelProvider.java:166) | at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:145) | at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:932) | at org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run(AbstractTreeViewer.java:102) | at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) | at org.eclipse.core.runtime.Platform.run(Platform.java:880) | at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48) | at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) | at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:1012) | at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:466) | at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) | at org.eclipse.core.runtime.Platform.run(Platform.java:880) | at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48) | at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) | at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2041) | at org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem(AbstractTreeViewer.java:827) | at org.eclipse.jface.viewers.AbstractTreeViewer$1.run(AbstractTreeViewer.java:802) | at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) | at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:776) | at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:634) | at org.eclipse.jface.viewers.AbstractTreeViewer.internalExpandToLevel(AbstractTreeViewer.java:1702) | at org.eclipse.jface.viewers.AbstractTreeViewer.internalExpandToLevel(AbstractTreeViewer.java:1712) | at org.eclipse.jface.viewers.AbstractTreeViewer.internalExpandToLevel(AbstractTreeViewer.java:1712) | at org.eclipse.jface.viewers.AbstractTreeViewer.expandToLevel(AbstractTreeViewer.java:1054) | at org.eclipse.jface.viewers.AbstractTreeViewer.expandToLevel(AbstractTreeViewer.java:1035) | at org.jboss.ide.eclipse.freemarker.outline.OutlinePage.update(OutlinePage.java:111) | at org.jboss.ide.eclipse.freemarker.editor.Editor.keyReleased(Editor.java:399) | at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:162) | at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) | at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) | at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027) | at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1012) | at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1040) | at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1036) | at org.eclipse.swt.widgets.Widget.wmKeyUp(Widget.java:1753) | at org.eclipse.swt.widgets.Control.WM_KEYUP(Control.java:4126) | at org.eclipse.swt.widgets.Control.windowProc(Control.java:3819) | at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:337) | at org.eclipse.swt.widgets.Display.windowProc(Display.java:4541) | at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) | at org.eclipse.swt.i
[jboss-user] [JBoss Tools (users)] - Re: FreeMarker IDE Hangs Consistently
Forgive me if you've already done this, but I have to ask... have you increased the default permgen or heap space for Eclipse? http://wiki.eclipse.org/IRC_FAQ#I.27m_having_memory.2C_heap.2C_or_permgen_problems.2C_what_can_I_do.3F On windows you can also CTRl_ALT-DEL to get the Task Manager, and kill processes from there, if you're not running Eclipse in a console. If you do run in console, you can also get osgi debugging information: http://wiki.eclipse.org/IRC_FAQ#How_do_I_debug_Eclipse.3F_How_can_I_see_what_plugins_are_being_started.3F_How_do_I_start_the_OSGi_console.3F View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4205049#4205049 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4205049 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user