mlopatkin / andlogview

Tool for viewing application logs from Android devices.
https://andlogview.mlopatkin.name/
Apache License 2.0
43 stars 6 forks source link

WindowsPathParser cannot handle quotes in the PATH variables #306

Closed 627514 closed 1 year ago

627514 commented 1 year ago
2023-07-31 17:12:22,823 [main] INFO  andlogview.Main - AndLogView 0.22-SNAPSHOT (rev e777b80e571c1ecdd1acfee030bc33ab720a2a19)
2023-07-31 17:12:22,824 [main] INFO  andlogview.Main - Revision e777b80e571c1ecdd1acfee030bc33ab720a2a19
2023-07-31 17:12:23,350 [AWT-EventQueue-0] ERROR andlogview.Main - Uncaught exception in AWT-EventQueue-0
java.nio.file.InvalidPathException: Illegal char <"> at index 0: "C:\Program Files\Java\jdk-1.8\bin
    at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
    at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
    at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
    at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
    at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
    at java.nio.file.Paths.get(Paths.java:84)
    at name.mlopatkin.andlogview.utils.SystemPathResolver$WindowsPathResolver.lambda$new$0(SystemPathResolver.java:124)
    at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
    at java.util.Iterator.forEachRemaining(Iterator.java:116)
    at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
    at java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:312)
    at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:743)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
    at name.mlopatkin.andlogview.utils.SystemPathResolver$WindowsPathResolver.<init>(SystemPathResolver.java:125)
    at name.mlopatkin.andlogview.utils.SystemPathResolver$WindowsPathResolver.<init>(SystemPathResolver.java:132)
    at name.mlopatkin.andlogview.utils.SystemPathResolver.getPathResolver(SystemPathResolver.java:59)
    at name.mlopatkin.andlogview.GlobalsModule.getSystemPathResolver(GlobalsModule.java:57)
    at name.mlopatkin.andlogview.GlobalsModule_GetSystemPathResolverFactory.getSystemPathResolver(GlobalsModule_GetSystemPathResolverFactory.java:35)
    at name.mlopatkin.andlogview.GlobalsModule_GetSystemPathResolverFactory.get(GlobalsModule_GetSystemPathResolverFactory.java:27)
    at name.mlopatkin.andlogview.GlobalsModule_GetSystemPathResolverFactory.get(GlobalsModule_GetSystemPathResolverFactory.java:9)
    at name.mlopatkin.andlogview.preferences.AdbConfigurationPref_Factory.get(AdbConfigurationPref_Factory.java:32)
    at name.mlopatkin.andlogview.preferences.AdbConfigurationPref_Factory.get(AdbConfigurationPref_Factory.java:10)
    at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
    at name.mlopatkin.andlogview.DaggerAppGlobals.getAdbConfiguration(DaggerAppGlobals.java:136)
    at name.mlopatkin.andlogview.ui.mainframe.DaggerMainFrameDependencies.injectMainFrame2(DaggerMainFrameDependencies.java:349)
    at name.mlopatkin.andlogview.ui.mainframe.DaggerMainFrameDependencies.injectMainFrame(DaggerMainFrameDependencies.java:333)
    at name.mlopatkin.andlogview.MainFrame.<init>(MainFrame.java:221)
    at name.mlopatkin.andlogview.MainFrame.<init>(MainFrame.java:99)
    at name.mlopatkin.andlogview.MainFrame$Factory.get(MainFrame.java:569)
    at name.mlopatkin.andlogview.MainFrame$Factory.get(MainFrame.java:557)
    at name.mlopatkin.andlogview.Main.createAndShowWindow(Main.java:113)
    at name.mlopatkin.andlogview.Main.start(Main.java:120)
    at name.mlopatkin.andlogview.Main.lambda$main$1(Main.java:76)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
mlopatkin commented 1 year ago

Thanks you for the report! It looks like your PATH environment variable has quotes inside, which trips down the parser. I'll fix that.

627514 commented 1 year ago

多谢🙈🙈🙈发自我的 iPhone在 2023年8月9日,18:34,Mikhail Lopatkin @.***> 写道: Thanks you for the report! It looks like your PATH environment variable has quotes inside, which trips down the parser. I'll fix that.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>