unable to read unknown load command 0x26 warning: UUID mismatch detected with the loaded library - on disk is: /Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.0.1 (9A405)/Symbols/System/Library/Extensions/IMGSGX535GLDriver.bundle/IMGSGX535GLDriver unable to read unknown load command 0x25 unable to read unknown load command 0x26 gdb-arm-apple-darwin(1358,0xa0483540) malloc: *** mmap(size=24268800) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug gdb stack crawl at point of internal error:/SourceCache/gdb/gdb-1510/src/gdb/utils.c:1200: internal-error: virtual memory exhausted: can't allocate 24267986 bytes. A problem internal to GDB has been detected, further debugging may prove unreliable.The Debugger has exited with status 1.The Debugger has exited with status 1.
Card * defaultCard = [_cards objectAtIndex:[_cards count]-1]; if ([defaultCard.front isEqualToString:@"Default.png"]){ flag = YES; for (int i =3; i < [_cards count]; i++) {
warning: UUID mismatch detected with the loaded library - on disk is:
/Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.0.1 (9A405)/Symbols/System/Library/Extensions/IMGSGX535GLDriver.bundle/IMGSGX535GLDriver
unable to read unknown load command 0x25
unable to read unknown load command 0x26
gdb-arm-apple-darwin(1358,0xa0483540) malloc: *** mmap(size=24268800) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
gdb stack crawl at point of internal error:/SourceCache/gdb/gdb-1510/src/gdb/utils.c:1200: internal-error: virtual memory exhausted: can't allocate 24267986 bytes.
A problem internal to GDB has been detected,
further debugging may prove unreliable.The Debugger has exited with status 1.The Debugger has exited with status 1.
_cards = value;
UIImage * imgDefault = [[UIImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"Default" ofType:@"png"]];
for(int i = 0;i<[_cards count];i++){
Card *card = [_cards objectAtIndex:i];
NSArray *temp = [card.front componentsSeparatedByString:@"."];
GLuint defaultTexture = [self imageToTexture:imgDefault];
GLuint texture1;
if ([card.front isEqualToString:@"Default.png"]) {
texture1 = defaultTexture;
}
else {
UIImage *img = [[UIImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:[temp objectAtIndex:0] ofType:[temp objectAtIndex:1]]];
texture1 = [self imageToTexture:img];
[img release];
}
FlowCoverRecord *fcr = [[FlowCoverRecord alloc] initWithTexture:texture1];
NSNumber *num = [NSNumber numberWithInt:i];
[cache setObject:fcr forKey:num];
[fcr release];
}
[imgDefault release];
[self performSelectorInBackground:@selector(loadOtherCards) withObject:nil];
}/*
* Load Other cards
*/
- (void)loadOtherCards{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc]init];
//Load other cards
NSLog(@"load othercards");
//A flag used to judge whether other card is loaded.
BOOL flag = NO;
Card * defaultCard = [_cards objectAtIndex:[_cards count]-1];
if ([defaultCard.front isEqualToString:@"Default.png"]){
flag = YES;
for (int i =3; i < [_cards count]; i++) {
Card *card = [[Card alloc] init];
card.cardID = i;
if(i<9){
card.front = [NSString stringWithFormat:@"%@0%d.png",CARDFRONT_PREFIX,i+1];
card.back = [NSString stringWithFormat:@"%@0%d.png",CARDBACK_PREFIX,i+1];
}else{
card.front = [NSString stringWithFormat:@"%@%d.png",CARDFRONT_PREFIX,i+1];
card.back = [NSString stringWithFormat:@"%@%d.png",CARDBACK_PREFIX,i+1];
}
NSLog(@"card front : %@",card.front);
[_cards replaceObjectAtIndex:i withObject:card];
//If the other cards loading has not been fiinshed,then load and setCards.
if (flag) {
NSArray *temp = [card.front componentsSeparatedByString:@"."];
GLuint texture;
UIImage *img = [[UIImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:[temp objectAtIndex:0] ofType:[temp objectAtIndex:1]]];
NSLog(@"111111111111");
texture = [self imageToTexture:img];
NSLog(@"2222222222222");
[img release];
FlowCoverRecord *fcr = [[FlowCoverRecord alloc] initWithTexture:texture];
NSNumber *num = [NSNumber numberWithInt:i];
[cache setObject:fcr forKey:num];
[fcr release];
int maxVisibleCount = floor(offset + 0.5) + VISTILES;
if (i <= maxVisibleCount ) {
[self performSelectorOnMainThread:@selector(draw) withObject:nil waitUntilDone:YES];
}
}
[card release];
}
}
else {
flag = NO;
}
[pool release];
}
*** set a breakpoint in malloc_error_break to debug
说的多清楚啊……
相关代码参考 电子书 。