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 > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-21-2011, 05:49 PM   #1 (permalink)
Registered Member
 
Join Date: Feb 2011
Posts: 122
architectpianist is on a distinguished road
Question [Segmentation fault] error

Hi,
I'm having an uncalled-for error here. My app was working just fine, when I tweaked some of the algebra in an if statement and suddenly it gives me this error:
Code:
collect2: ld terminated with signal 11 [Segmentation fault]
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
I know there are many reasons the second part could come up, but what does the [segmentation fault] mean?
architectpianist is offline   Reply With Quote
Old 02-21-2011, 05:52 PM   #2 (permalink)
Reading the Documentation
 
baja_yu's Avatar
 
Join Date: Sep 2010
Location: 45.255019,19.844908
Posts: 5,414
baja_yu has a spectacular aura about
Default

Post the relevant code.
baja_yu is offline   Reply With Quote
Old 02-21-2011, 06:06 PM   #3 (permalink)
Registered Member
 
Join Date: Feb 2011
Posts: 122
architectpianist is on a distinguished road
Default

How can I? Basically the part I changed was this:
Code:
if (y < x + 26 && y < -x + 346)
		{
			if (x < 100)
			{
				point.x = 100;
				point.y = 126;
			}
			else if (x > 220)
			{
				point.x = 220;
				point.y = 126;
			}
			else 
			{
				point.y = 126;
			}
			touchPoint = point;
			currentLine = 1;
			NSLog(@"Current line: %i", currentLine);
			return;
		}
I don't know about you, but it seems pretty innocent to me. I've placed breakpoints all over, but nothing happens.
As I said, it was working fine until I just hit build and go, foolishly expecting my app to improve. Could you define "segmentation error" so I can see if anything rings a bell?
architectpianist is offline   Reply With Quote
Old 02-21-2011, 06:11 PM   #4 (permalink)
Super Moderator
 
Join Date: Oct 2009
Location: San Diego, CA
Posts: 1,586
JasonR is on a distinguished road
Default

That looks like you caused a bug in the linker. I would recommended doing a "Clean All" and building again.
JasonR is offline   Reply With Quote
Old 02-21-2011, 06:21 PM   #5 (permalink)
Registered Member
 
Join Date: Feb 2011
Posts: 122
architectpianist is on a distinguished road
Default

That didn't work either.
architectpianist is offline   Reply With Quote
Old 02-21-2011, 06:41 PM   #6 (permalink)
Registered Member
 
Join Date: Feb 2011
Posts: 122
architectpianist is on a distinguished road
Default

All fixed now. I've maybe had a week of experience with Xcode, so I just opened the Build menu and hit a random button. The button happened to be "Build and Analyze." As it turned out, there were two memory leaks, and after I fixed those, it worked perfectly.
Thanks for the input!
architectpianist is offline   Reply With Quote
Reply

Bookmarks

Tags
error, failed, fault, segmentation, simulator

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 380
15 members and 365 guests
Absentia, cpsclicker, dre, Error404, Gaz, gmarro, jeroenkeij, Kirkout, mottdog, Music Man, PavelMik, teebee74, whitey99, Wikiboo
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,666
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, cpsclicker
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:12 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0