View Full Version : [FIXED] Null exception in compiled mode

22 Jul 2009, 6:39 AM

I am getting some unwanted behavior for a EditorTreeGrid that seems to work just fine in hosted mode, but that fails in compiled mode.

The EditorTreeGrid has a simple ColumnConfig that displayes an id identifying the model, and CheckColumnConfig columns.
It is backed by a TreeStore, which i will call defaultStore, that loads the models from the start, without filling in the boolean values for the checboxes.

The idea with this TreeGrid is that when a selection is made in another TreePanel, corresponding values in the checkboxes are filled. So, for each model in the TreePanel, I have another TreeStore that holds models with same ids and same parent-child relations.

So, when a selection is made, i load the values from the server side into the corresponding store, and this is the code to fill in the defaultStore properties from the store corresponding to the selected model:

for (MyModel right : store.getAllItems()) {
MyModel displayedRight = defaultEntitiesStore
.findModel(MyModel .F001, right.getF001());
boolean dirty = store.getRecord(right).isDirty();
Record record = defaultEntitiesStore.getRecord(displayedRight);
// record.set marks the model as modified in the entitiesStore, and
// we do not want that,
// unless it was modified in the store also
if (dirty) {
// GWT.log("object changed: " + right.getF001(), null);
record.set(MyModel .INVISIBLE,
(Boolean) right
.get(MyModel .INVISIBLE));
//and so on for the other properties
} else {
record.set(MyModel .INVISIBLE,
(Boolean) right
.get(MyModel .INVISIBLE));
//and so on again
For this, it worked well both in hosted and compiled mode.

But the functionality that crashed is trying to transmit the checkbox values downwards, to children, in the EditorTreeGrid. Here is a bit simplified code sample:

private void transmitChangeToChildren(
MyModel rightModel,
TreeStore<MyModel > store) {
if (rightModel == null)
GWT.log("null model", null);
if (store.findModel(rightModel) == null) {
GWT.log("model not in store!!", null);
if (store.getChildren(rightModel) == null) {
GWT.log("null children for " + rightModel.getF001(), null);
for (MyModel child : store.getChildren(rightModel)) {
// GWT.log("child: " + child.getF001(), null);
if (!child.getExplicit()) {
Record childRecord = store.getRecord(child);
childRecord.set(MyModel .INVISIBLE,
(Boolean) rightModel
.get(MyModel .INVISIBLE));

Record displayChildRecord = defaultEntitiesStore
MyModel .F001, child
(Boolean) rightModel
.get(MyModel .INVISIBLE));
transmitChangeToChildren(child, store);
} else {
// recursiveness stops here
}So, when I select items from the TreePanel I was mentioning, I only get the tree displayed, but the checkboxes are not filled and i get these exceptions:

this$static is null
chrome://firebug/content/blank.gif return this$static.firstChild;\r\n


this$static is null
$getFirstChild_0(Object name=this$static)19A18B5E...ache.html (line 48518)
$ensureVisible(com.extjs.gxt.ui.client.widget.treegrid.TreeGridView@52f widgetMap={}, Object name=row value=0, Object name=col value=0, true)19A18B5E...ache.html (line 38521)
$focusCell(com.extjs.gxt.ui.client.widget.treegrid.TreeGridView@52f widgetMap={}, Object name=rowIndex value=0, Object name=colIndex value=0, true)19A18B5E...ache.html (line 38637)
$insertRows(com.extjs.gxt.ui.client.widget.treegrid.TreeGridView@52f widgetMap={}, Object name=firstRow value=0, Object name=lastRow value=0, true)19A18B5E...ache.html (line 38839)
$refreshRow(com.extjs.gxt.ui.client.widget.treegrid.TreeGridView@52f widgetMap={}, Object name=row value=0)19A18B5E...ache.html (line 39086)
storeUpdate_1(com.extjs.gxt.ui.client.store.TreeStoreEvent@530)19A18B5E...ache.html (line 42107)
handleEvent_62(com.extjs.gxt.ui.client.store.TreeStoreEvent@530)19A18B5E...ache.html (line 16118)
$fireEvent_0(com.extjs.gxt.ui.client.widget.treegrid.TreeGrid$2@532 this$0=, com.extjs.gxt.ui.client.event.EventType@e $H=14 typeId$=354 eventCode=-1, com.extjs.gxt.ui.client.store.TreeStoreEvent@530)19A18B5E...ache.html (com.extjs.gxt.ui.client.store.TreeStoreEvent@530%2919A18B5E...ache.html) (line 8255)
storeUpdate_3(com.extjs.gxt.ui.client.store.TreeStoreEvent@530)19A18B5E...ache.html (line 46992)
handleEvent_62(com.extjs.gxt.ui.client.store.TreeStoreEvent@530)19A18B5E...ache.html (line 16118)
$fireEvent_0(com.extjs.gxt.ui.client.store.TreeStore@531, com.extjs.gxt.ui.client.event.EventType@e $H=14 typeId$=354 eventCode=-1, com.extjs.gxt.ui.client.store.TreeStoreEvent@530)19A18B5E...ache.html (com.extjs.gxt.ui.client.store.TreeStoreEvent@530%2919A18B5E...ache.html) (line 8255)
$fireStoreEvent(com.extjs.gxt.ui.client.store.TreeStore@531, com.extjs.gxt.ui.client.event.EventType@e $H=14 typeId$=354 eventCode=-1, com.extjs.gxt.ui.client.store.Record@533 model=caption: undefined)19A18B5E...ache.html (line 11297)
$afterEdit(com.extjs.gxt.ui.client.store.TreeStore@531, com.extjs.gxt.ui.client.store.Record@533 model=caption: undefined)19A18B5E...ache.html (line 11197)
$set_12(com.extjs.gxt.ui.client.store.Record@533 model=caption: undefined, "INVISIBLE", true value_0=true $H=155 typeId$=706)19A18B5E...ache.html (line 28714)
$fillEntitiesTreeStoreWithRights(com.bearingpoint.davinci.frontend.gwt.client.security.mediator.RoleViewMediator@534, caption: undefined)19A18B5E...ache.html (line 9229)
onSuccess_12([caption: undefined] array=[1] size=1 typeId$=666)19A18B5E...ache.html (line 9838)
$onResponseReceived(com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter@536, com.google.gwt.http.client.Request$1@538 val$xmlHttpRequest=XMLHttpRequest $H=1336 typeId$=0)19A18B5E...ache.html (line 54367)
$fireOnResponseReceivedImpl(com.google.gwt.http.client.Request@539 timeoutMillis=0 $H=1337 typeId$=0, com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter@536)19A18B5E...ache.html (com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter@536%2919A18B5E...ache.html) (line 49221)
fireOnResponseReceived(com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter@536)19A18B5E...ache.html (line 49234)
anonymous()19A18B5E...ache.html (line 49508)

chrome://firebug/content/blank.gif return this$static.firstChild;\r\n

Again, this is only for compiled mode. In hosted mode all works fine.

I tested on Firefox 3.0.11.

Thank you.

22 Jul 2009, 6:42 AM
Please post a complete testcase for this that implements EntryPoint as descriped in the guidelines of this forum.

22 Jul 2009, 7:08 AM
I commited a possible fix for this to SVN. please verify.

23 Jul 2009, 3:34 AM

Thanks for the fix.

It's working better, i.e. I can check/uncheck checkboxes for a longer while, but I still get a null exception.

I will post a summary here, and also will work on something testable.

this$static is null
get_7("a model id here")1 (line 4293)


and at the end:

onSuccess_11([caption: undefined] array=[1] size=1 typeId$=667)1 (line -44618)
$onResponseReceived(com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter@6fe, com.google.gwt.http.client.Request$1@700 val$xmlHttpRequest=XMLHttpRequest $H=1792 typeId$=0)1 (line 205)
$fireOnResponseReceivedImpl(com.google.gwt.http.client.Request@701 timeoutMillis=0 $H=1793 typeId$=0, com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter@6fe)1 (line -4941)
fireOnResponseReceived(com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter@6fe)1 (line -4928)
anonymous()1 (line -4654)
[Break on this error] if (this$static.allowNestedValues && property.indexOf('.') != -1) {\r\n


24 Jul 2009, 3:05 PM
This should already be fixed in SVN. The fix was not part of 2.0.1 but was commited to SVN just after the 2.0.1 release. Can you please validate it?

27 Jul 2009, 10:19 PM

we don't get the exception any more.

Thanks a lot for the fix.