Strange _EOCheapCopyMutableArray crash
Strange _EOCheapCopyMutableArray crash
- Subject: Strange _EOCheapCopyMutableArray crash
- From: Ian Joyner <email@hidden>
- Date: Mon, 26 Mar 2007 14:43:22 +1000
I'm getting a crash in the following code:
public boolean is_unassigned () {
// editingContext ().refaultObject (this);
log.info ("is_unassigned " + this.groups ());
boolean result = true;
java.util.Enumeration <Group_Member> e = groups ().objectEnumerator
();
while (result && e.hasMoreElements ()) {
Group_Member gm = e.nextElement ();
if (gm.group ().parent_group () != null && gm.end_date () == null)
result = false;
}
return result;
}
caused by groups on line 5 being a _EOCheapCopyMutableArray. The
enclosing object for this method was originally created in another
editingContext (being Java client, in another window), so I suspect
something to do with the groups being in another (now gone) editing
context. It does not happen all the time though, only on the first
object created - if I restart the application, further objects can be
added without problem.
A fix that seems to work is the commented out line 'editingContext
().refaultObject (this);', but this seems to me like it is probably a
kludge making up for a problem elsewhere. Anything else I should be
looking out for?
The dump I get out is:
2007-03-26 14:40:16,673 INFO com.sportstec.Service - Cronus client
running on Mac OS X
02:40:33.033 INFO AWT-EventQueue-0
Main_interface_controller.create_member@520: create ({values =
{details = <com.webobjects.foundation.NSKeyValueCoding$Null>;
begin_date = 2007-03-26 04:40:32 Etc/GMT; position =
<com.webobjects.foundation.NSKeyValueCoding$Null>; member =
"<com.sportstec.member.client.Member ae11f6 <EOTemporaryGlobalID: 0 0
-64 -88 0 7 0 0 -48 27 3 0 0 0 1 17 -116 -117 118 43 -76 -76 118
114>>"; end_date = <com.webobjects.foundation.NSKeyValueCoding$Null>;
group = "<com.sportstec.group.client.Group 732b56
_EOIntegralKeyGlobalID[Group (java.lang.Integer)2]>"; }; this =
"<com.sportstec.group.client.Group_Member a270b2
<EOTemporaryGlobalID: 0 0 -64 -88 0 7 0 0 -48 27 4 0 0 0 1 17 -116
-117 118 43 -76 -76 118 114>>"; }, {values = {details =
<com.webobjects.foundation.NSKeyValueCoding$Null>; begin_date =
2007-03-26 04:40:33 Etc/GMT; position =
<com.webobjects.foundation.NSKeyValueCoding$Null>; member =
"<com.sportstec.member.client.Member ae11f6 <EOTemporaryGlobalID: 0 0
-64 -88 0 7 0 0 -48 27 3 0 0 0 1 17 -116 -117 118 43 -76 -76 118
114>>"; end_date = <com.webobjects.foundation.NSKeyValueCoding$Null>;
group = "<com.sportstec.group.client.Group 94d9d5
_EOIntegralKeyGlobalID[Group (java.lang.Integer)1]>"; }; this =
"<com.sportstec.group.client.Group_Member d95609
<EOTemporaryGlobalID: 0 0 -64 -88 0 7 0 0 -48 27 5 0 0 0 1 17 -116
-117 118 43 -76 -76 118 114>>"; })
02:40:39.039 INFO AWT-EventQueue-0 Member.is_unassigned@44:
is_unassigned com.webobjects.eocontrol._EOCheapCopyMutableArray[b7ecdb]
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at
com.webobjects.eodistribution.client.EODistributedObjectStore.objectsFor
SourceGlobalID(EODistributedObjectStore.java:338)
at com.webobjects.eocontrol.EOEditingContext.objectsForSourceGlobalID
(EOEditingContext.java:3965)
at
com.webobjects.eodistribution.client.EODistributedObjectStore._fireArray
Fault(EODistributedObjectStore.java:1139)
at
com.webobjects.eodistribution.client.EODistributedArrayFaultHandler.comp
leteInitializationOfObject(EODistributedArrayFaultHandler.java:38)
at com.webobjects.eocontrol._EOCheapCopyMutableArray.willRead
(_EOCheapCopyMutableArray.java:38)
at com.webobjects.eocontrol._EOCheapCopyMutableArray.objectEnumerator
(_EOCheapCopyMutableArray.java:102)
at com.sportstec.member.client.Member.is_unassigned(Member.java:48)
at com.sportstec.group.client.Group_Member.display_position
(Group_Member.java:45)
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 com.webobjects.foundation.NSKeyValueCoding$ValueAccessor
$1.methodValue(NSKeyValueCoding.java:684)
at com.webobjects.foundation.NSKeyValueCoding
$_MethodBinding.valueInObject(NSKeyValueCoding.java:1160)
at com.webobjects.eocontrol.EOCustomObject.valueForKey
(EOCustomObject.java:1559)
at com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey
(NSKeyValueCoding.java:498)
at com.webobjects.foundation.NSKeyValueCodingAdditions
$DefaultImplementation.valueForKeyPath(NSKeyValueCodingAdditions.java:
212)
at com.webobjects.eocontrol.EOCustomObject.valueForKeyPath
(EOCustomObject.java:1675)
at com.webobjects.foundation.NSKeyValueCodingAdditions
$Utility.valueForKeyPath(NSKeyValueCodingAdditions.java:149)
at com.webobjects.eointerface.EODisplayGroup.valueForObject
(EODisplayGroup.java:3371)
at com.webobjects.eointerface.EODisplayGroup.valueForObjectAtIndex
(EODisplayGroup.java:3411)
at com.webobjects.eointerface.EOAssociation.valueForAspectAtIndex
(EOAssociation.java:790)
at com.webobjects.eointerface.EOTableColumnAssociation.valueAtRow
(EOTableColumnAssociation.java:471)
at com.webobjects.eointerface.EOTableAssociation.valueAtColumnAndRow
(EOTableAssociation.java:596)
at com.webobjects.eointerface.swing.EOSwingTablePlugin
$_TableModel.getValueAt(EOSwingTablePlugin.java:366)
at javax.swing.JTable.getValueAt(JTable.java:1902)
at javax.swing.JTable.prepareRenderer(JTable.java:3907)
at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:
2070)
at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:
1972)
at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1895)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:154)
at javax.swing.JComponent.paintComponent(JComponent.java:742)
at javax.swing.JComponent.paint(JComponent.java:1005)
at javax.swing.JComponent._paintImmediately(JComponent.java:4881)
at javax.swing.JComponent.paintImmediately(JComponent.java:4667)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:
477)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run
(SystemEventQueueUtilities.java:114)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy
(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForHierarchy
(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:
184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:
176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
02:40:39.039 INFO AWT-EventQueue-0 Member.is_unassigned@44:
is_unassigned com.webobjects.eocontrol._EOCheapCopyMutableArray[b7ecdb]
Exception in thread "AWT-EventQueue-0"
java.lang.IllegalStateException: objectsForSourceGlobalID:
com.webobjects.eodistribution.client.EODistributedObjectStore
com.webobjects.eodistribution.client.EODistributedObjectStore@ae6456
-- for object with global ID _EOIntegralKeyGlobalID[Member
(java.lang.Integer)3] -could not find any snapshot.
at
com.webobjects.eodistribution.client.EODistributedObjectStore.objectsFor
SourceGlobalID(EODistributedObjectStore.java:306)
at com.webobjects.eocontrol.EOEditingContext.objectsForSourceGlobalID
(EOEditingContext.java:3965)
at
com.webobjects.eodistribution.client.EODistributedObjectStore._fireArray
Fault(EODistributedObjectStore.java:1139)
at
com.webobjects.eodistribution.client.EODistributedArrayFaultHandler.comp
leteInitializationOfObject(EODistributedArrayFaultHandler.java:38)
at com.webobjects.eocontrol._EOCheapCopyMutableArray.willRead
(_EOCheapCopyMutableArray.java:38)
at com.webobjects.eocontrol._EOCheapCopyMutableArray.objectEnumerator
(_EOCheapCopyMutableArray.java:102)
at com.sportstec.member.client.Member.is_unassigned(Member.java:48)
at com.sportstec.group.client.Group_Member.display_position
(Group_Member.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
Any ideas?
Thanks
Ian
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden