Bug 201098 - Create new java template feature crashes Europa
Summary: Create new java template feature crashes Europa
Status: RESOLVED DUPLICATE of bug 142965
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows 2000
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Steve Northover CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-24 11:31 EDT by Ray Malone CLA
Modified: 2008-04-25 10:56 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ray Malone CLA 2007-08-24 11:31:14 EDT
Build ID: I20070621-1340

Steps To Reproduce:
1.Go to File > Preference > Java > Editor > Templates
2.Click "New"
3.Enter in a name, description, and snippet to be used
4.Choose "Java" in the dropdown and check "insert automatically"
5.Click "ok"
6.The new tempate should now show in the templates table but it does not.
7.Try clicking "ok" or "apply" and the following error dialog appears "an error has occurred, check the logs for details"



More information:
The error log shows the following...

!ENTRY org.eclipse.ui 4 0 2007-08-24 11:08:59.735
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.ArrayIndexOutOfBoundsException: 4
	at org.eclipse.swt.widgets.Table.releaseChildren(Table.java:2632)
	at org.eclipse.swt.widgets.Widget.release(Widget.java:743)
	at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:662)
	at org.eclipse.swt.widgets.Widget.release(Widget.java:743)
	at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:662)
	at org.eclipse.swt.widgets.Widget.release(Widget.java:743)
	at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:662)
	at org.eclipse.swt.widgets.Widget.release(Widget.java:743)
	at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:662)
	at org.eclipse.swt.widgets.Widget.release(Widget.java:743)
	at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:662)
	at org.eclipse.swt.widgets.Widget.release(Widget.java:743)
	at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:662)
	at org.eclipse.swt.widgets.Widget.release(Widget.java:743)
	at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:662)
	at org.eclipse.swt.widgets.Widget.release(Widget.java:743)
	at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:662)
	at org.eclipse.swt.widgets.Widget.release(Widget.java:743)
	at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:662)
	at org.eclipse.swt.widgets.Widget.release(Widget.java:743)
	at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:662)
	at org.eclipse.swt.widgets.Widget.release(Widget.java:743)
	at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:662)
	at org.eclipse.swt.widgets.Widget.release(Widget.java:743)
	at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:662)
	at org.eclipse.swt.widgets.Canvas.releaseChildren(Canvas.java:117)
	at org.eclipse.swt.widgets.Decorations.releaseChildren(Decorations.java:782)
	at org.eclipse.swt.widgets.Shell.releaseChildren(Shell.java:1134)
	at org.eclipse.swt.widgets.Widget.release(Widget.java:743)
	at org.eclipse.swt.widgets.Widget.dispose(Widget.java:410)
	at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:457)
	at org.eclipse.swt.widgets.Shell.dispose(Shell.java:653)
	at org.eclipse.jface.window.Window.close(Window.java:330)
	at org.eclipse.jface.dialogs.Dialog.close(Dialog.java:971)
	at org.eclipse.jface.dialogs.TrayDialog.close(TrayDialog.java:143)
	at org.eclipse.jface.preference.PreferenceDialog.close(PreferenceDialog.java:311)
	at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.close(FilteredPreferenceDialog.java:446)
	at org.eclipse.ui.internal.dialogs.WorkbenchPreferenceDialog.close(WorkbenchPreferenceDialog.java:140)
	at org.eclipse.jface.preference.PreferenceDialog.cancelPressed(PreferenceDialog.java:268)
	at org.eclipse.jface.preference.PreferenceDialog.buttonPressed(PreferenceDialog.java:237)
	at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:616)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
	at org.eclipse.jface.window.Window.open(Window.java:796)
	at org.eclipse.ui.internal.OpenPreferencesAction.run(OpenPreferencesAction.java:65)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
	at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1144)
