Closed pexcn closed 6 years ago
另外,点击从剪贴板导入这个菜单项,有时候剪贴板内容过多,程序看起来会卡住,这时候 show 一个 loading dialog 会比较合适。
I cannot reproduce your issue with your rules.
抓到了 Log:
08-20 18:17:46.866 5539 5539 D AndroidRuntime: Shutting down VM
08-20 18:17:46.870 5539 5539 E AndroidRuntime: FATAL EXCEPTION: main
08-20 18:17:46.870 5539 5539 E AndroidRuntime: Process: com.github.shadowsocks, PID: 5539
08-20 18:17:46.870 5539 5539 E AndroidRuntime: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
08-20 18:17:46.870 5539 5539 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
08-20 18:17:46.870 5539 5539 E AndroidRuntime: Caused by: java.lang.reflect.InvocationTargetException
08-20 18:17:46.870 5539 5539 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
08-20 18:17:46.870 5539 5539 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
08-20 18:17:46.870 5539 5539 E AndroidRuntime: ... 1 more
08-20 18:17:46.870 5539 5539 E AndroidRuntime: Caused by: java.io.FileNotFoundException: /data/user/0/com.github.shadowsocks/files/custom-rules.acl (Permission denied)
08-20 18:17:46.870 5539 5539 E AndroidRuntime: at java.io.FileOutputStream.open(Native Method)
08-20 18:17:46.870 5539 5539 E AndroidRuntime: at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
08-20 18:17:46.870 5539 5539 E AndroidRuntime: at java.io.FileOutputStream.<init>(FileOutputStream.java:169)
08-20 18:17:46.870 5539 5539 E AndroidRuntime: at java.io.FileWriter.<init>(FileWriter.java:90)
08-20 18:17:46.870 5539 5539 E AndroidRuntime: at com.github.shadowsocks.utils.IOUtils$$anonfun$writeString$1.apply(IOUtils.scala:41)
08-20 18:17:46.870 5539 5539 E AndroidRuntime: at com.github.shadowsocks.utils.IOUtils$$anonfun$writeString$1.apply(IOUtils.scala:41)
08-20 18:17:46.870 5539 5539 E AndroidRuntime: at com.github.shadowsocks.utils.CloseUtils$.autoClose(CloseUtils.scala:34)
08-20 18:17:46.870 5539 5539 E AndroidRuntime: at com.github.shadowsocks.utils.IOUtils$.writeString(IOUtils.scala:41)
08-20 18:17:46.870 5539 5539 E AndroidRuntime: at com.github.shadowsocks.acl.Acl$.save(Acl.scala:163)
08-20 18:17:46.870 5539 5539 E AndroidRuntime: at com.github.shadowsocks.acl.CustomRulesFragment$AclRulesAdapter.com$github$shadowsocks$acl$CustomRulesFragment$AclRulesAdapter$$run$body$2(CustomRulesFragment.scala:123)
08-20 18:17:46.870 5539 5539 E AndroidRuntime: at com.github.shadowsocks.acl.CustomRulesFragment$AclRulesAdapter$$anonfun$4.run(CustomRulesFragment.scala:122)
08-20 18:17:46.870 5539 5539 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:751)
08-20 18:17:46.870 5539 5539 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95)
08-20 18:17:46.870 5539 5539 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154)
08-20 18:17:46.870 5539 5539 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6186)
08-20 18:17:46.870 5539 5539 E AndroidRuntime: ... 3 more
08-20 18:17:46.875 770 2757 W ActivityManager: Force finishing activity com.github.shadowsocks/.MainActivity
08-20 18:17:46.926 770 14161 I OpenGLRenderer: Initialized EGL, version 1.4
08-20 18:17:46.926 770 14161 D OpenGLRenderer: Swap behavior 1
08-20 18:17:47.380 770 784 W ActivityManager: Activity pause timeout for ActivityRecord{9efbd24 u0 com.github.shadowsocks/.MainActivity t2275 f}
08-20 18:17:47.568 770 780 I art : Background partial concurrent mark sweep GC freed 31990(1662KB) AllocSpace objects, 4(80KB) LOS objects, 33% free, 15MB/23MB, paused 1.397ms total 157.657ms
08-20 18:17:48.088 1579 1703 W OpenGLRenderer: Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...
08-20 18:17:48.088 1579 1703 W OpenGLRenderer: Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...
似乎是没有权限
08-20 18:17:46.870 5539 5539 E AndroidRuntime: Caused by: java.io.FileNotFoundException: /data/user/0/com.github.shadowsocks/files/custom-rules.acl (Permission denied)
08-20 18:17:46.870 5539 5539 E AndroidRuntime: at java.io.FileOutputStream.open(Native Method)
This can be only caused by inappropriate user manual interaction with the file. Please remove the file.
自定义规则里,从剪贴板导入不正确的内容会导致程序崩溃。
剪贴板内容为: