withNAMU / iphone-exif

Automatically exported from code.google.com/p/iphone-exif
1 stars 0 forks source link

Crashes when built for distribution #7

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. build for distribution (adHoc), install on device via iTunes
2. "run"
3.

What is the expected output? What do you see instead?
Works fine when built for debug, or built for distribution on the simulator but 
crashes to the 
springboard when built for adHoc on device

What version of the product are you using? On what operating system?
latest (0.9)

Please provide any additional information below.

The offending method is scanImageData, and within that commenting out 
parseExif: will cure 
the crash (but not return any data!) Typical crash log is below, this is a jpg 
imaged loaded into 
NSData and passed to scanImageData as follows:

NSData *uiJpeg =  [NSData dataWithContentsOfFile:[[NSBundle mainBundle] 
pathForResource:self.imageFilename ofType:@"jpg"]]; 
    if ([uiJpeg length] != 0) {
        [jpegScanner scanImageData:uiJpeg]; 

CRASH LOG:

Incident Identifier: D1524747-B9C5-4D45-845A-E7CC78085739
CrashReporter Key:   7a7fc66d4a00baecf6d4d5435dea3537b996b2c5
Process:         Nature [2432]
Path:            /var/mobile/Applications/31A36936-76A2-480B-A8F6-
BA8F92FACCEF/Nature.app/Nature
Identifier:      Nature
Version:         ??? (???)
Code Type:       ARM (Native)
Parent Process:  debugserver [2431]

Date/Time:       2009-08-28 17:43:32.250 -0700
OS Version:      iPhone OS 3.0 (7A341)
Report Version:  104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread:  0

Thread 0 Crashed:
0   libSystem.B.dylib               0x31dc476c __kill + 8
1   libSystem.B.dylib               0x31dc475c kill + 4
2   libSystem.B.dylib               0x31dc474e raise + 10
3   libSystem.B.dylib               0x31dd949a abort + 34
4   libstdc++.6.dylib               0x374ce860 
__gnu_cxx::__verbose_terminate_handler() + 376
5   libobjc.A.dylib                 0x30013694 _objc_terminate + 104
6   libstdc++.6.dylib               0x374ccc26 __cxxabiv1::__terminate(void 
(*)()) + 46
7   libstdc++.6.dylib               0x374ccc7a std::terminate() + 10
8   libstdc++.6.dylib               0x374ccd46 __cxa_throw + 74
9   libobjc.A.dylib                 0x300135f8 objc_exception_throw + 56
10  CoreFoundation                  0x30222f26 +[NSException 
raise:format:arguments:] + 74
11  CoreFoundation                  0x30222ec4 +[NSException raise:format:] + 28
12  Foundation                      0x3054dc54 -[NSConcreteData 
initWithBytes:length:copy:freeWhenDone:bytesAreVM:] + 204
13  Foundation                      0x30559d46 -[NSData(NSData) 
initWithBytes:length:] + 30
14  Nature                          0x00021f0a -[EXFJpeg scanImageData:] 
(EXFJpeg.m:462)
15  Nature                          0x0001ecb0 -[AttributionsViewController 
extractEXIFData] 
(AttributionsViewController.m:

Original issue reported on code.google.com by kimh...@gmail.com on 29 Aug 2009 at 2:51

GoogleCodeExporter commented 9 years ago
I am troubled by this problem a few days too. I think it is caused by memory 
use. When analysising big jpegs - 
more than 500KB - with methord scanImageData , it crashed.
I change methord scanImageData by myself and make it into steps:
    1. return exif data in the form of NSData*;
    2. release former jpegData to free memory;
    3. parse exif data with EXFMetadata parseExif method.
And then it works.

Original comment by ccairb...@gmail.com on 22 Oct 2009 at 9:01

GoogleCodeExporter commented 9 years ago
Hello ccairball,
Could you please upload the code of your scanImageData method to pastebin.com or
somewhere else? I am stumbling at this exact issue. Thanks.

Original comment by ducn...@gmail.com on 5 Dec 2009 at 12:38