I've a strange behaviour developing an iPad application (languages: C++/Objective-C): it happens that in the simulator everything it's ok, in other words the application run successfully, meanwhile when implementing the program into the device I receive an unintelligible EXC_BAD_ACCESS.
This is a chunk of my code in the Obj-C environment:
-(void) BindTexture:(unsigned char*)TexBuff {  
    // TexBuff is a fild of a pointer list, containing data prevoisly saved  
    UIImager *texImg = (UIImage*)TexBuff;  
    CGImageRef imageRef = [texImage CGImage];  
    ....  
    .... {so on} ...  
}  
The device stucks before the call CGImageRef.
The oddities is the difference between Simulator and the Device.
Have you some idea?