5

I'm seeing few crashes in fabric which looks like this:

Fatal Exception: java.util.concurrent.TimeoutException: android.text.TextPaint.finalize() timed out after 30 seconds
       at android.graphics.Paint.finalizer(Paint.java)
       at android.graphics.Paint.finalize(Paint.java:2437)
       at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:202)
       at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:185)
       at java.lang.Thread.run(Thread.java:833)

Fatal Exception: java.util.concurrent.TimeoutException: java.io.FileInputStream.finalize() timed out after 10 seconds
       at java.io.FileDescriptor.valid(FileDescriptor.java:87)
       at libcore.io.IoUtils.close(IoUtils.java:37)
       at java.io.FileInputStream.close(FileInputStream.java:121)
       at java.io.FileInputStream.finalize(FileInputStream.java:142)
       at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:187)
       at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:170)
       at java.lang.Thread.run(Thread.java:856)

I'm not sure why and which code of my Android app causes these crashes, I am not able to replicate it as well. Maybe someone of you had similar issue and solve it?

sider
  • 687
  • 2
  • 9
  • 23
  • 2
    The fact that a finalizer is trying to close your `FileInputStream` means that you forgot to close it yourself. You should use try-with-resoruces whenever you open a file, to ensure that the input stream is always closed correctly. – Andreas Oct 20 '16 at 06:51
  • Yes, it might be, but it seems it is caused by one of the libraries because I can't find any usage of FileInputStream in my app. – sider Oct 20 '16 at 07:15

0 Answers0