of app runs from xCode, crashes when doubleclicked in finder

hi there

i have a strance problem. my openFrameworks program compiles just fine and runs smoothly when i run it from within xCode.

but, if i run it by doubleclicking in finder, without having moved anything, it crashes with an abort from openCv’s cvFindHomography - raised from __tcf_0 that i haven’t found anything meaningful about

have a look:

  
  
  
Process:         Frost [9523]  
Path:            /Developer/Projects/of_preRelease_v0.06_xcode_FAT/apps/frost/frost/bin/Frost.app/Contents/MacOS/Frost  
Identifier:      com.recoil.frost  
Version:         ??? (1.0)  
Code Type:       X86 (Native)  
Parent Process:  launchd [95]  
  
Date/Time:       2009-11-02 07:39:23.867 +0100  
OS Version:      Mac OS X 10.6.1 (10B504)  
Report Version:  6  
  
Interval Since Last Report:          1534347 sec  
Crashes Since Last Report:           39  
Per-App Interval Since Last Report:  907956 sec  
Per-App Crashes Since Last Report:   8  
Anonymous UUID:                      587CB4A4-F08B-46DB-97CB-D62444F478C0  
  
Exception Type:  EXC_CRASH (SIGABRT)  
Exception Codes: 0x0000000000000000, 0x0000000000000000  
Crashed Thread:  0  Dispatch queue: com.apple.main-thread  
  
Application Specific Information:  
abort() called  
  
Thread 0 Crashed:  Dispatch queue: com.apple.main-thread  
0   libSystem.B.dylib             	0x96f57912 __kill + 10  
1   libSystem.B.dylib             	0x96f57904 kill$UNIX2003 + 32  
2   libSystem.B.dylib             	0x96feab99 raise + 26  
3   libSystem.B.dylib             	0x97000c50 abort + 93  
4   com.recoil.frost              	0x00237b84 __tcf_0 + 0  
5   com.recoil.frost              	0x002343ac icvSVD_64f(double*, int, int, int, double*, double*, int, int, double*, int, double*) + 2180  
6   com.recoil.frost              	0x00236794 cvSVD + 2330  
7   com.recoil.frost              	0x001a4903 CvHomographyEstimator::runKernel(CvMat const*, CvMat const*, CvMat*) + 2245  
8   com.recoil.frost              	0x001a666f cvFindHomography + 913  
9   com.recoil.frost              	0x00023e13 Warp::MatrixCalculate() + 247  
10  com.recoil.frost              	0x0001fa4e ProjectionSurfacesObject::recalculate() + 118  
11  com.recoil.frost              	0x00023738 ProjectionSurfaces::setup() + 5052  
12  com.recoil.frost              	0x0001e8ac PluginController::setup() + 26  
13  com.recoil.frost              	0x00008feb testApp::setup() + 315  
14  com.recoil.frost              	0x000173f7 -[BasicOpenGLView awakeFromNib] + 460  
15  com.apple.CoreFoundation      	0x94129da4 -[NSSet makeObjectsPerformSelector:] + 196  
16  com.apple.AppKit              	0x963c4672 -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:] + 1566  
17  com.apple.AppKit              	0x963c264a loadNib + 257  
18  com.apple.AppKit              	0x963c1a44 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] + 228  
19  com.apple.AppKit              	0x963c1955 +[NSBundle(NSNibLoading) loadNibFile:externalNameTable:withZone:] + 158  
20  com.apple.AppKit              	0x963c18a0 +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 383  
21  com.apple.AppKit              	0x963be6a9 NSApplicationMain + 434  
22  com.recoil.frost              	0x0000cc5a ofRunApp(ofBaseApp*) + 95  
23  com.recoil.frost              	0x0000841b main + 124  
24  com.recoil.frost              	0x00007931 start + 53  
  

any help is appreciated…

my initial thought is something like an uninitialized variables (sometimes their value changes from how you run the app – since they don’t have an initial value, just what’s in memory, this can change based on how you run the app) + other memory things, off by one error in a for loop, etc. more esoteric errors are #defines that are defined differently in different places in the app (leading to memory misalignment on object sizes and just general voodoo)

otherwise, something about loading media might be bad? You can check the width and height of anything loaded in, etc.

I’d try debugging it via printf and commenting out till you can see what’s wrong.

hope that helps -
zach

i’ve also encountered a couple of times the same problem and due to the data path. For some reason running from xcode the paths were relative to the bundle and running from finder, paths were relative to the executable inside the bundle (or vice versa). I can’t remember how I resolved it, perhaps something in project settings. Like Zach mentioned, with printf’s you should be able to identify if that indeed is your problem.

I had a data path problem in this thread http://forum.openframeworks.cc/t/can’t-find-data-files-in-006/2326/0 which was solved once I selected the right option in the GLUT preferences. Similar symptoms but not sure if this will help.