Unable to get memory usage on newer Android versions (DEF-3047) (SOLVED)

Hi everyone,

New to Defold and android development.

I had a problem with debugging a bundle after following the steps on Debugging an application bundle . My console will be spammed with “ERROR:PROFILER: Could not open /proc/stat”.

I tried to research on it but unable to find any result. So no sure what’s the underlying issue.

Any helps will be greatly appreciated.

Thanks

Hm, I might have a clue why this is… A few questions;

  • What Android version is the phone running?
  • Does the application run or does it exit/crash?

Hi sven,

Thanks for responding.

I tried with a phone of Android version 8.0.0.

The error message popped immediately when the application was running (which didn’t crash).

Hope these help.

Thanks!

1 Like

Good to know it didn’t crash! It seems that on newer Android versions we will be unable to fetch CPU (and/or memory) usage due to some permission restrictions. First of all we need to make that error print only happen once and not spam… :slight_smile: But we also need to figure out a workaround.

It should be safe to ignore this print for now, but I’ll add issues for actually fixing this as well.

Thanks for reporting!

2 Likes

Thanks for the clarification! I was worried that I am making mistakes here but thankfully not.

Thanks once again! Kudos to the great work!

1 Like

Hello,

Is there a fix for this yet? I tried to preview on my oneplus one 3t now and has the same error in the console.

Thanks

No, no fix for the memory. If you want to track memory usage then you’ll have to use Android Studio or similar.

1 Like

Fixed in Defold 1.2.137

1 Like