Closed GoogleCodeExporter closed 9 years ago
Possibly fixed in the refactoring from revision f664b6e775b6, included in
1.28rc22. Though I'm not entirely sure what was going on here, the original
code seemed wasteful by recreating lots of views on the fly.
Original comment by Klaus.We...@gmail.com
on 10 Jan 2012 at 5:15
Sadly, it still crashes. New stack trace:
I/LatinKeyboardBaseView(14330): Creating new LatinKeyboardBaseView
org.pocketworkstation.pckeyboard.LatinKeyboardBaseView@40c9a9f8
I/LatinKeyboardBaseView(14330): new mPreviewPopup
android.widget.PopupWindow@40d71278 from
org.pocketworkstation.pckeyboard.LatinKeyboardBaseView@40c9a9f8
I/LatinKeyboardBaseView(14330): new mMiniKeyboardPopup
android.widget.PopupWindow@40748f58 from
org.pocketworkstation.pckeyboard.LatinKeyboardBaseView@40c9a9f8
I/LatinKeyboardBaseView(14330): Creating new LatinKeyboardBaseView
org.pocketworkstation.pckeyboard.LatinKeyboardBaseView@40d166b8
I/LatinKeyboardBaseView(14330): new mPreviewPopup
android.widget.PopupWindow@40d6a250 from
org.pocketworkstation.pckeyboard.LatinKeyboardBaseView@40d166b8
I/LatinKeyboardBaseView(14330): new mMiniKeyboardPopup
android.widget.PopupWindow@40d61bf8 from
org.pocketworkstation.pckeyboard.LatinKeyboardBaseView@40d166b8
W/WindowManager( 143): Attempted to add window with token that is a
sub-window: android.os.BinderProxy@4134ce18. Aborting.
D/AndroidRuntime(14330): Shutting down VM
W/dalvikvm(14330): threadid=1: thread exiting with uncaught exception
(group=0x400bc760)
E/AndroidRuntime(14330): FATAL EXCEPTION: main
E/AndroidRuntime(14330): android.view.WindowManager$BadTokenException: Unable
to add window -- token android.view.ViewRoot$W@40d51830 is not valid; is your
activity running?
E/AndroidRuntime(14330): at android.view.ViewRoot.setView(ViewRoot.java:447)
E/AndroidRuntime(14330): at
android.view.WindowManagerImpl.addView(WindowManagerImpl.java:283)
E/AndroidRuntime(14330): at
android.view.WindowManagerImpl.addView(WindowManagerImpl.java:193)
E/AndroidRuntime(14330): at
android.view.WindowManagerImpl$CompatModeWrapper.addView(WindowManagerImpl.java:
118)
E/AndroidRuntime(14330): at
android.widget.PopupWindow.invokePopup(PopupWindow.java:943)
E/AndroidRuntime(14330): at
android.widget.PopupWindow.showAtLocation(PopupWindow.java:803)
E/AndroidRuntime(14330): at
org.pocketworkstation.pckeyboard.LatinKeyboardBaseView.onLongPress(LatinKeyboard
BaseView.java:1483)
E/AndroidRuntime(14330): at
org.pocketworkstation.pckeyboard.LatinKeyboardBaseView.openPopupIfRequired(Latin
KeyboardBaseView.java:1314)
E/AndroidRuntime(14330): at
org.pocketworkstation.pckeyboard.LatinKeyboardBaseView.access$300(LatinKeyboardB
aseView.java:80)
E/AndroidRuntime(14330): at
org.pocketworkstation.pckeyboard.LatinKeyboardBaseView$UIHandler.handleMessage(L
atinKeyboardBaseView.java:306)
E/AndroidRuntime(14330): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(14330): at android.os.Looper.loop(Looper.java:132)
E/AndroidRuntime(14330): at
android.app.ActivityThread.main(ActivityThread.java:4123)
E/AndroidRuntime(14330): at java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime(14330): at java.lang.reflect.Method.invoke(Method.java:491)
E/AndroidRuntime(14330): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
E/AndroidRuntime(14330): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
E/AndroidRuntime(14330): at dalvik.system.NativeStart.main(Native Method)
I/InputDispatcher( 143): Application is not responding: Window{40b189b0
InputMethod paused=false}. 5017.9ms since event, 5005.2ms since wait started
Original comment by catel...@gmail.com
on 10 Jan 2012 at 7:15
Can you try the following version? It's the same code, but has more debugging
info added. Don't use it for online banking.
http://code.google.com/p/hackerskeyboard/downloads/detail?name=hackerskeyboard-v
1028rc22-test1.apk
It would be ideal if you could attach the full debug output for a session
starting from the "onCreate" message, to help keep track of which views it's
creating and using.
Also, can you let me know your settings for the following, and maybe try
changing them to see if that makes a difference?
- Drawing mode (direct draw / default / hw accelerated)?
- key feedback popups?
Original comment by Klaus.We...@gmail.com
on 11 Jan 2012 at 12:03
I've attached a log with everything from installation, over a switch to G+,
longpressing an initial a that didn't have a sticky shift and then the sticky
shift that crashes.
Drawing mode: was hw acc, changing to sw still crashes and so does Direct Draw
Key feedback popup on keypress was off, turning it on also crashes (with sw
drawing).
Hope this helps!
Original comment by catel...@gmail.com
on 11 Jan 2012 at 6:31
Attachments:
Yes, this helps a lot. It is getting confused about the views and apparently
trying to open a popup from within a popup.
I think I found the problem, looks like you're using the "Stone" theme and that
has a slightly defective theme definition, it's supposed to disable popups for
popup keyboards but doesn't. I still can't reproduce it on my phone, but a
theme-specific bug would explain why it's been a bit elusive.
First, can you try with your current -test1 version if the problem goes away if
you switch to a different theme?
Then, can you try the following build which has a corrected "Stone" theme
definition:
http://hackerskeyboard.googlecode.com/files/hackerskeyboard-v1028rc22-test2.apk
. If that still crashes with the "Stone" theme active, can you please add a
fresh log from that build?
Original comment by Klaus.We...@gmail.com
on 11 Jan 2012 at 8:29
You are right: the ICS theme on test1 works fine as far as I can tell!
test2 still crashes using Stone. New log attached.
Original comment by jo...@petersson.se
on 11 Jan 2012 at 8:45
Attachments:
Grumble. The original code is really confusing with its distinction between
LatinKeyboardBaseView and the derived LatinKeyboardView - the former class is
used for popups, the latter for the regular keyboard view. Neither should be
confused with the Keyboard/LatinKeyboard classes which represent abstract key
grids for use by the keyboard views, and the LatinIME and KeyboardSwitcher
classes which tie them together.
Inexplicably, the code for adding long-press popups is in LatinKeyboardBaseView
even though only the regular keyboard should be doing this. Android doesn't
permit popup windows to be opened from popup windows, and due to unexpected
default values apparently the base class decides to do so anyway.
Anyway, here's a new test version - I've started moving some of the code which
should never be run for popup keyboards to LatinKeyboardView, though this is
messy to untangle. Thanks for your patience!
http://hackerskeyboard.googlecode.com/files/hackerskeyboard-v1028rc22-test3.apk
Original comment by Klaus.We...@gmail.com
on 11 Jan 2012 at 11:34
FYI, the recent workarounds are now included in the new prerelease 1.28rc23,
and I've disabled the extra debugging in that one. Let me know if it's still
crashing for you, and please use the -test3 version for logs if it does.
Original comment by Klaus.We...@gmail.com
on 13 Jan 2012 at 1:15
Sorry for my slow response, but for some obscure reason I had 3 download
failures on rc24 so I had to give up and was pretty busy during the weekend
(relatives visiting). Still, I just successfully downloaded rc24 to my Xoom and
none of the tricks that have triggered the crash in the past can now repeat the
trick. It also seems to work fine on my Galaxy Nexus after the 4.0.2 upgrade
that was pushed out in the mean time (though, I've seen two random reboots
already), so I think we have a winner.
I've had to be picky, I'd say the § key in Swedish mode where two fractions
are displayed behind the primary characters are somewhat hard to read, but I
can hardly complain since I've configured it for maximum display.
It seems that I can't close this issue myself, but from my perspective: feel
free!
Thanks!
Original comment by catel...@gmail.com
on 15 Jan 2012 at 10:30
Glad to hear it. Thanks for confirming, and especially for patiently testing
the prereleases with detailed bug reports.
Original comment by Klaus.We...@gmail.com
on 17 Jan 2012 at 6:09
Bulk update - changing "Fixed" to "Verified" for old bugs.
(Background: I'm changing the "Fixed" status to be considered open, the next
steps in the lifecycle will be the closed states "FixInTest" and "Verified".
This lets me mark issues as "Fixed" in commit messages without hiding them from
the issue tracker.)
Original comment by Klaus.We...@gmail.com
on 22 Jan 2013 at 7:33
Bulk update - changing "Fixed" to "Verified" for old bugs.
Original comment by Klaus.We...@gmail.com
on 22 Jan 2013 at 7:34
Original issue reported on code.google.com by
Klaus.We...@gmail.com
on 9 Jan 2012 at 5:44