1

Today while running my app i saw this message in the logcat "Skipped 33 frames.The application may be doing too much work in its main thread". The second part doesn't concern me as my application was really strucking when this message was displayed.But at the same time it said "Skipped 33 frames".. Does it mean that the screen view comes frame by frame just as in case of a video.!!!

DUDE_MXP
  • 724
  • 7
  • 24
  • Was the logcat message from your app? Do you get many skipped frame messages? What part of your code is executing? Is this on an emulator or a real device? And what does "strucking" mean? – Ted Hopp Jun 08 '14 at 05:00
  • I am running on a real device(Android 4.1.2).By "strucking" i mean to say interruption.The screen was displaying in abrupt way. I got the "Skipped 33 frame Message" as i started playing background music on my device.To my guess it was using too much of RAM which resulted in that. – DUDE_MXP Jun 08 '14 at 05:07
  • 2
    Most likely you are doing exactly what the error message says: too much work on the main thread. See [this blog post](http://vaibhavtolia.wordpress.com/2013/10/03/79/) for a discussion of this. Without seeing your code, it's impossible to say much more about the problem. – Ted Hopp Jun 08 '14 at 05:10
  • See this [link](http://stackoverflow.com/a/11329209/3168859) – Lal Jun 08 '14 at 05:50
  • Well my Question was somewhat different...But thanx i got useful answers! – DUDE_MXP Jun 08 '14 at 07:36

1 Answers1

2

The message you are getting is a system log. It happens two reasons(as I know).

  1. When your application is doing too much work on it main/UI thread. To prevent it you should do time consuming works like database query and network operations in a separate thread and post its result to the main thread.
  2. If the system you are running on is slow(low RAM/ slow processor). Emulator is prime example of this problem. Also note that custom ROM's like cynogen and chinese android mobiles also tend to throw this error. They post a whole lot of logcat than nexus.
Illegal Argument
  • 10,090
  • 2
  • 44
  • 61