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

A bug for termux-terminal #1501

Closed
htname opened this issue Mar 30, 2020 · 4 comments
Closed

A bug for termux-terminal #1501

htname opened this issue Mar 30, 2020 · 4 comments

Comments

@htname
Copy link

htname commented Mar 30, 2020

When I use two fingers while holding down the up and down (or right and left ) extrakeys for a few seconds.
Then my mobile phone continues to make a vibration. These two keys are constantly simulated.
Then I have a long press (including paste copy)
Termux suddenly exited.

My device is Android 8.1
module is Vivo x20

This is adb info, Maybe you need.
`2020-03-30 23:06:21.826 1041-1151/? E/ThermalEngine: vivo_thermal_parameter_config :VivoThermal:read type:0 buf:

2020-03-30 23:06:21.836 2037-2037/? D/AndroidRuntime: Shutting down VM
2020-03-30 23:06:21.837 2037-2037/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.termux, PID: 2037
java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
at android.view.ViewGroup.addViewInner(ViewGroup.java:5102)
at android.view.ViewGroup.addView(ViewGroup.java:4933)
at android.view.ViewGroup.addView(ViewGroup.java:4890)
at android.widget.PopupWindow.createDecorView(PopupWindow.java:1408)
at android.widget.PopupWindow.preparePopup(PopupWindow.java:1356)
at android.widget.PopupWindow.showAtLocation(PopupWindow.java:1198)
at android.widget.PopupWindow.showAtLocation(PopupWindow.java:1170)
at com.termux.view.TerminalView$e.c(SourceFile:8)
at com.termux.view.TerminalView$e.b(SourceFile:30)
at com.termux.view.TerminalView$e.a(SourceFile:8)
at com.termux.view.TerminalView$f.e(SourceFile:3)
at com.termux.view.TerminalView.onDraw(SourceFile:6)
at android.view.View.draw(View.java:19328)
at android.view.View.updateDisplayListIfDirty(View.java:18257)
at android.view.View.draw(View.java:19045)
at android.view.ViewGroup.drawChild(ViewGroup.java:4401)
at androidx.drawerlayout.widget.DrawerLayout.drawChild(SourceFile:14)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4180)
at android.view.View.updateDisplayListIfDirty(View.java:18243)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4380)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4360)
at android.view.View.updateDisplayListIfDirty(View.java:18211)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4380)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4360)
at android.view.View.updateDisplayListIfDirty(View.java:18211)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4380)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4360)
at android.view.View.updateDisplayListIfDirty(View.java:18211)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4380)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4360)
at android.view.View.updateDisplayListIfDirty(View.java:18211)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:676)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:682)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:790)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:3101)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2894)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2447)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1456)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6964)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:932)
at android.view.Choreographer.doCallbacks(Choreographer.java:744)
at android.view.Choreographer.doFrame(Choreographer.java:676)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:918)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:192)
at android.app.ActivityThread.main(ActivityThread.java:6738)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:550)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:825)
2020-03-30 23:06:21.837 22699-24171/? I/GoLog: udp:127.0.0.1:40475 accepted udp:1.1.1.1:53 [proxy]
2020-03-30 23:06:21.844 22699-22734/? I/GoLog: udp:127.0.0.1:42009 accepted udp:1.1.1.1:53 [proxy]
2020-03-30 23:06:21.847 2506-2823/? D/SLService: ppCra : com.termux pid : 2037
2020-03-30 23:06:21.856 1711-2531/? W/ActivityManager: Force finishing activity com.termux/.app.TermuxActivity
2020-03-30 23:06:21.858 1711-2531/? I/ActivityManager: vivoAdjustFocusedActivityStackLocked step1 r = ActivityRecord{b9ce010 u0 com.termux/.app.TermuxActivity t220 f}, reason = finishActivity, mResumedActivity = ActivityRecord{b9ce010 u0 com.termux/.app.TermuxActivity t220 f}
2020-03-30 23:06:21.859 1711-2531/? D/ActivityTrigger: ActivityTrigger activityPauseTrigger
2020-03-30 23:06:21.902 1711-2531/? D/DisplayPowerController: mSettingBrightness = -1 as request 55
2020-03-30 23:06:21.909 1711-1847/? W/ActivityManager: App has crashed more than 1 times.Skipping crash dialog of ProcessRecord{2ee9f35 2037:com.termux/u0a898}
2020-03-30 23:06:21.923 2037-2037/? I/Process: Sending signal. PID: 2037 SIG: 9
2020-03-30 23:06:21.942 22699-24185/? I/GoLog: Using Prepared: 104.31.72.127
2020-03-30 23:06:21.928 2087-2087/? W/bash: type=1400 audit(0.0:21472): avc: denied { ioctl } for path=2F6465762F7074732F31202864656C6574656429 dev="devpts" ino=4 ioctlcmd=540a scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:untrusted_app_devpts:s0:c512,c768 tclass=chr_file permissive=0
2020-03-30 23:06:21.943 1711-2112/? W/InputDispatcher: channel '8c422c4 PopupWindow:c2124f1 (server)' ~ Consumer closed input channel or an error occurred. events=0x9
2020-03-30 23:06:21.943 1711-2112/? E/InputDispatcher: channel '8c422c4 PopupWindow:c2124f1 (server)' ~ Channel is unrecoverably broken and will be disposed!
2020-03-30 23:06:21.943 1711-2112/? W/InputDispatcher: channel 'd5f2556 PopupWindow:b414244 (server)' ~ Consumer closed input channel or an error occurred. events=0x9
2020-03-30 23:06:21.943 1711-2112/? E/InputDispatcher: channel 'd5f2556 PopupWindow:b414244 (server)' ~ Channel is unrecoverably broken and will be disposed!
2020-03-30 23:06:21.943 1711-2112/? W/InputDispatcher: channel 'adb4d18 PopupWindow:c2124f1 (server)' ~ Consumer closed input channel or an error occurred. events=0x9
2020-03-30 23:06:21.943 1711-2112/? E/InputDispatcher: channel 'adb4d18 PopupWindow:c2124f1 (server)' ~ Channel is unrecoverably broken and will be disposed!
2020-03-30 23:06:21.947 22699-22891/? I/GoLog: Using Prepared: 104.31.72.127
2020-03-30 23:06:21.950 1711-2112/? W/InputDispatcher: channel '58ede22 com.termux/com.termux.app.TermuxActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9
2020-03-30 23:06:21.950 1711-2112/? E/InputDispatcher: channel '58ede22 com.termux/com.termux.app.TermuxActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
2020-03-30 23:06:21.951 1711-15318/? I/WindowManager: WIN DEATH: Window{adb4d18 u0 PopupWindow:c2124f1}
2020-03-30 23:06:21.951 1711-15318/? W/InputDispatcher: Attempted to unregister already unregistered input channel 'adb4d18 PopupWindow:c2124f1 (server)'
2020-03-30 23:06:21.952 1711-2563/? I/ActivityManager: Process com.termux (pid 2037) has died: fore TOP
2020-03-30 23:06:21.953 1711-2563/? W/ActivityManager: Scheduling restart of crashed service com.termux/.app.TermuxService in 1000ms
2020-03-30 23:06:21.954 1711-2211/? D/ScreenBrightnessModeRestore: pakage name is com.termux:10898with :10898
2020-03-30 23:06:21.955 1711-2211/? D/ScreenBrightnessModeRestore: onProcessDiedInner, pid = 2037 , mCurrentForceGroundPid = 4083 mAppName: com.termux:10898 mWaitToRestore=false
2020-03-30 23:06:21.955 2484-9140/? D/_V_AIE-UsageDetailAppCollector: onProcessDied_PID = 2037 ,uid = 10898
2020-03-30 23:06:21.955 2506-3724/? D/GameModeManager: isGameWatchAPP packageName:com.termux
2020-03-30 23:06:21.955 2452-32088/? V/PRA: removePolicy com.termux
2020-03-30 23:06:21.955 2506-8297/? W/MotorModeDaemonService: process died pid : 2037 mMotorModePid: -1
2020-03-30 23:06:21.956 1711-22539/? W/ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:970 com.vivo.services.rms.ProcErrors$MyHandler.broadcast:99 com.vivo.services.rms.ProcErrors$MyHandler.handleMessage:88 android.os.Handler.dispatchMessage:106 android.os.Looper.loop:192
2020-03-30 23:06:21.956 2484-3772/? D/_V_AIE-UsageDetailAppCollector: deleteDiedAppList_getUid()=10898
2020-03-30 23:06:21.956 2484-3772/? D/_V_AIE-UsageDetailAppCollector: deleteDiedAppList_getPid()=2037
2020-03-30 23:06:21.956 2484-3772/? D/_V_AIE-UsageDetailAppCollector: deleteDiedAppList_mForgroundInfo_pid=2037,mForgroundInfo_pkgName=com.termux,mForgroundInfo_uid=10898,mBackgroundInfo_pid=4083,mBackgroundInfo_pkgName=com.bbk.launcher2,mBackgroundInfo_uid=10033
2020-03-30 23:06:21.957 1711-1849/? W/zygote64: kill(-2037, 9) failed: No such process
2020-03-30 23:06:21.957 7398-7661/? I/_V_UsageAppManager: deleteDiedAppList_getUid()=10898
2020-03-30 23:06:21.957 7398-7661/? I/_V_UsageAppManager: deleteDiedAppList_getPid()=2037
2020-03-30 23:06:21.957 7398-7661/? I/_V_UsageAppManager: deleteDiedAppList_mForgroundInfo_pid=2037,mForgroundInfo_pkgName=com.termux,mForgroundInfo_uid=10898,mBackgroundInfo_pid=4083,mBackgroundInfo_pkgName=com.bbk.launcher2,mBackgroundInfo_uid=10033
2020-03-30 23:06:21.957 1711-2211/? D/ScreenBrightnessModeRestore: mRunnable try to restore, mLastScreenBrightness: 55 mWaitToRestoreBrightness: false mWaitToRestoreMode: false mLastScreenMode: 0
2020-03-30 23:06:21.964 1711-1849/? W/zygote64: kill(-2037, 9) failed: No such process
2020-03-30 23:06:21.966 1711-10295/? I/WindowManager: WIN DEATH: Window{d5f2556 u0 PopupWindow:b414244}
2020-03-30 23:06:21.966 1711-10295/? W/InputDispatcher: Attempted to unregister already unregistered input channel 'd5f2556 PopupWindow:b414244 (server)'
`

