Giter Site home page Giter Site logo

Comments (8)

dtaalbers avatar dtaalbers commented on August 17, 2024 2

@cusspvz @EddyVerbruggen I am getting app crashes when using this plugin in my ionic (v2) project. These crashes occur both on android and iOS, though IOS spat out the following error when it crashed:

Message from debugger: Terminated due to memory issue

I use the show() function when entering the page (ionViewWillEnter lifecycle) and the hide() when leaving the page (ionViewWillLeave lifecycle). But after navigating, to and from the map view, a few times (amount differs per device) the app just crashes. Note that navigating does not happen in a spammy way. Some indications below:

LG G3 S - Android 5.0.2 :: crashes in about 5 times
iPhone 5s - iOS 10.3.3 :: crashes in about 9 times
iPhone 6s Plus - iOS 10.3.3 :: crashes in about 12 times

After monitoring the memory on the iPhone 6s Plus while navigating to and from the page its builds up the memory to the point it crashes, from 30 MB to 1 GB on the moment the app crashes.

from mapbox.

EddyVerbruggen avatar EddyVerbruggen commented on August 17, 2024

In what sense? On which platform? Can you provide a log?

from mapbox.

Ken473 avatar Ken473 commented on August 17, 2024

Hi,
Sorry for my delayed response. and I do not have a log available.
My test device is a Galaxy S4 with Android 4.4.2.
I am running Cordova 4.0 with the default Webview.
I looked deeper into the issue. It affects Android only.
My app crashes because it takes too much memory.
What happens is when a user has been working with the app for a while, and then tries to use the Social Sharing Plugin, the app simply crashes.
I have been looking at the memory consumption in the Android application manager and the app can consume up to 600 MB of RAM.
To help with the memory consumption I have disabled all the unnecessary plugins but still, the app takes a lot of data.
My device manages to hold but I cannot expect lower end devices to hold very long before they crash.

I hope I have given you enough information.

from mapbox.

EddyVerbruggen avatar EddyVerbruggen commented on August 17, 2024

Interesting. Perhaps it depends on how you use the plugin, so can you share the code that leads to high memory usage?

from mapbox.

lbweb avatar lbweb commented on August 17, 2024

Hi There,
I am also getting large amounts of memory usage when showing/hiding the map (based on when a particular tab is selected. The map is adding an additional 20MB each time I call the show() method. This is expected I guess, but shouldn't the memory be deleted when I call map.hide()? Or this there another method to remove the memory being used?

@Anothar @frigon @EddyVerbruggen - Have you experienced anything like this with the plugin?

from mapbox.

Ken473 avatar Ken473 commented on August 17, 2024

Hi @EddyVerbruggen, sorry for my late reply. There is no specific code per se that create the memory usage. Basically just running the map would increase the memory usage of the app until it crashes.

from mapbox.

cusspvz avatar cusspvz commented on August 17, 2024

@lbweb do you wait for the .hide callback before calling .show again?

from mapbox.

dagatsoin avatar dagatsoin commented on August 17, 2024

It is a bug of the mapbox plugin used in this master branch version. I know that v4 fixed this, but I don't know if there is a minor update for 3.x.

  • Maybe you can fork this repo and set the Mapbox dependencies to 3.x (don't know which version exaclty) in src/android/mapbox.gradle
  • On iOS I am not sure where it has to be done.

from mapbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.