Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OutOfMemory Error doInBackground() function #69

Open
MeteALANLI opened this issue Sep 3, 2016 · 2 comments
Open

OutOfMemory Error doInBackground() function #69

MeteALANLI opened this issue Sep 3, 2016 · 2 comments
Labels

Comments

@MeteALANLI
Copy link

HomePage.prototype.onSlideContainerLoaded = function (args) { if(!appSettings.getBoolean("is_logged")) { frames.topmost().navigate("pages/login/login"); } else{ var slideContainer = args.object; slideContainer.style.visibility = "collapsed"; var slides = config.slider_list; var count = 0; slides.forEach(function (slide) { slideContainer.addChild(getSlide(slide.slider_name,slide.slider_image)); count++; }); slideContainer.style.visibility = "visible"; } } function getSlide(labelText,image) { var slide = new slides.Slide(); slide.style.backgroundImage = "url('"+image+"')"; slide.style.backgroundRepeat = "no-repeat"; slide.style.backgroundPosition = "center"; slide.style.backgroundSize = "cover"; return slide; }

I am Creating my Slides Like that There is XML;

<Slides:SlideContainer loaded="onSlideContainerLoaded" height="35%" pageIndicators="true" > </Slides:SlideContainer>

And When Use this plugin i am getting this error:
java.lang.RuntimeException: An error occurred while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:309) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354) at java.util.concurrent.FutureTask.setException(FutureTask.java:223) at java.util.concurrent.FutureTask.run(FutureTask.java:242) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818)Caused by: java.lang.OutOfMemoryError: Failed to allocate a 14745612 byte allocation with 12939040 free bytes and 12MB until OOM at dalvik.system.VMRuntime.newNonMovableArray(Native Method) at android.graphics.BitmapFactory.nativeDecodeByteArray(Native Method) at android.graphics.BitmapFactory.decodeByteArray(BitmapFactory.java:763) at org.nativescript.widgets.Async$Http$RequestResult.readResponseStream(Async.java:225) at org.nativescript.widgets.Async$Http$HttpRequestTask.doInBackground(Async.java:303) at org.nativescript.widgets.Async$Http$HttpRequestTask.doInBackground(Async.java:253) at android.os.AsyncTask$2.call(AsyncTask.java:295) at java.util.concurrent.FutureTask.run(FutureTask.java:237) ... 3 more

Why it's happening ?

@JoshDSommer
Copy link
Owner

Sorry my son got. Hold of my phone. I'll look into this next chance I have

@JoshDSommer JoshDSommer added the bug label Sep 3, 2016
@MeteALANLI
Copy link
Author

oh okay no problem ty for interests. This bug can be effect all over program.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants