printdotio / printio-ios-sdk

SDK that enables the printing of any photo, from any source, onto any product!
Other
20 stars 11 forks source link

Crash - attempt to insert nil object #507

Closed jordansorensen closed 8 years ago

jordansorensen commented 8 years ago

I occasionally (I'd estimate 1 / 30th of the time, maybe?) encounter this crash when trying to order photo prints. I select the size of the print (4x6) and the "Loading..." screen appears. The app then crashes before the "Processing x of y images" screen appears.

2016-01-26 14:49:46.313 app[2055:528951] PrintIO: PMImageDownloader download finished
2016-01-26 14:49:46.331 app[2055:528951] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSMutableArray insertObjects:count:atIndex:]: attempt to insert nil object from objects[22]'
*** First throw call stack:
(0x181cf9900 0x181367f80 0x181be74c4 0x181be7170 0x181be7000 0x100390a78 0x10039092c 0x1003af2d4 0x1826a0334 0x1825f3100 0x1825e3348 0x1826a2728 0x1010b1bb0 0x1010b7658 0x181cb0bb0 0x181caea18 0x181bdd680 0x1830ec088 0x186a54d90 0x1001579e0 0x18177e8b8)
libc++abi.dylib: terminating with uncaught exception of type NSException

The index concerned (22 in this case) changes from crash to crash.

perisicboro commented 8 years ago

@Ivan1985 Please try to recreate this issue.

jordansorensen commented 8 years ago

I'm suspicious that the array being inserted into here is a list of the photos being used. I was using print.io's setImages method and passing in an array of NSURLs, each giving the path to a photo on the local file system. Thanks for taking a look at these issues!

perisicboro commented 8 years ago

@jordansorensen fixed. fix will be available with next update.

jordansorensen commented 8 years ago

Great, thanks!