Comments (8)
@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.
In what sense? On which platform? Can you provide a log?
from mapbox.
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.
Interesting. Perhaps it depends on how you use the plugin, so can you share the code that leads to high memory usage?
from mapbox.
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.
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.
@lbweb do you wait for the .hide
callback before calling .show
again?
from mapbox.
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)
- In ios map is not showing ??
- This project is dead. HOT 4
- Not able to import mapbox-gl npm package and cordova-plugin-mapbox HOT 1
- Adding JS event on pin click HOT 2
- Search bar HOT 1
- addMarkerCallback does not show clickable button in popup on Android 5.1.0 HOT 3
- 3D Map Support HOT 1
- Add Polyline & Alpha support
- Failed to fetch plugin HOT 2
- Mapbox.hide - PhoneGap Cordova HOT 1
- use navigation in phonegap-based app
- How to use with ionic 3 HOT 3
- Mapa cortado cuando cambio la orientación del celular. HOT 6
- como usar clearBackground: true,
- Go to user's current location
- active or not HOT 9
- How to add element over map HOT 13
- No support and maintainance HOT 9
- Where is Mapbox plugin Documentation ? HOT 1
- AAPT: error: duplicate value for resource 'attr/layout_anchorGravity' with config ''.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mapbox.