is it me or Xcode..?

I have effectively completed a desktop App on Snow Lion using xcode 4.0.2 . The app runs flawlessly, is stable, doesn’t crash and well behaved, having taken many months of testing and debugging to get here…
I have now installed Mountain Lion and xcode 4.4.1 on a separate machine and when I run my app to test it, it seems to crash on a regular basis, always with a EXEC_BAD_ACCESS (code=1) error.
I run the two machines side by side with the identical code and one is stable and fine, the other crashes regularly…
Any thoughts in principle…?
The crash reason that I intuit is that it occurs after I have populated an applescript list which I then send to a class function which returns an object which is used to populate a table view. I can see this from the output in real time on the screen…but it puzzles me as to why it occurs on ML on Xcode 4.4.1 and not SL and Xcode 4.0.2…:confused:

Can you give us something more to go on? If you run the release version, do you get a crash dump?

If I run the application as in Xcode Menu bar->Product–>Build For–>Running, or Testing for that matter, or even just hit the 'Run" button, the problem occurs intermittently sometimes after 3 passes, some times after 17 passes.

This is what I get from Console. The logging statements are telling me what is going on and then where it crashes
17/09/2012 23:03:02.951 TestBonds[10193]: aSymbol: GECU4YR:IND
17/09/2012 23:03:03.605 TestBonds[10193]: the number of fields per yldSymbol is :5
17/09/2012 23:03:03.606 TestBonds[10193]: myFields are: ValueChangeTimeHighLow
17/09/2012 23:03:03.606 TestBonds[10193]: aField as text:Value
17/09/2012 23:03:03.608 TestBonds[10193]: aField’s Value was coerced and passed a test: 0.423
17/09/2012 23:03:03.609 TestBonds[10193]: theValues are: 0.423
17/09/2012 23:03:03.609 TestBonds[10193]: myFields are: ValueChangeTimeHighLow
17/09/2012 23:03:03.609 TestBonds[10193]: aField as text:Change
17/09/2012 23:03:03.611 TestBonds[10193]: Price change was -trending down-
17/09/2012 23:03:03.612 TestBonds[10193]: aField’s Value was coerced and passed a test: -0.034
17/09/2012 23:03:03.612 TestBonds[10193]: theValues are: 0.423-0.034
17/09/2012 23:03:03.612 TestBonds[10193]: myFields are: ValueChangeTimeHighLow
17/09/2012 23:03:03.613 TestBonds[10193]: aField as text:Time
17/09/2012 23:03:03.613 TestBonds[10193]: <NSAppleEventDescriptor: 'ldt '(36A75C7DCC0000000036)>
17/09/2012 23:03:03.619 TestBonds[10193]: timeDateParagraphs are: 6
17/09/2012 23:03:03.619 TestBonds[10193]: text item count of myTimeDateString is: 19
17/09/2012 23:03:03.620 TestBonds[10193]: 23:03:03
17/09/2012 23:03:03.620 TestBonds[10193]: theParsedDate is:23:03:03
17/09/2012 23:03:03.620 TestBonds[10193]: theValues are: 0.423-0.03423:03:03
17/09/2012 23:03:03.621 TestBonds[10193]: myFields are: ValueChangeTimeHighLow
17/09/2012 23:03:03.621 TestBonds[10193]: aField as text:High
17/09/2012 23:03:03.622 TestBonds[10193]: aField’s Value was coerced and passed a test: 0.466
17/09/2012 23:03:03.623 TestBonds[10193]: theValues are: 0.423-0.03423:03:030.466
17/09/2012 23:03:03.623 TestBonds[10193]: myFields are: ValueChangeTimeHighLow
17/09/2012 23:03:03.623 TestBonds[10193]: aField as text:Low
17/09/2012 23:03:03.625 TestBonds[10193]: aField’s Value was coerced and passed a test: 0.418
17/09/2012 23:03:03.626 TestBonds[10193]: theValues are: 0.423-0.03423:03:030.4660.418
17/09/2012 23:03:03.626 TestBonds[10193]: ricPrevClose was: 0.457
17/09/2012 23:03:08.000 kernel[0]: gdb-i386-apple-d (map: 0xffffff803ddf24d8) triggered DYLD shared region unnest for map: 0xffffff803549c488, region 0x7fff8da00000->0x7fff8dc00000. While not abnormal for debuggers, this increases system memory footprint until the target exits.
17/09/2012 23:06:47.974 coreservicesd[65]: SendFlattenedData, got error #268435460 (ipc/send) timed out from ::mach_msg(), sending notification kLSNotifyFrontApplicationPresentationModeChanged to notificationID=1145

