Out of Memory Error

Thread is closed for posting
2 posts, 0 answers
  1. Tim
    Tim avatar
    20 posts
    Member since:
    Apr 2016

    Posted 03 Jul 2016 Link to this post

    I received this one today, while testing my app via livesync. I have seen it a couple of times over the last month or so:

    "Out of Memory Error"  along with "No Stack available" message. 

    I am developing in Platform using an in-browser client and livesync testing on Android and iOS tablets.

    Our app uses a lot of images, but I still don't expect this to occur. Is there any way to increase heap/stack allocation for NativeScript apps built using Platform?





  2. Nikolay Iliev
    Nikolay Iliev avatar
    351 posts

    Posted 06 Jul 2016 Link to this post

    Hi Tim,

    The reasons behind "Out of memory" error can be different so in order to reproduce it the best way is to have a sample project which is throwing that error. Of course, I understand that sometimes sending projects is not an option (due to privacy or other reasons) so another way to provide us with more information is to log this error.
    There are several approaches.
    1.) Use the application events and specifically the lowMemoryEvent

    in your app.js
    var application = require("application");

    function (args) {
        if (args.android) {
            // For Android applications, args.android is an android activity class.
            console.log("Activity: " + args.android);
        } else if (args.ios) {
            // For iOS applications, args.ios is UIApplication.
            console.log("UIApplication: " + args.ios);
    More about application events here.

    This way you can log additional information about what is causing the memory leak.
    More about logging in Telerik Platform via in-Browser here: http://docs.telerik.com/platform/appbuilder/nativescript/debugging-your-code/view-logs

    Nikolay Iliev
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top