kjaylee / iphone-exif

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

Library crashes on Release optimisation greater than o1 #4

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. set release or distribution build at level o2|o3
2. build onto device
3. repeated access to API results in EXEC_BAD_ACCESS 

Example:

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x03d41000
Crashed Thread:  0

Thread 0 Crashed:
0   libSystem.B.dylib               0x314535a4 0x313d5000 + 517540
1   Foundation                      0x30675096 0x3066f000 + 24726
2   Foundation                      0x3069e572 0x3066f000 + 193906
3   Foundation                      0x3069e53c 0x3066f000 + 193852
4   GeoApp                          0x00019fae 0x1000 + 102318
5   GeoApp                          0x000151d2 0x1000 + 82386

What is the expected output? 
Expected is correct behaviour

Debug setting on any optimisation level does not produce this behaviour. 
Setting optimisation 
level to o1 does not produce this behaviour.

Original issue reported on code.google.com by steview....@googlemail.com on 23 Aug 2008 at 8:39

GoogleCodeExporter commented 8 years ago
binary library build at o1 released. A workaround is required in projects that 
use the source. Either compile the 
files with o1 or lower or link in the binary. The default release in XCode of 
o2/o3 or os will cause Exec errors in 
the library. 

Further work is required to resolve this.

Original comment by steview....@googlemail.com on 24 Aug 2008 at 4:20

GoogleCodeExporter commented 8 years ago
I found and fixed this issue.  There's some memory-scribbling going on because 
of what I think is a 
misunderstanding of the arguments of NSMakeRange().

Original comment by rsand...@gmail.com on 18 May 2009 at 4:59

Attachments:

GoogleCodeExporter commented 8 years ago
rsanders is right... changing line 1270 of EXFMetaData.m to:

    CFDataGetBytes(*exifData, CFRangeMake(6,2), order);

fixes this problem for me.

Original comment by jibbi...@gmail.com on 10 Sep 2009 at 7:49

GoogleCodeExporter commented 8 years ago
Wow, thanks, everyone! Doing the change jibbiwig wrote fixed my problem. I was
tearing out my hair, trying to figure out why my app worked on the simulator 
(debug
and release) and device (debug) but not device (release). Thanks!!

Original comment by wut...@gmail.com on 4 Mar 2010 at 9:04