I've got an NSArray. It's created with [[NSArray arrayWithArray:someotherrray] retain];
I pass it in to another object.
From within that object, I'm able to read the array just fine. Calling "NSLog(@"%@",myArray) shows me the array contents.
But, if I call [myArray count], the program crashes with no explanation. No EXEC_BAD_ACCESS, nothing. Just back to the GNU GDB discalaimer in the debugger console.
But, if I call [myArray count], the program crashes with no explanation. No EXEC_BAD_ACCESS, nothing.
It could be getting trounced by something else, affecting some of the data structure, but not the contents. Try moving the declaration to another place - for example, make it a global temporarily, and see if the crash still occurs. If so, HMM! - but if not, then look around for buffer overruns and things that could be trashing memory beyond where they should.
__________________
|
| I wrote ChordCalc ... A cool fretboard calculator.
|
It's very strange to crash with no message at all - I'd check to make sure the debugger didn't stop on the error and prevent the error from getting printed (run > debugger) and check the OSX console for any hints (path: /Applications/Utilities/Console).
Same thing happening with me. I can't count but I can use objectAtIndex: and get the objects from the array. No error message displayed in console just cuts out of the simulator.