Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: [iOS] Swift 2.0 SKMaps mapView.clearAllOverlays() not working.

  1. #1
    Etablierter skobbler
    Join Date
    19.07.2015
    Posts
    23

    [iOS] Swift 2.0 SKMaps mapView.clearAllOverlays() not working.

    Hello there.

    I migrated my whole project today to swift 2.0 and iOS9 support and I hadn't great problems in making it work out of the box aside from an error in compile time which made me to disable Bitcode for the project because it wasn't in the SKMaps.framework.

    Altough It's working everything fine (at first sight) the first bug I found is that the maps actually does't clear any overlay when mapView.clearAllOverlays() is called.

    Regards.

  2. #2
    Etablierter skobbler
    Join Date
    19.07.2015
    Posts
    23
    Hello there.

    Actually there is major issues with SKMaps 2.5 with iOS9 and Swift 2.0. In some parts of the application, when is rendering a map which shows a Real Range the application freezes and doesn't respond until is hard closed. This is the traceback of the issue:

    Thread : Crashed: com.apple.main-thread
    0 Elby 0x00000001003a1d40 std::__1::__tree, std::__1::allocator >, int>, std::__1::__map_value_compare, std::__1::allocator >, std::__1::__value_type, std::__1::allocator >, int>, std::__1::less, std::__1::allocator > >, true>, std::__1::allocator, std::__1::allocator >, int> > >::destroy(std::__1::__tree_node, std::__1::allocator >, int>, void*>*) + 2424792
    1 Elby 0x00000001003a1d4c std::__1::__tree, std::__1::allocator >, int>, std::__1::__map_value_compare, std::__1::allocator >, std::__1::__value_type, std::__1::allocator >, int>, std::__1::less, std::__1::allocator > >, true>, std::__1::allocator, std::__1::allocator >, int> > >::destroy(std::__1::__tree_node, std::__1::allocator >, int>, void*>*) + 2424804
    2 Elby 0x00000001003a1d4c std::__1::__tree, std::__1::allocator >, int>, std::__1::__map_value_compare, std::__1::allocator >, std::__1::__value_type, std::__1::allocator >, int>, std::__1::less, std::__1::allocator > >, true>, std::__1::allocator, std::__1::allocator >, int> > >::destroy(std::__1::__tree_node, std::__1::allocator >, int>, void*>*) + 2424804
    3 Elby 0x00000001003e914c opengl::GLProgram::~GLProgram() + 2716644
    4 Elby 0x00000001003a1d4c std::__1::__tree, std::__1::allocator >, int>, std::__1::__map_value_compare, std::__1::allocator >, std::__1::__value_type, std::__1::allocator >, int>, std::__1::less, std::__1::allocator > >, true>, std::__1::allocator, std::__1::allocator >, int> > >::destroy(std::__1::__tree_node, std::__1::allocator >, int>, void*>*) + 2424804
    5 Elby 0x00000001003e9320 opengl::GLProgram::~GLProgram() + 2717112
    6 Elby 0x00000001003dedec opengl::detail::GLStateMachine::~GLStateMachine() + 2674820
    7 Elby 0x00000001003dd978 opengl::detail::GLStateMachine::~GLStateMachine() + 2669584
    8 libsystem_c.dylib 0x000000019768b7c4 __cxa_finalize_ranges + 428
    9 libsystem_c.dylib 0x0000000197635f64 exit + 24
    10 UIKit 0x00000001877c1650 +[_UIAlertManager hideAlertsForTermination] + 526
    11 UIKit 0x00000001879d96d0 __102-[UIApplication _handleApplicationDeactivationWithScene:shouldForc eExit:transitionContext:completion:]_block_invoke1976 + 316
    12 UIKit 0x00000001879dc844 _runAfterCACommitDeferredBlocks + 292
    13 UIKit 0x00000001879e8de4 _cleanUpAfterCAFlushAndRunDeferredBlocks + 92
    14 UIKit 0x00000001877251e4 _afterCACommitHandler + 96
    15 CoreFoundation 0x0000000182193c30 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK _FUNCTION__ + 32
    16 CoreFoundation 0x00000001821919d4 __CFRunLoopDoObservers + 372
    17 CoreFoundation 0x0000000182191e04 __CFRunLoopRun + 928
    18 CoreFoundation 0x00000001820c0dc0 CFRunLoopRunSpecific + 384
    19 GraphicsServices 0x000000018d214088 GSEventRunModal + 180
    20 UIKit 0x000000018779af60 UIApplicationMain + 204
    21 Elby 0x00000001000890ac main (AppDelegate.swift:136)
    22 libdyld.dylib 0x00000001975fa8b8 start + 4

  3. #3
    Oberskobbler
    Join Date
    22.07.2014
    Posts
    399
    Our development team is investigating the issues with iOS 9. We'll let you know when we have updates.

  4. #4
    Dev platform evangelist dandronic's Avatar
    Join Date
    31.03.2014
    Posts
    177
    The 2.5.1 (out this week) fixes the clearAllOverlays() issue

  5. #5
    Etablierter skobbler
    Join Date
    19.07.2015
    Posts
    23
    As you told me, the clearAllOverlays() issue is gone with the 2.5.1 SKMaps arrival.

    Altough, some issues related with memory allocation and QuartzCore related are still there.

    I post you the two frequently:

    Code:
    Thread : Fatal Exception: CALayerInvalidGeometry
    0  CoreFoundation                 0x0000000184e0cf5c __exceptionPreprocess
    1  libobjc.A.dylib                0x0000000199a03f80 objc_exception_throw
    2  CoreFoundation                 0x0000000184e0cea4 -[NSException initWithCoder:]
    3  QuartzCore                     0x0000000189b5cbf0 CA::Layer::set_position(CA::Vec2 const&, bool)
    4  QuartzCore                     0x0000000189b5cb4c -[CALayer setPosition:]
    5  QuartzCore                     0x0000000189b5cae4 -[CALayer setFrame:]
    6  UIKit                          0x000000018a35b17c -[UIView(Geometry) setFrame:]
    7  UIKit                          0x000000018a371410 -[UIImageView _setViewGeometry:forMetric:]
    8  SKMaps                         0x0000000100e19598 
    9  SKMaps                         0x0000000100e18cfc 
    10 SKMaps                         0x0000000100e1ab6c 
    11 SKMaps                         0x0000000100e46f2c 
    12 QuartzCore                     0x0000000189bb2ba4 CA::Display::DisplayLinkItem::dispatch()
    13 QuartzCore                     0x0000000189bb2a58 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long)
    14 IOKit                          0x000000018609a018 IODispatchCalloutFromCFMessage
    15 CoreFoundation                 0x0000000184dae8e0 __CFMachPortPerform
    16 CoreFoundation                 0x0000000184dc4cdc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__
    17 CoreFoundation                 0x0000000184dc4414 __CFRunLoopDoSource1
    18 CoreFoundation                 0x0000000184dc216c __CFRunLoopRun
    19 CoreFoundation                 0x0000000184cf0dc0 CFRunLoopRunSpecific
    20 GraphicsServices               0x000000018fe44088 GSEventRunModal
    21 UIKit                          0x000000018a3caf44 UIApplicationMain
    22 Elby                           0x00000001000c101c main (AppDelegate.swift:19)
    23 libdyld.dylib                  0x000000019a22e8b8 start
    And

    Code:
    Thread : Crashed: com.apple.main-thread
    0  libsystem_kernel.dylib         0x0000000198ce71e0 __pthread_kill + 8
    1  libsystem_pthread.dylib        0x0000000198db0f0c pthread_kill + 112
    2  libsystem_c.dylib              0x0000000198c5ab78 abort + 140
    3  libsystem_malloc.dylib         0x0000000198d14384 szone_size + 522
    4  SKMaps                         0x0000000101112e2c std::__1::__tree, std::__1::allocator >, int>, std::__1::__map_value_compare, std::__1::allocator >, std::__1::__value_type, std::__1::allocator >, int>, std::__1::less, std::__1::allocator > >, true>, std::__1::allocator, std::__1::allocator >, int> > >::destroy(std::__1::__tree_node, std::__1::allocator >, int>, void*>*) + 36
    5  SKMaps                         0x0000000101112e2c std::__1::__tree, std::__1::allocator >, int>, std::__1::__map_value_compare, std::__1::allocator >, std::__1::__value_type, std::__1::allocator >, int>, std::__1::less, std::__1::allocator > >, true>, std::__1::allocator, std::__1::allocator >, int> > >::destroy(std::__1::__tree_node, std::__1::allocator >, int>, void*>*) + 36
    6  SKMaps                         0x000000010115e1c0 opengl::GLProgram::~GLProgram() + 132
    7  libsystem_pthread.dylib        0x0000000198db0f0c pthread_kill + 112
    8  SKMaps                         0x000000010115e36c opengl::GLProgram::~GLProgram() + 20
    9  SKMaps                         0x0000000101152ac4 opengl::detail::GLStateMachine::~GLStateMachine() + 48
    10 SKMaps                         0x00000001011517a8 opengl::detail::GLStateMachine::~GLStateMachine() + 20
    11 libsystem_c.dylib              0x0000000198c5b7c4 __cxa_finalize_ranges + 428
    12 libsystem_c.dylib              0x0000000198c05f64 exit + 24
    13 UIKit                          0x0000000188e7d634 +[_UIAlertManager hideAlertsForTermination] + 526
    14 UIKit                          0x00000001890956b4 __102-[UIApplication _handleApplicationDeactivationWithScene:shouldForceExit:transitionContext:completion:]_block_invoke1976 + 316
    15 UIKit                          0x0000000189098828 _runAfterCACommitDeferredBlocks + 292
    16 UIKit                          0x00000001890a4dc8 _cleanUpAfterCAFlushAndRunDeferredBlocks + 92
    17 UIKit                          0x0000000188de11c8 _afterCACommitHandler + 96
    18 CoreFoundation                 0x000000018384fc30 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
    19 CoreFoundation                 0x000000018384d9d4 __CFRunLoopDoObservers + 372
    20 CoreFoundation                 0x000000018384de04 __CFRunLoopRun + 928
    21 CoreFoundation                 0x000000018377cdc0 CFRunLoopRunSpecific + 384
    22 GraphicsServices               0x000000018e8d0088 GSEventRunModal + 180
    23 UIKit                          0x0000000188e56f44 UIApplicationMain + 204
    24 Elby                           0x000000010011d014 main (AppDelegate.swift:19)
    25 libdyld.dylib                  0x0000000198bca8b8 start + 4
    Regards.

  6. #6
    Oberskobbler
    Join Date
    22.07.2014
    Posts
    399
    We will check this out. Thank you for reporting it.

  7. #7
    Etablierter skobbler
    Join Date
    19.07.2015
    Posts
    23
    Quote Originally Posted by Adela_Silvia View Post
    We will check this out. Thank you for reporting it.
    How is this going? It's a matter of time to the application to crash due this kind of errors. Pretty blocking issue...

  8. #8
    Oberskobbler
    Join Date
    22.07.2014
    Posts
    399
    Can you please provide more info in order to better understand the circumstances in which this happens? A code snippet/steps/local settings might be helpful. We tested the Swift Demo project but calling the clearAllOverlays() method doesn't causes a crash.

  9. #9
    Etablierter skobbler
    Join Date
    19.07.2015
    Posts
    23
    Quote Originally Posted by Adela_Silvia View Post
    Can you please provide more info in order to better understand the circumstances in which this happens? A code snippet/steps/local settings might be helpful. We tested the Swift Demo project but calling the clearAllOverlays() method doesn't causes a crash.
    Hello.

    As I told, the .clearAllOverlays() method was fixed and It's not causing the crashes.

    The circumstances where this crashes happen are when any map is shown on screen and, I've not tested if this has some relation to the problem, in previous versions didn't happen, I'm using a singleton as the whole map instance in order to preserve data, and memory efficiency between different maps shown in the application.

    As far as I've tested, this crashes only happen in real devices NOT attached to a debug session (which causes this to be hard to fix for me) so all the crash reports I posted before are from iTunesConnect Beta Crash Reports and Crashlytics sessions, and it's a matter of time to the app to crash due to this kind of errors.

    Regards.

  10. #10
    Oberskobbler
    Join Date
    22.07.2014
    Posts
    399
    Thank you for the reply.
    We'll investigate it further and we'll get back as soon as we have some updates

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •