Bug 33017 - VM crash when pressing enter in table cell editor
Summary: VM crash when pressing enter in table cell editor
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.1   Edit
Hardware: Other Linux-GTK
: P1 normal (vote)
Target Milestone: 2.1 RC3   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-25 11:59 EST by Dirk Baeumer CLA
Modified: 2003-03-13 14:56 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Baeumer CLA 2003-02-25 11:59:15 EST
RC 1 
 
- JUnit setup 
- select Assert.assertEquals(String message, double expected, double actual, 
double delta) 
- activate cell editor for for row 0, column 0 
- press enter. 
 
java version "1.4.1_01" 
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01) 
Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode) 
GTK 2.2.1 
 
No log files generated
Comment 1 Veronika Irvine CLA 2003-02-25 12:45:10 EST
Is there a java core file?
Comment 2 Dirk Baeumer CLA 2003-02-26 13:57:15 EST
No I even didn't get a Java core file.
Comment 3 Veronika Irvine CLA 2003-02-27 12:03:48 EST
Felipe, another GTK 2.2.1 crash.
Comment 4 Felipe Heidrich CLA 2003-02-27 13:59:52 EST
could you provide more details steps, like what do you mean by "JUnit setup".
I've tried the Preference Page -> Java -> JUnit and could find any
Assert.assertEquals(...)

Thanks

Comment 5 Dirk Baeumer CLA 2003-02-27 17:33:24 EST
See bug 32947 for an explanation. It contains also a zip file with the JUnit 
source code.
Comment 6 Felipe Heidrich CLA 2003-03-05 18:06:22 EST
Not good enough Dirk.

In the Bug#32947 you talk about "JUnit Project" and it's doesn't exits for me. 
What exists is a "Java Project" and they all have the same properties page 
regardless of their content. To open the properties page of a Java Project I 
select it, click with the right-button, and choose Properties in the pop-up 
menu.

I wonder if you have a different plug-in that I don't have (Note: I have the 
org.junit plug-in).

Note, Veronika and I have spent time on this and neither one can reproduce your 
scenario. Give us for info please.
Comment 7 Dirk Baeumer CLA 2003-03-06 09:23:42 EST
OK, I can still reproduce it. Here are the steps: 
 
- start with a fresh workspace 
- create project JUnit 
- select JUnit 
- Import the zip file attached to bug 32947 using File->Import->Zip file 
- open class Assert from package junit.framework 
- select method Assert.assertEquals(String message, double expected, double 
actual, double delta) in outliner 
- activate Refactor->Change Method Signature 
- click on row 0, column 0 of the parameter table 
- press enter to activate the cell editor 
- press enter again 
 
observe: VM crashed. 
 
Comment 8 Felipe Heidrich CLA 2003-03-06 20:01:02 EST
Reproducible on GTK 2.2.1

Current Java thread:
 at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(Native Method)
 at org.eclipse.swt.widgets.Display.eventProc(Display.java:611)
 at org.eclipse.swt.internal.gtk.OS.gtk_main_iteration(Native Method)
 at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1382)
 at org.eclipse.jface.window.Window.runEventLoop(Window.java:577)
 at org.eclipse.jface.window.Window.open(Window.java:557)
 at
org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate(RefactoringStarter.java:64)

Btw, you don't need junit at all to reproduce this. The steps are:
- select a method with at least one param on the outliner
- activate Refactor->Change Method Signature 
- click on row 0, column 0 of the parameter table 
- press enter to activate the cell editor 
- press enter again 
crash





Comment 9 Veronika Irvine CLA 2003-03-12 14:57:20 EST
Approved for RC3 by Veronika.
Comment 10 Veronika Irvine CLA 2003-03-12 15:25:39 EST
Investigate for RC3.
Comment 11 Felipe Heidrich CLA 2003-03-13 14:56:33 EST
Fix is very simple: remove the line
OS.gtk_entry_set_activates_default (handle, true);
from the createHandle of Text.

In past we used to let the GTK do the default button behavior so this line used
to be necessary. But not anymore.

In the same scenario, change method signature dialog, we still have GTK bugs:
1 - The table cursor is behind table thefore invisible.
2 - When the text widget is dispose the focus goes to space...

Anyhow, the bug report on this PR is fixed.