Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

Thread: Memory error!
View Single Post
Old 01-14-2010, 04:07 PM   #1 (permalink)
fondu-Dev
Anyone for iPad Dev?
 
Join Date: Sep 2009
Location: Take a Guess
Posts: 74
fondu-Dev is on a distinguished road
Default Memory error!

I have written code to see if a mp3 file is readable using NSFileManager. However, this string keeps throwing the program off. A MEMORY ERROR! Take a look:
Code:
//
//  Created by Will Estes on 1/13/10.
//  Copyright 2010 Fondu Development. All rights reserved.
//

#import "DRMinizerMACAppDelegate.h"

@implementation DRMinizerMACAppDelegate

@synthesize window,statusLabel,filePath;

- (BOOL)application:(NSApplication *)sender openFile:(NSString *)path
{
	
	filePath = [[NSString alloc]init];
	filePath = path;
	
	
	
	NSLog(@"%@",filePath);
	i = 1;
	[statusLabel setStringValue:@"Song Recieved!"];
	
	return YES;
}

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
	// Insert code here to initialize your application 
}

-(IBAction)stripDRM:(id)sender {
	
	NSLog(@"%@", filePath);
	
	if(i ==1) {
		
		i = 0;
	
		[self drmbgone:filePath];
		
	}
	
	

	
}

-(void)drmbgone:(NSString *)fp {
	
	NSLog(@"drmbgone");
	
	if ( [[NSFileManager defaultManager] isReadableFileAtPath:fp] )
		NSLog(@"path is readable");
		
}

@end
You drag a mp3 file to the dock to get the program to receive the path.
When you click the UI button, it sees if its readable. BUT THE FILEPATH STRING IS GETTING ME A MEMORY ERROR.

HERE IS WHAT THE STACK SAYS:
Code:
0x00007fff8689c0b6  <+0150>  callq  0x7fff86936b04 <dyld_stub_getpid>
Program receives SIGKILL

Please help!
fondu-Dev is offline   Reply With Quote
 

» Advertisements
» Online Users: 447
14 members and 433 guests
baja_yu, David-T, edvaniojancy, esoteric, HemiMG, iAppDeveloper, iGuessSo, jimmyon122, mediaspree, PixelEnvision, RickSDK, Sloshmonster, speed4mee, thebeast
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,431
Threads: 94,026
Posts: 402,587
Top Poster: BrianSlick (7,978)
Welcome to our newest member, edvaniojancy
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 07:13 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.