Comment 1 Grant Gayed CLA 2007-08-27 11:22:30 EDT
I cannot reproduce this in the 3.3 release or the latest 3.4 build on my win2000.  (I notice that you're not quite on the 3.3 release, its build id is 20070625-1500).

Does the problem always happen for you?  Is there any specific name/description/template that makes it happen more reliably than others?
Comment 2 Ray Malone CLA 2007-08-27 11:28:36 EDT
(In reply to comment #1)
> I cannot reproduce this in the 3.3 release or the latest 3.4 build on my
> win2000.  (I notice that you're not quite on the 3.3 release, its build id is
> 20070625-1500).
> 
> Does the problem always happen for you?  Is there any specific
> name/description/template that makes it happen more reliably than others?
> 

Hi Grant, 
Yes unfortunately the error occurs every time I try to add a template, I've tried using different length values as well as leaving optional values empty but no luck. I can try updating to the latest release, but the auto updates I have enabled should have already done that correct?

thanks
-=Ray
Comment 3 Grant Gayed CLA 2007-08-27 12:06:21 EDT
> I can try updating to the latest release, but the auto updates I
> have enabled should have already done that correct?

I don't have much experience with using the auto updates, but one would think so.  The different version id may not be relevant to the problem, it just stuck out as the only obvious difference between our installs.

If you're up for getting a new download then 3.4M1 would be even better since there has been a lot of churn in the win32 codebase since 3.3 was released.
Comment 4 Ray Malone CLA 2007-08-28 11:22:31 EDT
(In reply to comment #3)
> > I can try updating to the latest release, but the auto updates I
> > have enabled should have already done that correct?
> 
> I don't have much experience with using the auto updates, but one would think
> so.  The different version id may not be relevant to the problem, it just stuck
> out as the only obvious difference between our installs.
> 
> If you're up for getting a new download then 3.4M1 would be even better since
> there has been a lot of churn in the win32 codebase since 3.3 was released.
> 

Well, I setup a copy of eclipse 3.4M1 on my machine and am receiving the same error. But I still had the same plugins installed for the new version so I tried starting no additional plugins and had the same result (used winmerge to compare the stack traces)
Comment 5 Grant Gayed CLA 2007-08-28 11:53:29 EDT
Bizarre, moving to SN.  I'm guessing the problem's not win2000-specific since I cannot reproduce it.  For the record, which Service Pack do you have installed?
Comment 6 Ray Malone CLA 2007-08-28 12:00:52 EDT
(In reply to comment #5)
> Bizarre, moving to SN.  I'm guessing the problem's not win2000-specific since I
> cannot reproduce it.  For the record, which Service Pack do you have installed?
> 

Sure is bizarre, I'm running Win2k sp4 (and no it's not by choice) =)

I had a colleague try to reproduce this error and he's getting the same exception as well, he's on the same eclipse build I started with and has a very similar setup on his machine... we're both using Java 1.5.0_06 jre/jdk.

Comment 7 David Pantich CLA 2008-04-24 21:09:58 EDT
Hi,

This is my first time adding something to Bugzilla so please excuse me if I do something wrong. I had originally posted something here (http://www.eclipse.org/newsportal/article.php?id=74438&group=eclipse.platform#74438) and someone suggested I add my comment in this also. 

I am using Eclipse 3.3.1.1. I want to define a new code template so when I'm
coding I can just use the Ctrl-space shortcut to insert some code.

I go into Preferences | Java | Editor | Templates and add a new template.
After typing in the code I want (I also insert the variable
"${enclosing_type}") and click OK, Eclipse hangs and I have to end the task.

I've found that if I use Alt-Shift-Z to bring up the templates I can create a new template and save it as expected.

So I have a workaround for my issue but I'd still like to report the "bug" with the other way of trying to do it
Comment 8 David Pantich CLA 2008-04-24 21:13:34 EDT
One other thing I wanted to add...When I go to the Templates screen via the Preferences path it doesn't show ANYTHING in the pane that should contain the current templates.

When I get to it by using Alt-Shift-Z shortcut it DOES show the current templates in the pane.

btw-I'm using Build id: M20071023-1652

Comment 9 Grant Gayed CLA 2008-04-25 10:29:45 EDT
With the exception of the stack in comment 0, this is sounding like another case of bug 142965, which is fixed in the 3.4 stream.  Can you try a recent build like http://download.eclipse.org/eclipse/downloads/drops/S-3.4M6a-200804091425/index.php and follow up here whether this helps or not?
Comment 10 Steve Northover CLA 2008-04-25 10:56:49 EDT
Please reopen if not a dup.

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