lz233 / Tarnhelm

The magic to clean sharing links up.
https://tarnhelm.project.ac.cn
GNU General Public License v3.0
422 stars 17 forks source link

Crash when Regex with wrong Syntax #36

Closed CyanChanges closed 1 year ago

CyanChanges commented 1 year ago

I don't want to switch my IME, so I wrote things in English.

Some Information

cheetah 
Android 14 Beta 5 (Upside Down Cake, API Level 34)

LSPosed Provided Information:

API 版本
100

Xposed API 调用保护
已启用

Dex 优化器包装
支持

框架版本
1.9.1 (6990)

管理器包名
com.android.shell

系统版本
14 (API 34)

设备
Google Google Pixel 7 Pro 

系统架构
arm64-v8a

Rule used

eyJhIjoiR29vZ2xlIFJlbW92ZSBMYW5nIiwiYiI6WyIoaHR0cHxodHRwcyk6XFxcL1xcXC8oKFxcdypcXC4pP2dvb2dsZVxcLmNvbShcXC5oa3xcXC5qcCk%2FKSIsIihcXD8paGw9W1xcdy1dezAtOH0iXSwiYyI6WyJodHRwczpcL1wvJDNnb29nbGUuY29tIiwiJDEiXSwiZCI6IkN5YW5DaGFuZ2VzIn0%3D

Some log in logcat

09-15 19:07:52.312  9207  9207 I LSPosed-Bridge: Crash unexpectedly: java.lang.RuntimeException: Unable to start activity ComponentInfo{cn.ac.lz233.tarnhelm/cn.ac.lz233.tarnhelm.ui.process.ProcessCopyActivity}: java.util.regex.PatternSyntaxException: Error in {min,max} interval near index 15   
09-15 19:07:52.312  9207  9207 I LSPosed-Bridge:        at cn.ac.lz233.tarnhelm.ui.process.ProcessCopyActivity.onCreate(Unknown Source:25)                                       09-15 19:07:52.312  9207  9207 E AndroidRuntime: Process: cn.ac.lz233.tarnhelm, PID: 9207                             
09-15 19:07:52.312  9207  9207 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{cn.ac.lz233.tarnhelm/cn.ac.lz233.tarnhelm.ui.process.ProcessCopyActivity}: java.util.regex.PatternSyntaxException: Error in {min,max} interval near index 15                       
09-15 19:07:52.312  9207  9207 E AndroidRuntime:        at cn.ac.lz233.tarnhelm.ui.process.ProcessCopyActivity.onCreate(Unknown Source:25)                                       09-15 19:07:52.320  1638  3479 W ActivityTaskManager:   Force finishing activity cn.ac.lz233.tarnhelm/.ui.process.ProcessCopyActivity                                            
09-15 19:07:52.323  1638  3479 W ActivityTaskManager:   Force finishing activity cn.ac.lz233.tarnhelm/.ui.main.MainActivity                                                      09-15 19:07:52.372  1638  7008 I WindowManager: WIN DEATH: Window{28c38ea u0 cn.ac.lz233.tarnhelm/cn.ac.lz233.tarnhelm.ui.main.MainActivity}                                     
09-15 19:07:52.373  1638  7008 W InputManager-JNI: Input channel object '28c38ea cn.ac.lz233.tarnhelm/cn.ac.lz233.tarnhelm.ui.main.MainActivity (client)' was disposed without first being removed with the input manager!                  09-15 19:07:52.374  1638  2409 I ActivityManager: Process cn.ac.lz233.tarnhelm (pid 9207) has died: fg  TOP           
09-15 19:07:52.377  1638  2409 W ActivityManager: Scheduling restart of crashed service cn.ac.lz233.tarnhelm/.service.ModuleDataBridgeService in 1000ms for start-requested
lz233 commented 1 year ago

Crash with wrong regex is an intended behavior now. When 'Process Result' notification channel gets ready, it will be replaced by notification.

CyanChanges commented 1 year ago

Crash with wrong regex is an intended behavior now. When 'Process Result' notification channel gets ready, it will be replaced by notification.

I even don't know which Rule is wrong, is there any resolution for now?

lz233 commented 1 year ago

Crash with wrong regex is an intended behavior now. When 'Process Result' notification channel gets ready, it will be replaced by notification.

I even don't know which Rule is wrong, is there any resolution for now?

May be (\?)hl=[\w-]{0,8} for your last regex.

java.util.regex.PatternSyntaxException: Error in {min,max} interval near index 15
(\?)hl=[\w-]{0-8}                                                                                                                  
               ^