High CPU (App) In All The iphones

0 favourites
  • 11 posts
From the Asset Store
High Low is a casino game using luck and points accumulation.
  • Problem Description

    it seems there is a memory leak or something like that I have no idea how you will call it.

    The first time the App starts and Runs is all good and smooth Runs between 7 to 10% Cpu and as long as you keep Playing without closing the App or change the Layout the Cpu stays stable on those values.

    Now the problem starts when the App closes for the first Time or at the change of the Layout the CPU jumps straight to 100 and stays there permanent the phone gets hot really hot, in one of the occasions it froze the IphoneX.

    Here is the weird thing even when I change to (Layout 2) which has nothing just a Txt box and a Button the Cpu is still at 100 permanent I thought between layouts it shouldn't get affected by other Layouts

    Closing the App and opening it again the same puts the Cpu to 100%

    doesn't matter how many times you close it and open it the 100% Cpu doesn't calm down.

    The only way to stop that and normalize the Cpu back to normal is by turning off completely the iPhone and restart again, but after restart the first time you open the App it will play normally at 7 to 10% Cpu and the sooner you close the App or change the Layout Cpu will be back to 100% permanent.

    is quite serious as it nearly kills the phones

    I tried to reproduce a Capx with the first thing that came to my mind so I didn't optimize anything and is nothing to do with my game I just put something quick roughly putting the number of objects

    that I have on my real project and a loop to give c2 some work and it did the same so I manage to reproduce it Again

    Attach a Capx

    https://www.dropbox.com/s/c46xh0u38j8a8ep/3-Bug%20%28Cpu%20High%29%20When%20Reopen%20App.capx?dl=0

    Description of Capx

    The capx has just a basic controller so you can move around 300 Tiles and some enemies moving around,

    and has some loop to change tiles frames just to keep C2 busy

    Steps to Reproduce Bug

    • Step 1 >> Export and Install the App on iPhone, I used Cocoon and Canvas+
    • Step 2 >> The first Time you play as long you don't close the App or change the Layout keep watching the Cpu to have an Idea how the App it should run normally I got around Cpu = 7 to 10 on Iphone 8 and X Cpu = 40 % on Iphone 7
    • Step 3 >> once you have an idea about how the App it should perform close the App and reopen it again you should see that the App jumps to CPU:100% and stays there permanent you can change to (Layout 2) swell and the 100 Cpu will not calm down
    • Step 4 >> After you opened and closed many times and changed layouts and you are sure that is something wrong going on then you can turn off the iPhone and back on again and try the App again you will notice that the Cpu is back to normal, it will stay normal as longs as you don't close or change the layout if you do then the 100cpu will be back again
    • Step 5 >>I recorded some videos to help reproduce the Problem I didnt want to make the videos long so this is what I did 1-I open the App for the first time and I move around for a few secs/min enough to show the real Cpu usage wich the App it should run normaly 2-I close the App and open it again to show how the cpu Jumps to 100% and there is no way to drop it down even I changed layout to layout 2 many times and is still showin 100%Cpu on a layout that has nothing just a few objects with no events at all Iphone 8:https://www.dropbox.com/s/4h0am6u4pvvjlxo/Iphone%208%20Plus.mp4?dl=0 Iphone X:https://www.dropbox.com/s/bn98tl1xelm2ife/Iphone%20X.mp4?dl=0

    Observed Result

    while you play if you close the App or change the Layout the Cpu jumps to 100% and stays there permanent,

    even when you go to (layout 2) wich has 2 objects only no events the cpu is still 100%

    Expected Result

    I expect that the Cpu stays normal the same as the first time you play wich is when is totally normal doesn't matter how long you play the CPU stays cool, example on Iphone (8 and X ) Cpu is (7 to 10) %

    I expect when I close the App and open it again if the App normally runs at Cpu: 7 to 10 % then it should be back to the same values not jump to 100%Cpu for no reason Trying to kill the Phones

    I expect when I change Layout to (layout 2) which is empty and has no events to run I would expect if (Layout 1) Runs at Max Cpu: 10% with all those events and enemies and loops, then I would expect as an empty Layout Cpu should Run = 1% Maybe? 3%? Not Cpu:100%

    Affected Browsers

    • Chrome: (YES/NO) I don't know is an Exported App
    • FireFox: (YES/NO) I don't know is an Exported App
    • Internet Explorer: (YES/NO) I don't know is an Exported App

    Affected Iphones

    Iphone X

    Iphone 8 Plus

    Iphone 7 Plus

    Operating System and Service Pack

    Windows 10 version 1709

    Construct 2 Version ID

    Yesterday I installed the latest version R254

    but previously I had R252 which is still affected

  • I'm not sure if this is related and is not to blame C2 but the iPhone 8 is only one month old has been replaced for a brand new phone because the previous one went completely dead after 3 Month of use ,these phones are only been using for testing the games made in Construct, not for personal use so barely they get used unless if is for testing, I know this thing can happen with any phone even if it was a 1 day old can be faulty from manufactury fault and not specifivally c2 faults but can it be this related to this bug??

    as sometimes the Cpu I saw jumping to 120 or 129 % for a very short time but it happens

  • Update

    I thought the Problem will be linked to how many objects are created which I had like 300+ on the capx I posted here, so I had another test without any objects just the Player Moving and a Tiled Background with a Super Tiny 8x8 Sprite to visualize that the Player is Moving and my surprise it does the same thing

    At the beginning of the video, you can see that this App it should Run at 3% only I closed the App and reopened and Jumps to 100% staying there I changed to (Layout 2) which is Empty and the 100% wouldn't go back to layout 1 and still the 100% is there, I didn't want to keep longer recording on that 100% Cpu as I'm worried to Fry the Phone but I think you get the point with this short Video

    Video Test for iPhone 8 only But all the iPhones are affected

    Video:

    https://www.dropbox.com/s/mpn6219utr75g ... 9.mp4?dl=0

    Caxp: Exported With Cocoon and used Canvas+

    https://www.dropbox.com/s/ogzwsmbfzk0m2 ... .capx?dl=0

    Also I wanna point that I reported High Cpu for no reason on this thread and it took me a very long time to put the videos together and uploading them which you haven't even looked at them wich it may be related to this case and not related to any (containers or Families) as I reported there on that thread if you where to take seriously the reports it may these things would have been avoided really quick, because it looks like you makes look like we trying to give negative reviews to C2 when is not, we just want to improve c2 to keep using it, if we werent reporting these things it will never be adressed and we are the ones that sufer the consequences as we been ignored

    https://www.scirra.com/forum/high-quot-engine-quot-cpu-usage-when-using-families_t197952?start=40

  • Update

    I just Downgraded C2 to the Version R250 and I did the same test but with the same Results

  • Have you tested with anything else than Canvas+? That would tell if it's C2 or Canvas+ issue. Also note that Scirra does not support Cocoon officially so you should check if there's a similar issue with Phonegap.

  • Have you tested with anything else than Canvas+? That would tell if it's C2 or Canvas+ issue. Also note that Scirra does not support Cocoon officially so you should check if there's a similar issue with Phonegap.

    Hi Toby R Thanks for your suggestions

    [quote:169oxpl9]Have you tested with anything else than Canvas+?

    The other Platforms is hard to say if yes or not both

    PhoneGap = run the Game at high Cpu all the time 90+

    Coccon WebView = the same high Cpu all the time 90+

    one thing good on those Platforms is that (The Layout by Layout) is working at last but still shouldn't run that capx at 90+% on an Iphone (8 or X) when on Canvas+ Runs just at 6% Max so its very ard to say if are not affected those Platforms swell or at least half affected

    Here is the Video Test was done on iPhone 8 Plus

    Video:

    https://www.dropbox.com/s/luun7tld3y9c9br/PhoneGap%20Test.mp4?dl=0

    [quote:169oxpl9]

    Also note that Scirra does not support Cocoon officially so you should check if there's a similar issue with Phonegap.

    I understand what you are saying but That's the thing is hard to know who is the fault as you can see on the first Videos that Special thing that C2 has about optimization (Layout by Layout) is not happening or is not working at all so who is the fault? shouldn't Layout by Layout work irrelevant off the Platform we choose to export??

    I could be wrong though that's why I posted on construct 2 Bugs first, honestly I don't mind who is the fault as long they can find a fix thanks for your suggestions though

  • The original report mentions a memory leak. As mentioned, we haven't officially supported Canvas+ for years. Does the memory leak occur using PhoneGap Build (or any other Cordova build system e.g. Cordova CLI)? If not, it must be a Canvas+ bug, so please report it to them.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hi Ashley

    [quote:3a1hq21b]The original report mentions a memory leak

    I thought that could be the problem but is true I changed the Tittle to more appropriate one "High CPU (App) In All The iphones"

    [quote:3a1hq21b]we haven't officially supported Canvas+ for years.

    ok thanks, I didn't know that now makes more sense the Toby statement, I'm not sure why you would stop support on canvas+ obiosly you must have your reasons but for what I saw is super fast and useful platform to use, I could see how anyone using construct will benefit from Canvas+ as there is a huge gap between WebView and canvas I mean big you cant compare them, webview runs all the Games at 90%Cpu Extra super slow than a Game exported With Canvas, you can see the diference with any iphone from 7 and all the iphones that came after

    [quote:3a1hq21b]Does the memory leak occur using PhoneGap Build

    Yes it does at least for me,

    Any Game exported by "PhoneGap" or "Coccon WebView" Runs at 95% Cpu in all the iPhones, doesn't matter if is simple Game with not many events or if is more advanced Game with much more events

    Plus another Hint to see that something is going on is how can the same Game run at 95%Cpu on an Iphone6 and then Runs exactly at 95%Cpu on an iphone (8 or X) which are way faster and more advanced than iphone6.

    Shouldn't be run at much much lower CPU at least on the latest Phones?? so here you have a clear evidence that is something affecting the Cpu pushing the phones to the limits doesn't matter how fast is the phone, it looks like doesn't matter how advanced the technology is advancing on phones doesn't help to construct it will always give the same speed and Performance.

    Here is the Video Test was done on (iPhone 8 Plus) Exported with PhoneGap,

    Iphone X gives the same performance as is exactly the same chip

    Video: I used the same Capx linked in my first post

    https://www.dropbox.com/s/luun7tld3y9c9 ... t.mp4?dl=0

    Are these things be fixed in the New Run Time??

  • This kind of report is really confusing. I could probably fix two other bugs in the time it just takes to read this much information, watch the videos, and figure out exactly which problem you're talking about (since it appears to have changed at some point during this thread). Can you file a new bug and basically try to keep it as concise as possible? Stick to officially supported platforms only, a minimal repro project, clear steps to follow, and the expected and observed result.

    I'd point out that the CPU usage in Construct is a timer-based estimate. It's not very accurate for mobile devices because of the way they throttle to save power. I investigated another "high CPU" iOS bug and it just turned out to be this. In maximum performance mode, it might be using something like 9% CPU - hardly any. However if the OS determines it's not that busy, it might throttle down the CPU to be 10x slower, in order to save battery life. However now a timer-based CPU usage measurement indicates 90% CPU! That's a misleading number. Due to this power throttling, you can see a counter-intuitive effect where as you create more objects and add more CPU work, the measured CPU usage actually drops as it kicks up in to a higher performance mode and completes the same work quicker.

    So I'd guess any "high CPU on mobile" bugs probably just come down to this. It'd be best to use another app to measure the real CPU usage on the system if possible.

  • for both android and ios

    use cordova it's much better

    for ios add the wkwebview plugin

    for android add crosswalk plugin

  • [quote:rdlyqaic]This kind of report is really confusing. I could probably fix two other bugs in the time it just takes to read this much information, watch the videos, and figure out exactly which problem you're talking about

    Hmm confused? the thread Points to "High Cpu" across the whole page like 100 times, and if you go straight to the "Observed "Result" & "Expected Result" It gives the short version of the Problem

    Technically the videos it was to help you to avoid ("read this much information")

    Anyway thanks for checking it

    [quote:rdlyqaic](since it appears to have changed at some point during this thread).

    Nothing at all has been changed on this thread just the Title from "App Memory Leak" to "High CPU (App) In All The iphones"

    Thread started with a

    Capx and Video of >>Coccon Canvas+ : >>>but since is not supported anymore and you asked if the problem happens in different platforms then the Thread ended up with a

    Video of >>> PhoneGap: showing the "High Cpu" swell

    [quote:rdlyqaic]Can you file a new bug and basically try to keep it as concise as possible? Stick to officially supported platforms only, a minimal repro project, clear steps to follow, and the expected and observed result.

    Sure no problem I will make sure is short the next Time, I apologize

    [quote:rdlyqaic]I'd point out that the CPU usage in Construct is a timer-based estimate. It's not very accurate for mobile devices because of the way they throttle to save power. I investigated another "high CPU" iOS bug and it just turned out to be this. In maximum performance mode, it might be using something like 9% CPU - hardly any. However if the OS determines it's not that busy, it might throttle down the CPU to be 10x slower, in order to save battery life. However now a timer-based CPU usage measurement indicates 90% CPU! That's a misleading number. Due to this power throttling, you can see a counter-intuitive effect where as you create more objects and add more CPU work, the measured CPU usage actually drops as it kicks up in to a higher performance mode and completes the same work quicker.

    Cool Thanks very much for your explanation, I got now a good understanding on how Construct works, I thought (timer-based estimate. It's not very accurate) it applied to when we test projects over Wifi only

    so it looks like this is not the case then, Even exported Capx and installed on the phones there is no way to test the real performance within Construct, I understand now

    [quote:rdlyqaic]So I'd guess any "high CPU on mobile" bugs probably just come down to this. It'd be best to use another app to measure the real CPU usage on the system if possible.

    Thanks for the suggestion I will try that

    Since "Construct is a timer-based estimate. It's not very accurate for mobile devices" then I think you can close this bug as there is nothing more we can discuss at the moment, I will have to look with different "Cpu Checker" and if I find anything I will open a new bug like you said

    Thanks very much for your Time

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)