@htname
Copy link
Author

htname commented Mar 30, 2020

I found issue #1420 had the same problem as me

@ghost ghost added the bug report label Apr 1, 2020
@ghost
Copy link

ghost commented Apr 1, 2020

Confirmed + log from debug build (app class & method names aren't obfuscated):

04-01 21:57:04.737 16432 16432 E AndroidRuntime: java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
04-01 21:57:04.737 16432 16432 E AndroidRuntime: 	at android.view.ViewGroup.addViewInner(ViewGroup.java:5122)
04-01 21:57:04.737 16432 16432 E AndroidRuntime: 	at android.view.ViewGroup.addView(ViewGroup.java:4953)
04-01 21:57:04.737 16432 16432 E AndroidRuntime: 	at android.view.ViewGroup.addView(ViewGroup.java:4910)
04-01 21:57:04.737 16432 16432 E AndroidRuntime: 	at android.widget.PopupWindow.createDecorView(PopupWindow.java:1442)
04-01 21:57:04.737 16432 16432 E AndroidRuntime: 	at android.widget.PopupWindow.preparePopup(PopupWindow.java:1390)
04-01 21:57:04.737 16432 16432 E AndroidRuntime: 	at android.widget.PopupWindow.showAtLocation(PopupWindow.java:1230)
04-01 21:57:04.737 16432 16432 E AndroidRuntime: 	at android.widget.PopupWindow.showAtLocation(PopupWindow.java:1202)
04-01 21:57:04.737 16432 16432 E AndroidRuntime: 	at com.termux.view.TerminalView$HandleView.show(TerminalView.java:964)
04-01 21:57:04.737 16432 16432 E AndroidRuntime: 	at com.termux.view.TerminalView$HandleView.moveTo(TerminalView.java:1067)
04-01 21:57:04.737 16432 16432 E AndroidRuntime: 	at com.termux.view.TerminalView$HandleView.positionAtCursor(TerminalView.java:1144)
04-01 21:57:04.737 16432 16432 E AndroidRuntime: 	at com.termux.view.TerminalView$SelectionModifierCursorController.updatePosition(TerminalView.java:1398)
04-01 21:57:04.737 16432 16432 E AndroidRuntime: 	at com.termux.view.TerminalView.onDraw(TerminalView.java:741)

@ghost ghost locked and limited conversation to collaborators Oct 17, 2021
AdamMickiewich pushed a commit to VolyaTeam/dzida-app that referenced this issue Aug 8, 2022
- Decouple the `CursorController`, `TextSelectionCursorController`(previously `SelectionModifierCursorController`) and `TextSelectionHandleView` (previously `HandleView`) from `TerminalView` by moving them to their own class files.
- Fixes termux#1501 which caused the `java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.` exception to be thrown when long pressing the down key while simultaneously long pressing the terminal view for text selection.
shrihankp pushed a commit to reisxd/termux-app that referenced this issue Oct 20, 2022
- Decouple the `CursorController`, `TextSelectionCursorController`(previously `SelectionModifierCursorController`) and `TextSelectionHandleView` (previously `HandleView`) from `TerminalView` by moving them to their own class files.
- Fixes termux#1501 which caused the `java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.` exception to be thrown when long pressing the down key while simultaneously long pressing the terminal view for text selection.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants
@htname and others