Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input dispatching timed out callTimeoutFunction #448

Open
ghost opened this issue Sep 7, 2020 · 3 comments
Open

Input dispatching timed out callTimeoutFunction #448

ghost opened this issue Sep 7, 2020 · 3 comments

Comments

@ghost
Copy link

ghost commented Sep 7, 2020

Hello
Input dispatching timed out (Waiting to send non-key event because the touched window has not finished processing certain input events that were delivered to it over 500.0ms ago. Wait queue length: 2. Wait queue head age: 6703.6ms.)

AIR_SDK 31.1.1.217

`"main" prio=5 tid=1 Native
| group="main" sCount=1 dsCount=0 flags=1 obj=0x750abae0 self=0x74b8414c00
| sysTid=10523 nice=-10 cgrp=default sched=0/0 handle=0x753f94f548
| state=R schedstat=( 50989523734 1330095751 13551 ) utm=4475 stm=623 core=0 HZ=100
| stack=0x7fd6e6a000-0x7fd6e6c000 stackSize=8MB
| held mutexes=

#00 pc 00000000008e1f70 /data/app/com..fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#1 pc 00000000008d2a84 /data/app/com.
.fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#2 pc 00000000008df150 /data/app/com..fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#3 pc 00000000008cf1bc /data/app/com.
.fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#4 pc 000000000026ffac /data/app/com..fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#5 pc 0000000000270c50 /data/app/com.
.fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#6 pc 0000000000408880 /data/app/com..fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#7 pc 0000000000407e70 /data/app/com.
.fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#8 pc 0000000000407d88 /data/app/com..fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#9 pc 0000000000409b70 /data/app/com.
.fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#10 pc 000000000040348c /data/app/com..fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#11 pc 0000000000404d30 /data/app/com.
.fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#12 pc 0000000000319468 /data/app/com..fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#13 pc 000000000042de00 /data/app/com.
.fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#14 pc 0000000000437d94 /data/app/com..fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#15 pc 00000000003c77d8 /data/app/com.
.fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#16 pc 00000000003c7de8 /data/app/com..fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#17 pc 00000000004361b0 /data/app/com.
.fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#18 pc 0000000000437b6c /data/app/com..fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#19 pc 00000000004363f0 /data/app/com.
.fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#20 pc 0000000000437b6c /data/app/com..fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#21 pc 00000000004363f0 /data/app/com.
.fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#22 pc 0000000000437b6c /data/app/com..fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#23 pc 00000000004363f0 /data/app/com.
.fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#24 pc 000000000040e208 /data/app/com..fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#25 pc 000000000040f8ac /data/app/com.
.fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#26 pc 00000000003607b4 /data/app/com..fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#27 pc 00000000003613b4 /data/app/com.
.fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#28 pc 00000000003612d0 /data/app/com..fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#29 pc 000000000035d554 /data/app/com.
.fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#30 pc 000000000048c430 /data/app/com..fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#31 pc 00000000004af33c /data/app/com.
.fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#32 pc 00000000004aff24 /data/app/com..fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#33 pc 000000000025efd8 /data/app/com.
.fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#34 pc 000000000026231c /data/app/com..fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
#35 pc 0000000000265c10 /data/app/com.
.fe-XMzuZTvxtLF4Mbe0CN2wyA==/lib/arm64/libCore.so (???)
at com.adobe.air.customHandler.callTimeoutFunction (Native method)
at com.adobe.air.customHandler.handleMessage (customHandler.java:22)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loop (Looper.java:224)
at android.app.ActivityThread.main (ActivityThread.java:7081)
at java.lang.reflect.Method.invoke (Native method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:536)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:928)`

image

@ghost ghost changed the title Input dispatching timed out Input dispatching timed out callTimeoutFunction Sep 7, 2020
@ajwfrost
Copy link
Collaborator

We'd just been looking at this and thinking it was a crash log .. the top of that call stack is when it's decompressing a JPEG image, and it does seem a little odd that we allocate a buffer using 'output_components' but within libjpeg it's using 'num_components'..

Anyway: if this is an ANR, then the activity going on here is the software rendering and decoding of JPEG images. Decoding can take a while perhaps especially if there are multiple large images that all need to be handled at once (i.e. rendered for the first time all together in one frame), and if memory management then kicks in with a 'sweep' phase it may push this operation out beyond 5s.

Asynchronous decoding of images would be nice to use but would break the paradigm a little in terms of what developers expect.. maybe we could have a new API for adding in images where decoding happens outside of the main thread and we dispatch events when they are ready? would be interested in your thoughts.

To try to migitate this, is it possible to add images onto the stage one frame at a time, or similar? i.e. frame 1 = add first image, frame 2 = add second image.. you can always keep things under a main sprite which is kept invisible until it's all ready to render..

thanks

@ghost
Copy link
Author

ghost commented Sep 16, 2020

Is it only for jpeg downloads? or png too? Embed png?

@Gokulv617
Copy link

We'd just been looking at this and thinking it was a crash log .. the top of that call stack is when it's decompressing a JPEG image, and it does seem a little odd that we allocate a buffer using 'output_components' but within libjpeg it's using 'num_components'..

Anyway: if this is an ANR, then the activity going on here is the software rendering and decoding of JPEG images. Decoding can take a while perhaps especially if there are multiple large images that all need to be handled at once (i.e. rendered for the first time all together in one frame), and if memory management then kicks in with a 'sweep' phase it may push this operation out beyond 5s.

Asynchronous decoding of images would be nice to use but would break the paradigm a little in terms of what developers expect.. maybe we could have a new API for adding in images where decoding happens outside of the main thread and we dispatch events when they are ready? would be interested in your thoughts.

To try to migitate this, is it possible to add images onto the stage one frame at a time, or similar? i.e. frame 1 = add first image, frame 2 = add second image.. you can always keep things under a main sprite which is kept invisible until it's all ready to render..

thanks

I tried this. but there is not much reduce in ANR's. It is increasing everyday. Do have any other solution ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants