PDA

View Full Version : [FIXED] 2.0 M3 ComboBox issue



stan229
15 Jun 2009, 9:07 AM
Hey,
I have a combobox embedded in a LayoutContainer that is embedded in a FormPanel.

When I first click the trigger arrow of the combobox, it does nothing and this error pops up:
It works fine on the second, and future clicks
[code]
[ERROR] Uncaught exception escaped
java.lang.NullPointerException: null
at com.extjs.gxt.ui.client.widget.Layer.getShim(Layer.java:216)
at com.extjs.gxt.ui.client.widget.Layer.sync(Layer.java:446)
at com.extjs.gxt.ui.client.widget.BoxComponent.sync(BoxComponent.java:598)
at com.extjs.gxt.ui.client.widget.BoxComponent.onShow(BoxComponent.java:731)
at com.extjs.gxt.ui.client.widget.Component.show(Component.java:1195)
at com.extjs.gxt.ui.client.widget.form.ComboBox.expand(ComboBox.java:319)
at com.extjs.gxt.ui.client.widget.form.ComboBox.onLoad(ComboBox.java:1194)
at com.extjs.gxt.ui.client.widget.form.ComboBox.doQuery(ComboBox.java:291)
at com.extjs.gxt.ui.client.widget.form.ComboBox.onTriggerClick(ComboBox.java:1272)
at com.extjs.gxt.ui.client.widget.form.TriggerField.onComponentEvent(TriggerField.java:108)
at com.extjs.gxt.ui.client.widget.Component.onBrowserEvent(Component.java:756)
at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1320)
at com.google.gwt.user.client.DOM.dispatchEventAndCatch(DOM.java:1299)
at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1262)
at sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.ie.IDispatchImpl.callMethod(IDispatchImpl.java:126)
at com.google.gwt.dev.shell.ie.IDispatchProxy.invoke(IDispatchProxy.java:155)
at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:294)
at com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:194)
at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:117)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1925)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2966)
at com.google.gwt.dev.SwtHostedModeBase.processEvents(SwtHostedModeBase.java:235)
at com.google.gwt.dev.HostedModeBase.pumpEventLoop(HostedModeBase.java:558)
at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:405)
at com.google.gwt.dev.GWTShell.main(GWTShell.java:140)
[code]

The code for the combobox is simple:

[code]
private ComboBox<RegionBean> getRegionField() {
regionField = new ComboBox<RegionBean>();
regionField.setFieldLabel("Region");
ListStore<RegionBean> store = new ListStore<RegionBean>();
store.add(ReferenceData.getRegions());

regionField.setStore(store);
regionField.setDisplayField("regionLabel");
regionField.setTypeAhead(true);


return regionField;
}
[code]

RegionBean is an object that extends BeanModel

Note: This is in Hosted Mode IE6

sven
15 Jun 2009, 10:38 AM
I am unable to reproduce this. Can you please provide some simple testcase according to the bug forum guidelines that demonstrates this issue?

stan229
15 Jun 2009, 1:41 PM
Ok, I'll try to get that to you tomorrow as I'm out of the office.
Some follow-up if it might help:

The whole structure is that I have a tabItem to which I added this class. The class extends ContentPanel. Inside the contentPanel is a FormPanel to which I add this regionField and call this.layout(). The only success I had to get it work is if I added the region box directly to the contentpanel.. this.add(regionField)

Could this have something to do with it being inside a TabItem and tabItem isnt playing well with FormPanel?

sven
15 Jun 2009, 1:48 PM
In the demo explorer the combos are also in a tabpanel and for me they dont throw a excpetion on IE6:

http://www.extjs.com/examples-dev/explorer.html#combobox

stan229
16 Jun 2009, 11:04 AM
I think its something to do with some set up because I tried to build a test case for you and it worked.
So I'm rebuilding the whole app and hopefully it will start working.

Sorry for bothering!

crazycatlady
10 Sep 2009, 7:22 AM
Stan,

Were you able to solve this exception? We are getting the same one after initiating a search on an advanced combobox. I'm having trouble making a testcase because the problem is intermittant.

sven
10 Sep 2009, 7:23 AM
I cant reproduce this and without a testcase it is hard to fix. Do you also get the stacktrace with 2.0.1? Can you post a new stacktrace with the newer line numbers?

stan229
10 Sep 2009, 7:25 AM
This was a while ago but I think what happened then was a weird corruption of my GWT configs done when I went from IntelliJ to Eclipse and vice versa. I rememebr I created an entire new workspace and dropped in all the old code and it worked.

crazycatlady
10 Sep 2009, 9:36 AM
The only constant that I have noticed with this error is that it only occurs in cases where the search does not return any results. As soon as I am able to workup a testcase to reliably reproduce the error I will post it.

Here is the stacktrace from 2.0.1:

java.lang.NullPointerException
at com.extjs.gxt.ui.client.widget.Layer.getShim(Layer.java:216)
at com.extjs.gxt.ui.client.widget.Layer.sync(Layer.java:446)
at com.extjs.gxt.ui.client.widget.BoxComponent.sync(BoxComponent.java:598)
at com.extjs.gxt.ui.client.widget.BoxComponent.onShow(BoxComponent.java:731)
at com.extjs.gxt.ui.client.widget.Component.show(Component.java:1247)
at com.extjs.gxt.ui.client.widget.form.ComboBox.expand(ComboBox.java:318)
at com.extjs.gxt.ui.client.widget.form.ComboBox.doQuery(ComboBox.java:293)
at com.extjs.gxt.ui.client.widget.form.ComboBox.initQuery(ComboBox.java:1365)
at com.extjs.gxt.ui.client.widget.form.ComboBox.access$10(ComboBox.java:1364)
at com.extjs.gxt.ui.client.widget.form.ComboBox$8.handleEvent(ComboBox.java:1214)
at com.extjs.gxt.ui.client.util.DelayedTask$1.run(DelayedTask.java:30)
at com.google.gwt.user.client.Timer.fireImpl(Timer.java:160)
at com.google.gwt.user.client.Timer.fireAndCatch(Timer.java:146)
at com.google.gwt.user.client.Timer.fire(Timer.java:138)
at sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.ie.IDispatchImpl.callMethod(IDispatchImpl.java:126)
at com.google.gwt.dev.shell.ie.IDispatchProxy.invoke(IDispatchProxy.java:155)
at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:294)
at com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:194)
at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:117)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1925)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2966)
at com.google.gwt.dev.SwtHostedModeBase.processEvents(SwtHostedModeBase.java:235)
at com.google.gwt.dev.HostedModeBase.pumpEventLoop(HostedModeBase.java:558)
at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:405)
at com.google.gwt.dev.HostedMode.main(HostedMode.java:232)
java.lang.NullPointerException
at com.extjs.gxt.ui.client.widget.Layer.getShim(Layer.java:216)
at com.extjs.gxt.ui.client.widget.Layer.sync(Layer.java:446)
at com.extjs.gxt.ui.client.widget.BoxComponent.sync(BoxComponent.java:598)
at com.extjs.gxt.ui.client.widget.BoxComponent.onShow(BoxComponent.java:731)
at com.extjs.gxt.ui.client.widget.Component.show(Component.java:1247)
at com.extjs.gxt.ui.client.widget.form.ComboBox.expand(ComboBox.java:318)
at com.extjs.gxt.ui.client.widget.form.ComboBox.doQuery(ComboBox.java:293)
at com.extjs.gxt.ui.client.widget.form.ComboBox.initQuery(ComboBox.java:1365)
at com.extjs.gxt.ui.client.widget.form.ComboBox.access$10(ComboBox.java:1364)
at com.extjs.gxt.ui.client.widget.form.ComboBox$8.handleEvent(ComboBox.java:1214)
at com.extjs.gxt.ui.client.util.DelayedTask$1.run(DelayedTask.java:30)
at com.google.gwt.user.client.Timer.fireImpl(Timer.java:160)
at com.google.gwt.user.client.Timer.fireAndCatch(Timer.java:146)
at com.google.gwt.user.client.Timer.fire(Timer.java:138)
at sun.reflect.GeneratedMethodAccessor106.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.ie.IDispatchImpl.callMethod(IDispatchImpl.java:126)
at com.google.gwt.dev.shell.ie.IDispatchProxy.invoke(IDispatchProxy.java:155)
at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:294)
at com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:194)
at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:117)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1925)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2966)
at com.google.gwt.dev.SwtHostedModeBase.processEvents(SwtHostedModeBase.java:235)
at com.google.gwt.dev.HostedModeBase.pumpEventLoop(HostedModeBase.java:558)
at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:405)
at com.google.gwt.dev.HostedMode.main(HostedMode.java:232)

sven
10 Sep 2009, 9:42 AM
That was already fixed in SVN

Luming Lai
30 Sep 2009, 6:25 AM
We tried migrating to 2.0.2 to get rid of this problem, but it broke a miriad things in our software, so we'll have to deal with this bug on it's own.

Can you provide a description on when and how this bug appears (it seems to happen on certain cases on certain context-menus opened) and if there's an obvious workaround?

Thanks

Luming Lai
1 Oct 2009, 1:38 AM
I've found that if you disable shim and shadow on the constructor for the context-menu, the error is no longer thrown.