• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Strange _EOCheapCopyMutableArray crash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange _EOCheapCopyMutableArray crash


  • Subject: Re: Strange _EOCheapCopyMutableArray crash
  • From: Chuck Hill <email@hidden>
  • Date: Mon, 26 Mar 2007 10:09:11 -0700

Hi Ian,


On Mar 25, 2007, at 9:43 PM, Ian Joyner wrote:

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.

Um, no. That just means it is an unfired array fault. See below for actual cause.



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.

It could he a Java Client related bug. It also sounds like that can happen with incorrect locking of editing contexts or general EOF abuse. I seem to be saying that a lot lately... :-) Something has messed up the object graph and / or the local EC representation.



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?

I agree, this is just hiding or recovering from a problem elsewhere.


com.webobjects.eocontrol._EOCheapCopyMutableArray[b7ecdb]
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at com.webobjects.eodistribution.client.EODistributedObjectStore.objectsF orSourceGlobalID(EODistributedObjectStore.java:338)

That is where the problem happens, it is a NPE not a class cast exception.


...

Here is the problem:

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.objectsF orSourceGlobalID(EODistributedObjectStore.java:306)

It looks like the snapshot has not been saved or has been discarded. Is Member #3 a recently created object?


Chuck

--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
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


  • Follow-Ups:
    • Re: Strange _EOCheapCopyMutableArray crash
      • From: Ian Joyner <email@hidden>
References: 
 >Strange _EOCheapCopyMutableArray crash (From: Ian Joyner <email@hidden>)

  • Prev by Date: Re: Problem with nested editing contexts
  • Next by Date: Re: Problem with nested editing contexts
  • Previous by thread: Strange _EOCheapCopyMutableArray crash
  • Next by thread: Re: Strange _EOCheapCopyMutableArray crash
  • Index(es):
    • Date
    • Thread