Results 1 to 6 of 6

Thread: Crash- pointer being freed was not allocated. Easily reproduce in virtually empty app

  1. #1
    Etablierter skobbler
    Join Date
    26.10.2015
    Posts
    36

    Crash- pointer being freed was not allocated. Easily reproduce in virtually empty app

    A Very simple app crashes

    MapApp(70799,0x10cc7e000) malloc: *** error for object 0x7faf4c404e80: pointer being freed was not allocated
    *** set a breakpoint in malloc_error_break to debug

    I would attach sample project but can't attach a large file. I have duplicated the problem in multiple apps.
    See the steps to duplicate below.

    This is causing us a major hurdle in that we cannot run our automated tests.

    The app only crashes when using SKMapView.

    Stack Trace:

    Code:
    #0	0x000000010ccb1002 in __pthread_kill ()
    #1	0x000000010cc775c5 in pthread_kill ()
    #2	0x000000010ca17cec in abort ()
    #3	0x000000010cb35b92 in free ()
    #4	0x0000000108b7e41d in 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*>*) ()
    #5	0x0000000108b7e41d in 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*>*) ()
    #6	0x0000000108be2728 in opengl::GLProgram::~GLProgram() ()
    #7	0x0000000108bd4e20 in opengl::detail::GLStateMachine::~GLStateMachine() ()
    #8	0x000000010ca18a5d in __cxa_finalize_ranges ()
    #9	0x000000010ca18d8c in exit ()
    #10	0x00000001156690cd in ___XCTestMain_block_invoke ()
    #11	0x000000011561f128 in -[XCTestDriver _runSuite] ()
    #12	0x000000011561fe2c in -[XCTestDriver _checkForTestManager] ()
    #13	0x0000000115668e99 in _XCTestMain ()
    #14	0x0000000109dc6a1c in __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ ()
    #15	0x0000000109dbc6a5 in __CFRunLoopDoBlocks ()
    #16	0x0000000109dbbe02 in __CFRunLoopRun ()
    #17	0x0000000109dbb828 in CFRunLoopRunSpecific ()
    #18	0x000000010e43bad2 in GSEventRunModal ()
    #19	0x000000010a8df610 in UIApplicationMain ()
    #20	0x00000001087ab78d in main at /Users/.../Dev/Projects/BugReports/MapApp/MapApp/AppDelegate.swift:12
    #21	0x000000010c97192d in start ()
    Steps to duplicate:
    1. Create new project called MapApp. Choose swift as the language. Include tests.
    2. Create Podfile ind project directory (sibling to MapApp.xcodeproj) with contents:
      source 'https://github.com/CocoaPods/Specs.git'
      pod 'ScoutMaps-iOS-SDK', '~>2.5'
      pod 'ZipArchive', '~>1.4'
      target 'MapAppTests' do
      pod 'ScoutMaps-iOS-SDK', '~>2.5'
      pod 'ZipArchive', '~>1.4'
      end
    3. Run "pod install"
    4. Open MapApp.xcworkspace
    5. Add a bridging header file and #import <SKMaps/SKMaps.h>
    6. Within project, open Main.storyboard
    7. Add a UIView as a child to the main view of the view controller.
    8. In the indentity inspector, set the class name of the view you just added to SKMapView
    9. Open AppDelegate.swift
    10. Add these lines to application:didFinishingLaunchingWithOptions: using a valid key.
      let settings = SKMapsInitSettings()
      SKMapsService.sharedInstance().initializeSKMapsWit hAPIKey("xxxxxxxxxxxxxxxxxxxxxxxx", settings: settings)
    11. Run the app. See the map appear.
    12. run the tests (cmd-U)


    See that when the empty tests complete, they crash. They do not crash if you do not use SKMapView.
    Last edited by jimt2000; 07.01.2016 at 19:01.

  2. #2
    Etablierter skobbler
    Join Date
    19.07.2015
    Posts
    23
    +1 on this. Talked about this in other thread in the forum and got no fix for this, altough in real-execution environment doesn't seem to make the app crash, only to send that traceback...

  3. #3
    Etablierter skobbler
    Join Date
    26.10.2015
    Posts
    36
    Our problem is that we can't get to a real execution environment because it fails in the test environment.

  4. #4
    Oberskobbler
    Join Date
    22.07.2014
    Posts
    399
    This issue was fixed by our development team and will be available in the next SDK release

  5. #5
    Etablierter skobbler
    Join Date
    26.10.2015
    Posts
    36
    That's great news! Is there a way that we will be notified when the release becomes available?

  6. #6
    Oberskobbler
    Join Date
    22.07.2014
    Posts
    399
    Each time we have a new release, we send a newsletter to our users and we share the news on our blog http://sdkblog.skobbler.com/
    Last edited by Adela_Silvia; 20.01.2016 at 13:15.

Tags for this Thread

Posting Permissions

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