termux / termux-app

Termux - a terminal emulator application for Android OS extendible by variety of packages.
https://f-droid.org/en/packages/com.termux
Other
34.85k stars 3.67k forks source link

record voice using pyaudio #1530

Open creboy opened 4 years ago

creboy commented 4 years ago

Problem description

when using pyaudio to record,app hangs forever.here is the log,how to solve it . [1] 28327 --------- beginning of crash 04-21 21:55:35.866 23009 23009 E AndroidRuntime: FATAL EXCEPTION: main 04-21 21:55:35.866 23009 23009 E AndroidRuntime: Process: com.termux, PID: 23009 04-21 21:55:35.866 23009 23009 E AndroidRuntime: java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first. 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.view.ViewGroup.addViewInner(ViewGroup.java:5038) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.view.ViewGroup.addView(ViewGroup.java:4869) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.view.ViewGroup.addView(ViewGroup.java:4826) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.widget.PopupWindow.createDecorView(PopupWindow.java:1409) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.widget.PopupWindow.preparePopup(PopupWindow.java:1356) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.widget.PopupWindow.showAtLocation(PopupWindow.java:1198) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.widget.PopupWindow.showAtLocation(PopupWindow.java:1170) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at com.termux.view.TerminalView$e.c(SourceFile:8) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at com.termux.view.TerminalView$e.b(SourceFile:30) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at com.termux.view.TerminalView$e.a(SourceFile:8) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at com.termux.view.TerminalView$f.e(SourceFile:2) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at com.termux.view.TerminalView.onDraw(SourceFile:6) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.view.View.draw(View.java:20234) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:19109) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4321) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4294) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:19069) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4321) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4294) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:19069) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4321) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4294) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:19069) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4321) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4294) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:19069) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4321) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4294) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:19069) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:695) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:701) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:810) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.view.ViewRootImpl.draw(ViewRootImpl.java:3403) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3187) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2556) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1527) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7410) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1044) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.view.Choreographer.doCallbacks(Choreographer.java:839) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.view.Choreographer.doFrame(Choreographer.java:774) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1030) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:873) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.os.Looper.loop(Looper.java:207) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6878) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547) 04-21 21:55:35.866 23009 23009 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:876) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: FATAL EXCEPTION: main 04-22 15:05:40.892 25039 25039 E AndroidRuntime: Process: com.termux, PID: 25039 04-22 15:05:40.892 25039 25039 E AndroidRuntime: java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first. 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.view.ViewGroup.addViewInner(ViewGroup.java:5038) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.view.ViewGroup.addView(ViewGroup.java:4869) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.view.ViewGroup.addView(ViewGroup.java:4826) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.widget.PopupWindow.createDecorView(PopupWindow.java:1409) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.widget.PopupWindow.preparePopup(PopupWindow.java:1356) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.widget.PopupWindow.showAtLocation(PopupWindow.java:1198) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.widget.PopupWindow.showAtLocation(PopupWindow.java:1170) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at com.termux.view.TerminalView$e.c(SourceFile:8) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at com.termux.view.TerminalView$e.b(SourceFile:30) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at com.termux.view.TerminalView$e.a(SourceFile:8) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at com.termux.view.TerminalView$f.e(SourceFile:2) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at com.termux.view.TerminalView.onDraw(SourceFile:6) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.view.View.draw(View.java:20234) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:19109) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4321) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4294) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:19069) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4321) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4294) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:19069) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4321) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4294) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:19069) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4321) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4294) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:19069) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4321) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4294) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:19069) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:695) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:701) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:810) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.view.ViewRootImpl.draw(ViewRootImpl.java:3403) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3187) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2556) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1527) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7410) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1044) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.view.Choreographer.doCallbacks(Choreographer.java:839) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.view.Choreographer.doFrame(Choreographer.java:774) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1030) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:873) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.os.Looper.loop(Looper.java:207) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6878) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547) 04-22 15:05:40.892 25039 25039 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:876) 04-24 15:32:55.839 12919 12919 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x14920 in tid 12919 (python2), pid 12919 (python2) 04-24 15:32:55.898 17281 17281 F DEBUG : 04-24 15:32:55.898 17281 17281 F DEBUG : Build fingerprint: 'Xiaomi/sagit/sagit:9/PKQ1.190118.001/V11.0.2.0.PCACNXM:user/release-keys' 04-24 15:32:55.898 17281 17281 F DEBUG : Revision: '0' 04-24 15:32:55.898 17281 17281 F DEBUG : ABI: 'arm64' 04-24 15:32:55.898 17281 17281 F DEBUG : pid: 12919, tid: 12919, name: python2 >>> python2 <<< 04-24 15:32:55.899 17281 17281 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x14920 04-24 15:32:55.899 17281 17281 F DEBUG : x0 0000007f3e42c000 x1 0000000000000000 x2 0000007fcf074d50 x3 0000000000000000 04-24 15:32:55.899 17281 17281 F DEBUG : x4 0000000000000001 x5 0000000000000000 x6 0000000000019000 x7 0000007f3e4287b0 04-24 15:32:55.899 17281 17281 F DEBUG : x8 0000000000014920 x9 81502a133591acb3 x10 00000000000001cd x11 0000000000000000 04-24 15:32:55.899 17281 17281 F DEBUG : x12 00000000001f2000 x13 00000000001f2000 x14 00000000000003de x15 0000007f3eb9e000 04-24 15:32:55.899 17281 17281 F DEBUG : x16 0000007f3eb921d0 x17 0000007f3eb14244 x18 0000000000000010 x19 0000007f3d40df00 04-24 15:32:55.899 17281 17281 F DEBUG : x20 0000000000000000 x21 0000000000000000 x22 0000007f3cfbd000 x23 0000007f3cfbd000 04-24 15:32:55.899 17281 17281 F DEBUG : x24 0000007f3cfbd000 x25 0000007f3cfbd000 x26 0000000000000000 x27 0000007f3d422820 04-24 15:32:55.899 17281 17281 F DEBUG : x28 0000000000000001 x29 0000007fcf075220 04-24 15:32:55.899 17281 17281 F DEBUG : sp 0000007fcf0751a0 lr 0000007f3cfa90ec pc 0000007f3cfa90f4 04-24 15:32:55.899 17281 17281 F DEBUG : 04-24 15:32:55.899 17281 17281 F DEBUG : backtrace: 04-24 15:32:55.899 17281 17281 F DEBUG : #00 pc 000000000000c0f4 /data/data/com.termux/files/usr/lib/libportaudio.so (PaPulseAudio_Initialize+872) --------- beginning of system 04-27 19:59:09.240 29232 29232 W Looper : Slow Looper: Activity com.termux/.app.TermuxActivity is 374ms late (wall=128ms running=0ms ClientTransaction{ callbacks=[android.app.servertransaction.LaunchActivityItem] lifecycleRequest=android.app.servertransaction.ResumeActivityItem }) because of 2 msg, msg 2 took 339ms (late=48ms h=android.app.ActivityThread$H w=110) 04-27 20:01:30.760 29232 29232 W InputEventReceiver: App Input: Dispatching InputEvent took 105ms in main thread! (KeyEvent: event_seq=207, seq=40856123, code=KEYCODE_BACK, action=ACTION_UP) 04-27 20:01:36.234 29712 29712 W Looper : Slow Looper: Activity com.termux/.app.TermuxActivity is 454ms late (wall=96ms running=0ms ClientTransaction{ callbacks=[android.app.servertransaction.LaunchActivityItem] lifecycleRequest=android.app.servertransaction.ResumeActivityItem }) because of 2 msg, msg 2 took 428ms (late=40ms h=android.app.ActivityThread$H w=110) 04-27 20:22:12.198 32317 32317 W Looper : Slow Looper: Activity com.termux/.app.TermuxActivity is 331ms late (wall=106ms running=0ms ClientTransaction{ callbacks=[android.app.servertransaction.LaunchActivityItem] lifecycleRequest=android.app.servertransaction.ResumeActivityItem }) because of 2 msg, msg 2 took 326ms (late=21ms h=android.app.ActivityThread$H w=110) 04-28 07:31:51.705 9191 9191 W Looper : Slow Looper: Activity com.termux/.app.TermuxActivity is 307ms late (wall=147ms running=0ms ClientTransaction{ callbacks=[android.app.servertransaction.LaunchActivityItem] lifecycleRequest=android.app.servertransaction.ResumeActivityItem }) because of 2 msg, msg 2 took 306ms (late=4ms h=android.app.ActivityThread$H w=110) 04-28 16:25:01.737 10374 10374 W Looper : Slow Looper: Activity com.termux/.app.TermuxActivity is 482ms late (wall=173ms running=0ms ClientTransaction{ callbacks=[android.app.servertransaction.LaunchActivityItem] lifecycleRequest=android.app.servertransaction.ResumeActivityItem }) because of 1 msg, msg 1 took 512ms (late=15ms h=android.app.ActivityThread$H w=110) 04-30 13:53:38.002 20950 20950 W Looper : Slow Looper: Activity com.termux/.app.TermuxActivity is 401ms late (wall=264ms running=0ms ClientTransaction{ callbacks=[android.app.servertransaction.LaunchActivityItem] lifecycleRequest=android.app.servertransaction.ResumeActivityItem }) because of 2 msg, msg 2 took 398ms (late=7ms h=android.app.ActivityThread$H w=110) 04-30 14:01:05.040 23106 23106 W Looper : Slow Looper: Activity com.termux/.app.TermuxActivity is 364ms late (wall=103ms running=0ms ClientTransaction{ callbacks=[android.app.servertransaction.LaunchActivityItem] lifecycleRequest=android.app.servertransaction.ResumeActivityItem }) because of 1 msg, msg 1 took 372ms (late=18ms h=android.app.ActivityThread$H w=110) 04-30 14:45:58.062 2891 2891 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x14920 in tid 2891 (python2), pid 2891 (python2) 04-30 14:45:58.130 2982 2982 F DEBUG : 04-30 14:45:58.131 2982 2982 F DEBUG : Build fingerprint: 'Xiaomi/sagit/sagit:9/PKQ1.190118.001/V11.0.2.0.PCACNXM:user/release-keys' 04-30 14:45:58.131 2982 2982 F DEBUG : Revision: '0' 04-30 14:45:58.131 2982 2982 F DEBUG : ABI: 'arm64' 04-30 14:45:58.131 2982 2982 F DEBUG : pid: 2891, tid: 2891, name: python2 >>> python2 <<< 04-30 14:45:58.131 2982 2982 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x14920 04-30 14:45:58.131 2982 2982 F DEBUG : x0 000000752d02c000 x1 0000000000000000 x2 0000007fd364a210 x3 0000000000000000 04-30 14:45:58.131 2982 2982 F DEBUG : x4 0000000000000001 x5 0000000000000000 x6 0000000000019000 x7 000000752d057140 04-30 14:45:58.131 2982 2982 F DEBUG : x8 0000000000014920 x9 fc40cff289c1dcab x10 0000000000000339 x11 0000000000000000 04-30 14:45:58.131 2982 2982 F DEBUG : x12 fffffffffffc0000 x13 00000000001d6000 x14 000000000000020f x15 000000752d6b9000 04-30 14:45:58.131 2982 2982 F DEBUG : x16 000000752d6ad1d0 x17 000000752d62f244 x18 0000000000000010 x19 000000752cc29840 04-30 14:45:58.131 2982 2982 F DEBUG : x20 0000000000000000 x21 0000000000000000 x22 000000752c7ff000 x23 000000752c7ff000 04-30 14:45:58.131 2982 2982 F DEBUG : x24 000000752c7ff000 x25 000000752c7ff000 x26 0000000000000000 x27 000000752cc3e160 04-30 14:45:58.131 2982 2982 F DEBUG : x28 0000000000000001 x29 0000007fd364a6e0 04-30 14:45:58.131 2982 2982 F DEBUG : sp 0000007fd364a660 lr 000000752c7eb0ec pc 000000752c7eb0f4 04-30 14:45:58.132 2982 2982 F DEBUG : 04-30 14:45:58.132 2982 2982 F DEBUG : backtrace: 04-30 14:45:58.132 2982 2982 F DEBUG : #00 pc 000000000000c0f4 /data/data/com.termux/files/usr/lib/libportaudio.so (PaPulseAudio_Initialize+872) --------- beginning of main 04-30 16:17:31.863 27568 27568 E com.termux: Not starting debugger since process cannot load the jdwp agent. 04-30 16:17:31.877 27568 27568 V Riru : hook removed 04-30 16:17:31.877 27568 27568 V Riru : edxp: forkAndSpecializePost 04-30 16:17:32.252 27568 27568 I Perf : Connecting to perf service. 04-30 16:17:32.331 27568 27592 W com.termux: miui_dex2oat: oat file of /system/framework/gson.jar is not exists 04-30 16:17:32.370 27568 27592 D ViewContentFactory: initViewContentFetcherClass 04-30 16:17:32.370 27568 27592 D ViewContentFactory: getInterceptorPackageInfo 04-30 16:17:32.371 27568 27592 D ViewContentFactory: getInitialApplication took 1ms 04-30 16:17:32.371 27568 27592 D ViewContentFactory: packageInfo.packageName: com.miui.catcherpatch 04-30 16:17:32.393 27568 27592 D ViewContentFactory: initViewContentFetcherClass took 23ms 04-30 16:17:32.394 27568 27592 I ContentCatcher: ViewContentFetcher : ViewContentFetcher 04-30 16:17:32.394 27568 27592 D ViewContentFactory: createInterceptor took 23ms 04-30 16:17:32.523 27568 27568 W Looper : Slow Looper: Activity com.termux/.app.TermuxActivity is 366ms late (wall=249ms running=0ms ClientTransaction{ callbacks=[android.app.servertransaction.LaunchActivityItem] lifecycleRequest=android.app.servertransaction.ResumeActivityItem }) because of 2 msg, msg 2 took 359ms (late=17ms h=android.app.ActivityThread$H w=110) 04-30 16:17:32.556 27568 27594 I OMXClient: IOmx service obtained 04-30 16:17:32.581 27568 27594 W ExtendedACodec: Failed to get extension for extradata parameter 04-30 16:17:32.606 27568 27593 I Adreno : QUALCOMM build : 2c6a1c7, I1490fecf6e 04-30 16:17:32.606 27568 27593 I Adreno : Build Date : 02/04/19 04-30 16:17:32.606 27568 27593 I Adreno : OpenGL ES Shader Compiler Version: EV031.25.03.02 04-30 16:17:32.606 27568 27593 I Adreno : Local Branch : 04-30 16:17:32.606 27568 27593 I Adreno : Remote Branch : 04-30 16:17:32.606 27568 27593 I Adreno : Remote Branch : 04-30 16:17:32.606 27568 27593 I Adreno : Reconstruct Branch : 04-30 16:17:32.606 27568 27593 I Adreno : Build Config : S L 6.0.7 AArch64 04-30 16:17:32.606 27568 27593 D vndksupport: Loading /vendor/lib64/hw/gralloc.msm8998.so from current namespace instead of sphal namespace. 04-30 16:17:32.618 27568 27593 I Adreno : PFP: 0x005ff112, ME: 0x005ff066 04-30 16:17:32.640 27568 27593 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0 04-30 16:17:32.640 27568 27593 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0 04-30 16:17:32.643 27568 27593 I OpenGLRenderer: Initialized EGL, version 1.4 04-30 16:17:32.643 27568 27593 D OpenGLRenderer: Swap behavior 2 04-30 16:17:32.669 27568 27593 D vndksupport: Loading /vendor/lib64/hw/android.hardware.graphics.mapper@2.0-impl.so from current namespace instead of sphal namespace. 04-30 16:17:32.671 27568 27593 D vndksupport: Loading /vendor/lib64/hw/gralloc.msm8998.so from current namespace instead of sphal namespace. 04-30 16:17:32.953 27568 27568 I Toast : Show toast from OpPackageName:com.termux, PackageName:com.termux 04-30 16:17:40.038 27568 27585 I com.termux: ProcessProfilingInfo new_methods=0 is saved saved_to_disk=0 resolve_classes_delay=8000 04-30 16:18:42.400 27568 27568 W IInputConnectionWrapper: getExtractedText on inactive InputConnection 04-30 16:18:42.401 27568 27568 I chatty : uid=10234(com.termux.api) com.tencent.mm:tools identical 1 line 04-30 16:18:42.402 27568 27568 W IInputConnectionWrapper: getExtractedText on inactive InputConnection 04-30 16:20:05.729 28217 28217 W pulseaudio: [pulseaudio] pid.c: Stale PID file, overwriting. 04-30 16:20:05.730 28217 28217 W pulseaudio: [pulseaudio] core.c: Failed to allocate shared posix-shm memory pool. Falling back to a normal memory pool. 04-30 16:20:12.343 27568 27568 E ViewDragHelper: Ignoring pointerId=0 because ACTION_DOWN was not received for this pointer before ACTION_MOVE. It likely happened because ViewDragHelper did not receive all the events in the event stream. 04-30 16:20:12.451 27568 27568 I chatty : uid=10234(com.termux.api) com.tencent.mm:tools identical 6 lines 04-30 16:20:12.451 27568 27568 E ViewDragHelper: Ignoring pointerId=0 because ACTION_DOWN was not received for this pointer before ACTION_MOVE. It likely happened because ViewDragHelper did not receive all the events in the event stream. 04-30 16:20:37.506 28254 28254 E com.termux: Not starting debugger since process cannot load the jdwp agent. 04-30 16:20:37.518 28254 28254 V Riru : hook removed 04-30 16:20:37.518 28254 28254 V Riru : edxp: forkAndSpecializePost 04-30 16:20:37.629 28254 28254 I com.termux: Waiting for a blocking GC AddRemoveAppImageSpace 04-30 16:20:37.814 28254 28254 I Perf : Connecting to perf service. 04-30 16:20:37.847 28254 28275 W com.termux: miui_dex2oat: oat file of /system/framework/gson.jar is not exists 04-30 16:20:37.859 28254 28275 D ViewContentFactory: initViewContentFetcherClass 04-30 16:20:37.859 28254 28275 D ViewContentFactory: getInterceptorPackageInfo 04-30 16:20:37.860 28254 28275 D ViewContentFactory: getInitialApplication took 1ms 04-30 16:20:37.860 28254 28275 D ViewContentFactory: packageInfo.packageName: com.miui.catcherpatch 04-30 16:20:37.885 28254 28275 D ViewContentFactory: initViewContentFetcherClass took 25ms 04-30 16:20:37.885 28254 28275 I ContentCatcher: ViewContentFetcher : ViewContentFetcher 04-30 16:20:37.885 28254 28275 D ViewContentFactory: createInterceptor took 27ms 04-30 16:20:37.904 28254 28278 I OMXClient: IOmx service obtained 04-30 16:20:37.910 28254 28278 W ExtendedACodec: Failed to get extension for extradata parameter 04-30 16:20:37.933 28254 28277 I Adreno : QUALCOMM build : 2c6a1c7, I1490fecf6e 04-30 16:20:37.933 28254 28277 I Adreno : Build Date : 02/04/19 04-30 16:20:37.933 28254 28277 I Adreno : OpenGL ES Shader Compiler Version: EV031.25.03.02 04-30 16:20:37.933 28254 28277 I Adreno : Local Branch : 04-30 16:20:37.933 28254 28277 I Adreno : Remote Branch : 04-30 16:20:37.933 28254 28277 I Adreno : Remote Branch : 04-30 16:20:37.933 28254 28277 I Adreno : Reconstruct Branch : 04-30 16:20:37.933 28254 28277 I Adreno : Build Config : S L 6.0.7 AArch64 04-30 16:20:37.934 28254 28277 D vndksupport: Loading /vendor/lib64/hw/gralloc.msm8998.so from current namespace instead of sphal namespace. 04-30 16:20:37.945 28254 28277 I Adreno : PFP: 0x005ff112, ME: 0x005ff066 04-30 16:20:37.949 28254 28277 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0 04-30 16:20:37.950 28254 28277 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0 04-30 16:20:37.950 28254 28277 I OpenGLRenderer: Initialized EGL, version 1.4 04-30 16:20:37.951 28254 28277 D OpenGLRenderer: Swap behavior 2 04-30 16:20:37.969 28254 28277 D vndksupport: Loading /vendor/lib64/hw/android.hardware.graphics.mapper@2.0-impl.so from current namespace instead of sphal namespace. 04-30 16:20:37.970 28254 28277 D vndksupport: Loading /vendor/lib64/hw/gralloc.msm8998.so from current namespace instead of sphal namespace. 04-30 16:20:38.114 28254 28254 I Toast : Show toast from OpPackageName:com.termux, PackageName:com.termux 04-30 16:20:45.659 28254 28268 I com.termux: ProcessProfilingInfo new_methods=0 is saved saved_to_disk=0 resolve_classes_delay=8000 04-30 16:21:14.797 28334 28334 W pulseaudio: [pulseaudio] pid.c: Stale PID file, overwriting. 04-30 16:21:14.797 28334 28334 W pulseaudio: [pulseaudio] core.c: Failed to allocate shared posix-shm memory pool. Falling back to a normal memory pool. 04-30 16:21:15.314 28334 28334 D : PlayerBase::PlayerBase() 04-30 16:21:15.317 28334 28334 D : TrackPlayerBase::TrackPlayerBase() 04-30 16:21:15.317 28334 28334 I libOpenSLES: Emulating old channel mask behavior (ignoring positional mask 0x3, using default mask 0x3 based on channel count of 2) 04-30 16:21:15.317 28334 28334 D AudioTrack: set(sessionID=1503153) 04-30 16:21:15.317 28334 28334 D AudioTrack: set(): streamType 3, sampleRate 44100, format 0x1, channelMask 0x3, frameCount 0, flags #104, notificationFrames -8, sessionId 1503153, transferType 0, uid -1, pid -1 04-30 16:21:15.328 28334 28334 W AudioTrack: AUDIO_OUTPUT_FLAG_FAST denied by server; frameCount 0 -> 1772 04-30 16:21:15.361 28334 28338 D : PlayerBase::stop() from IPlayer 04-30 16:21:15.362 28334 28338 D AudioTrack: stop(sessionID=1503153) 04-30 16:21:15.362 28334 28338 D AudioTrack: stop() called with 0 frames delivered 04-30 16:21:31.257 28254 28254 E ViewDragHelper: Ignoring pointerId=0 because ACTION_DOWN was not received for this pointer before ACTION_MOVE. It likely happened because ViewDragHelper did not receive all the events in the event stream. 04-30 16:21:31.305 28254 28254 I chatty : uid=10234(com.termux.api) com.termux identical 10 lines 04-30 16:21:31.305 28254 28254 E ViewDragHelper: Ignoring pointerId=0 because ACTION_DOWN was not received for this pointer before ACTION_MOVE. It likely happened because ViewDragHelper did not receive all the events in the event stream.

creboy commented 4 years ago

can't access to microphone?

tathastu871 commented 4 years ago

I used following script

import pyaudio import wave

FORMAT = pyaudio.paInt16 CHANNELS = 2 RATE = 44100 CHUNK = 1024 RECORD_SECONDS = 5 WAVE_OUTPUT_FILENAME = "file.wav"

audio = pyaudio.PyAudio()

start Recording

stream = audio.open(format=FORMAT, channels=CHANNELS, rate=RATE, input=True, frames_per_buffer=CHUNK) print ("recording...")

frames = []

for i in range(0, int(RATE / CHUNK * RECORD_SECONDS)): data = stream.read(CHUNK) frames.append(data) print ("finished recording")

stop Recording

stream.stop_stream() stream.close() audio.terminate()

waveFile = wave.open(WAVE_OUTPUT_FILENAME, 'wb') waveFile.setnchannels(CHANNELS) waveFile.setsampwidth(audio.get_sample_size(FORMAT)) waveFile.setframerate(RATE) waveFile.writeframes(b''.join(frames)) waveFile.close()

It seems that script starts and might be recording but it does not stop recording after time in seconds specified and so recording is not written to output file and hence no recording.

To provide micriphone access i used termux-microphone-record

Please any help from termux maintainers is needed

tathastu871 commented 4 years ago

can't access to microphone?

use termux-microphone-record

and it will ask for microphone access allow it