hansemannn / titanium-googlemaps

🗺 Use the Google Maps SDK in Titanium

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash when assests not available

m1ga opened this issue · comments

I've tried the cluser example and forgot to copy over the buckets/ folder. The app crashed with:

[ERROR] Script Error {
[ERROR]     column = 20;
[ERROR]     line = 65;
[ERROR]     message = "*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil";
[ERROR]     sourceURL = "file:///Users/mga/Library/Developer/CoreSimulator/Devices/CF3C580D-9EA2-412D-9D1B-6502A01AEE38/data/Containers/Bundle/Application/D4CDE53C-801F-4DBC-88F6-CF19A35F8FAA/test_maps.app/alloy/controllers/index.js";
[ERROR]     stack = "[native code]\nController@file:///Users/mga/Library/Developer/CoreSimulator/Devices/CF3C580D-9EA2-412D-9D1B-6502A01AEE38/data/Containers/Bundle/Application/D4CDE53C-801F-4DBC-88F6-CF19A35F8FAA/test_maps.app/alloy/controllers/index.js:65:20\ncreateController@file:///Users/mga/Library/Developer/CoreSimulator/Devices/CF3C580D-9EA2-412D-9D1B-6502A01AEE38/data/Containers/Bundle/Application/D4CDE53C-801F-4DBC-88F6-CF19A35F8FAA/test_maps.app/alloy.js:232:54\nglobal code@file:///Users/mga/Library/Developer/CoreSimulator/Devices/CF3C580D-9EA2-412D-9D1B-6502A01AEE38/data/Containers/Bundle/Application/D4CDE53C-801F-4DBC-88F6-CF19A35F8FAA/test_maps.app/app.js:3:23";
[ERROR] } 
[DEBUG] Application booted in 804.844022 ms
[ERROR] The application has crashed with an uncaught exception 'NSInvalidArgumentException'.
[ERROR] Reason:
[ERROR] *** -[__NSArrayM insertObject:atIndex:]: object cannot be nil
[ERROR] Stack trace:
[ERROR] 0   CoreFoundation                      0x000000010c0e4d33 __exceptionPreprocess + 147
[ERROR] 1   libobjc.A.dylib                     0x0000000106bb621e objc_exception_throw + 48
[ERROR] 2   CoreFoundation                      0x000000010c01575f -[__NSArrayM insertObject:atIndex:] + 1375
[ERROR] 3   test_maps                           0x00000001049643ee -[TiGooglemapsView createIconGenerator] + 1046
[ERROR] 4   test_maps                           0x0000000104963da4 -[TiGooglemapsView clusterManager] + 97
[ERROR] 5   test_maps                           0x0000000104976520 __41-[TiGooglemapsViewProxy addClusterItems:]_block_invoke + 780
[ERROR] 6   libdispatch.dylib                   0x000000010d904808 _dispatch_call_block_and_release + 12
[ERROR] 7   libdispatch.dylib                   0x000000010d92612e _dispatch_client_callout + 8
[ERROR] 8   libdispatch.dylib                   0x000000010d90d4fb _dispatch_main_queue_callback_4CF + 1054
[ERROR] 9   CoreFoundation                      0x000000010c0a8e49 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
[ERROR] 10  CoreFoundation                      0x000000010c06e37d __CFRunLoopRun + 2205
[ERROR] 11  CoreFoundation                      0x000000010c06d884 CFRunLoopRunSpecific + 420
[ERROR] 12  GraphicsServices                    0x000000010f276a6f GSEventRunModal + 161
[ERROR] 13  UIKit                               0x000000010851cc68 UIApplicationMain + 159
[ERROR] 14  test_maps                           0x000000010410d5d4 main + 100

It would be nice if it would just print out an error and shows an empty map

Fixed as part of #78