**When it crashes, the xcode 4.4.1 debugger immediately brings me to Thread 1 and this is the sample of what the assembly (?) debugger says happened just before and after the error:
0x00007fff8db8f543 <+0003> je 0x7fff8db8f55b <objc_msgSend_vtable4+27>
0x00007fff8db8f545 <+0005> test $0x1,%edi
0x00007fff8db8f54b <+0011> jne 0x7fff8db8f55f <objc_msgSend_vtable4+31>
0x00007fff8db8f54d <+0013> mov (%rdi),%rax
0x00007fff8db8f550 <+0016> mov 0x18(%rax),%rax
0x00007fff8db8f554 <+0020> mov 0x8(%rsi),%rsi
0x00007fff8db8f558 <+0024> jmpq *0x20(%rax) <<—Here it says, Thread 1: Program received signal; “EXC_BAD_ACCESS”
0x00007fff8db8f55b <+0027> xor %eax,%eax
0x00007fff8db8f55d <+0029> retq
0x00007fff8db8f55e <+0030> nop
0x00007fff8db8f55f <+0031> mov %edi,%eax
0x00007fff8db8f561 <+0033> and $0xf,%eax
0x00007fff8db8f564 <+0036> lea -0x1b074423(%rip),%r10 # 0x7fff72b1b148 <_objc_tagged_isa_table>
0x00007fff8db8f56b <+0043> mov (%r10,%rax,8),%r10
0x00007fff8db8f56f <+0047> mov 0x18(%r10),%rax
0x00007fff8db8f573 <+0051> mov 0x8(%rsi),%rsi
0x00007fff8db8f577 <+0055> jmpq *0x20(%rax)
0x00007fff8db8f57a <+0058> nopw 0x0(%rax,%rax,1)
----------------------------------------(I don’t know if this helps…)
At the point in the loop that the previous close is determined, as described in the Console output, an applescript list has been composed and the following function is run:

on createYldObject(ricDescription, ricValue, ricChange, ricTime, ricHigh, ricLow, ricPrevClose)
    --:Instantiate an object from the Ric Class 
    --:(this is using Ric.applescript as described in AsObC Explored and works absolutely fine..thx Shane!)
    tell current application's Ric  to set newRic to alloc()'s init()
    --:Connect with the table's controller
    tell thirdTableController to addObject_(newRic)
    --:Pass the values to the new object
    tell newRic
        setRicDescription_(ricDescription as text)
        setRicValue_(ricValue as real)   
        setRicChange_(ricChange as real)   
        setRicTime_(ricTime as text)
        setRicHigh_(ricHigh as real) 
        setRicLow_(ricLow as real) 
        setRicPrevClose_(ricPrevClose as real) 
    end tell

end createYldObject

It seems that it is when effectively populating a table view with these 5 items that suddenly the program just blows a fuse on Mountain Lion and Xcode 4.4.1…But it just does not happen at all, ever on Snow Leopard with Xcode 4

I am guessing that its memory related…? But I cannot see any settings for Garbage collection or Auto-pool release or anything like that…and surely this would have occurred in previous versions of xcode ?

I know that these things can be a real headache but if anyone has any thoughts or suggestions, I would gladly welcome them.
Thx and regards…T.

Try setting the properties of newRic before adding it to the array controller.

I can’t see that you’re doing anything wrong. But I have seem reports of problems when using script objects like that – although usually when there are many, and back in the days of 10.6 and earlier versions of Xcode.

I’m not sure what else to suggest, although if the Ric class is just holding data, it might be easier to make it an Objective-C class.

Feel free to email me a copy to look at, if you’d like.

I will be downloading Xcode 5 and will post back here when I have a firm conclusion.
Thanks to Shane for looking into this…