miyabi / google-toolbox-for-mac

Automatically exported from code.google.com/p/google-toolbox-for-mac
Apache License 2.0
0 stars 0 forks source link

Bus Error in RunIPhoneUnitTest #22

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add framework to project as instructed
2. Execute target (runs script)

What is the expected output? What do you see instead?
Unexpected error appears:  Line 113: 1253 Bus error 
"$TARGET_BUILD_DRI/$EXECUTABLE_PATH" 
-RegisterForSystemEvents.  OS reports a crash.

What version of the product are you using? On what operating system?
SVN trunk, on OS X 10.5.6 with XCode 3.1.3

Please provide any additional information below.
Tests appear to run...  Crash dump attached

Original issue reported on code.google.com by adam.str...@gmail.com on 8 May 2009 at 3:15

Attachments:

GoogleCodeExporter commented 9 years ago
from your crawl:
6   GTMTest                         0x0000863e -[ExerciseTest testSave] + 1122 
(ExerciseTest.m:104)

check the string you are printing, it looks like there might be a problem 
between your format string and the args 
passed.

Original comment by thoma...@gmail.com on 8 May 2009 at 4:06

GoogleCodeExporter commented 9 years ago
Interesting.  That line is a call to STAssertNil, put in to make sure the 
framework was wired up correctly.  Is it just 
me or is it surprising that a bad format string/args combination (in this case 
[NSString stringWithFormat:@"%@", 
error]) would cause the dump?

Original comment by adam.str...@gmail.com on 8 May 2009 at 4:41

GoogleCodeExporter commented 9 years ago
It depends on what error is.  As with any printf style call, if you mix things 
up, the compiler will cast things into 
completely wrong times and act on them.

Original comment by thoma...@gmail.com on 8 May 2009 at 5:13

GoogleCodeExporter commented 9 years ago
Actually, are you saying you did:

STAssertNil(something, [NSString stringWithFormat:@"%@", error])?

if so, think about what happens if the string generated from your call includes 
a percent sign.  The STAssert 
calls already end in format strings, so you just need:

STAssertNil(something, @"error was: %@", error)

Original comment by thoma...@gmail.com on 8 May 2009 at 5:15

GoogleCodeExporter commented 9 years ago
Adam - any update?

Original comment by thoma...@gmail.com on 2 Jun 2009 at 2:37

GoogleCodeExporter commented 9 years ago
Resolved

Original comment by adam.str...@gmail.com on 24 Jun 2009 at 6:25

GoogleCodeExporter commented 9 years ago

Original comment by dmaclach on 24 Jun 2009 at 8:10