Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Memory issue on init #5722

Closed
Closed

Description

@type-it

Hi,
I have installed MapBox via Fabric.
When i go an trigger the init method like this

  • (void)mapBox:(UIView*)mapView
    {
    self.map = [MGLMapView new];
    [self.map setFrame:mapView.bounds];
    [self.map setCenterCoordinate:CLLocationCoordinate2DMake(40.712791, -73.997848)
    zoomLevel:12
    animated:NO];
    [mapView addSubview:self.map];
    }

it doesn't load and I get a crash like this
zrzut ekranu 2016-07-19 o 09 58 56
zrzut ekranu 2016-07-19 o 10 00 56
zrzut ekranu 2016-07-19 o 09 59 17
zrzut ekranu 2016-07-19 o 09 59 31

AppName(3849,0x16e087000) malloc: *** mach_vm_map(size=805306368) failed (error code=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
libc++abi.dylib: terminating with uncaught exception of type std::bad_alloc: std::bad_alloc
(lldb)

PLEASE HELP

Activity

  1. wanggang316 commented on Jul 19, 2016

    @wanggang316

    Me to, couse our app 200+ crashs online, what's happened?

  2. Paladinfeng commented on Jul 19, 2016

    @Paladinfeng

    it affected me too. the memmory increase to hundreds of MB. the thread would be killed

  3. type-it commented on Jul 19, 2016

    @type-it
    Author

    I Found that using
    pod "Mapbox-iOS-SDK", "~> 3.2.0"

    Works correctly ;-)

  4. Paladinfeng commented on Jul 19, 2016

    @Paladinfeng

    the service was resumed at 7:00pm (time zone: Beijing)

  5. friedbunny commented on Jul 19, 2016

    @friedbunny
    Contributor

    We’re investigating, thanks for your patience.

  6. 1ec5 commented on Jul 19, 2016

    @1ec5
    Contributor

    We’re tracking the fix in #5723 and will release the fix today in v3.3.1.

  7. HappyDr0id commented on Jul 19, 2016

    @HappyDr0id

    We have the same issue on our Android app since 10am (French time), do you plan to add a fix in the Android SDK too ? Is there any solution without having to update the app with a new MapBox SDK version ?

  8. added
    Core
    on Jul 19, 2016
  9. zugaldia commented on Jul 19, 2016

    @zugaldia
    Member

    @HappyDr0id sorry to hear you're affected by this, we're working on a fix to address this problem as soon as possible. In the meanwhile, there're a couple of things you could do to mitigate this issue:

    • You could recommend your users to clear their app cache.
    • You could change the style in the app to a new style. This will invalidate the cache and load a fresh style from the server (this requires an app store submission).
  10. HappyDr0id commented on Jul 19, 2016

    @HappyDr0id

    @zugaldia Okay, thanks a lot for your answer, I will push an update on the PlayStore with a new map style. I hope that it will fix the issue. Keep up the good work !

  11. bsudekum commented on Jul 19, 2016

    @bsudekum

    To add a little more clarity on who would be affected by this bug:

    • Any version of both the Mapbox iOS and Android SDKs
    • Some users who made a request for a Mapbox style between ~12:00am GMT and ~6:00am GMT today
      • Because mapbox-gl-native caches styles once fetched from the server, this most likely only affected new users fetching a style for the first time.
    • The above bullet is also why the bug occurred; a bad style was fetched from the server and cached on the users device. The map would then try to render the bad style and the app would fail.
    • Styles that could have been affected:

    Like @zugaldia pointed out in #5722 (comment), the best path forward is:

    • You could recommend your users to clear their app cache (not possible on iOS)
    • You could change the style in the app to a new style. This will invalidate the cache and load a fresh style from the server (this requires an app store submission).
    • This PR will be rolled into a release today that will fix the issue.
  12. bleege commented on Jul 19, 2016

    @bleege
    Contributor

    We're releasing the PR on Android as 4.1.1 today. The release can be tracked here: #5725

  13. bleege commented on Jul 19, 2016

    @bleege
    Contributor

    Android 4.1.1 is now released and publicly available on Maven Central. #5725 (comment)

  14. 1ec5 commented on Jul 19, 2016

    @1ec5
    Contributor

    The fix is now in iOS SDK v3.3.1 and macOS SDK v0.2.1 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Corecrashsupport

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions