PDA

View Full Version : [GXT 1.2.3] Drag & Drop crash on IE6 and hosted mode



psionic1
7 Apr 2009, 4:58 AM
Hi,

GXT 1.2.3
IE6, and hosted mode

FF 3.0.8 works fine

I slightly modified a Basic D&D Example.
On drop of Card2 on any slot there is a JVM crash.

Under hosted mode I got following information:


#
# An unexpected error has been detected by Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7dcd43b1, pid=2500, tid=2316
#
# Java VM: Java HotSpot(TM) Client VM (11.3-b02 mixed mode, sharing windows-x86)
# Problematic frame:
# C [mshtml.dll+0xa43b1]
#
# An error report file with more information is saved as:
# C:\tmp\workspace\gxt_sample\hs_err_pid2500.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#


In hs_err_pid2500.log there is a system memory dump.

Ways to reproduce:



public class GxtDemo implements EntryPoint {

public void onModuleLoad() {

LayoutContainer lc = new LayoutContainer();
lc.setLayout(new FitLayout());

lc.add(new SlotsDNDExample());

RootPanel.get().add(lc) ;
}

}
public class SlotsDNDExample extends LayoutContainer {

public SlotsDNDExample() {
HorizontalPanel hp = new HorizontalPanel();
hp.setSpacing(10);

VerticalPanel vp = new VerticalPanel();
for (int i = 1; i <= 16; i++) {
HorizontalPanel hp1 = new HorizontalPanel();

Label lb = new Label("Slot " + i);
hp1.add(lb);

final LayoutContainer lc = new LayoutContainer();
lc.setLayout(new FitLayout());
lc.setLayoutOnChange(true);
lc.setBorders(true);
lc.setSize(200, 20);

DropTarget target = new DropTarget(lc) {
@Override
protected void onDragDrop(DNDEvent event) {
super.onDragDrop(event);
Html html = (Html) event.data;
lc.add(html);
}
};
target.setGroup("test");
target.setOverStyle("drag-ok");

hp1.add(lc);
vp.add(hp1);
}
hp.add(vp);

final LayoutContainer clipboard = new LayoutContainer();
clipboard.setLayoutOnChange(true);
clipboard.setBorders(true);
clipboard.setSize(200, 16*20);

DropTarget targ = new DropTarget(clipboard) {
@Override
protected void onDragDrop(DNDEvent event) {
super.onDragDrop(event);
Html html = (Html) event.data;
clipboard.add(html);
}
};
targ.setGroup("test");
targ.setOverStyle("drag-ok");

for (int j =0; j<3; j++){
addSource(clipboard, j);
}

hp.add(clipboard);
add(hp);
}

private void addSource(LayoutContainer clipboard, int j){
final Html html = new Html("Card "+j );
html.setStyleAttribute("border", "1px solid red");
html.setStyleName("text");
DragSource source = new DragSource(html) {
@Override
protected void onDragStart(DNDEvent event) {
// by default drag is allowed
event.data = html;
event.status.update(El.fly(html.getElement()).cloneNode(true));
}
};
clipboard.add(html);
source.setGroup("test");
}

}

psionic1
9 Apr 2009, 2:21 AM
Hi,

Any change on this subject?
Did you at least managed to reproduce an error?

At our company we want to use drag&drop features,
but we can't until gxt is stable.

regards,
Andrzej

sven
9 Apr 2009, 2:35 AM
No i was not able to reproduce this.

psionic1
9 Apr 2009, 6:46 AM
It happens every time, not only on my computer, I checked it on other computers in my work. With the same results.
I prepared a screencast to show you what happens:
http://www.sendspace.com/file/rbo7zo