jzbrooks / vgo

vector graphic optimization
MIT License
43 stars 2 forks source link

Crash on conversion of svg to vector drawable #102

Closed jzbrooks closed 1 month ago

jzbrooks commented 1 month ago

Describe the bug I suspect r8 might be removing a class that should be kept since EnumMap depends on reflection.

vgo version 2.4.0

To Reproduce

% vgo --indent 2 --format vd ~/Downloads/Art.svg -o ~/Downloads/Arg.xml
Exception in thread "main" java.lang.NullPointerException: Cannot read the array length because "this.keyUniverse" is null
    at java.base/java.util.EnumMap.<init>(EnumMap.java:139)
    at com.android.ide.common.vectordrawable.SvgClipPathNode.writeXml(SourceFile)
    at com.android.ide.common.vectordrawable.SvgGroupNode.writeXml(SourceFile)
    at com.android.ide.common.vectordrawable.SvgTree.writeXml(SourceFile:0)
    at com.android.ide.common.vectordrawable.Svg2Vector.parseSvgToXml(SourceFile:0)
    at com.jzbrooks.vgo.Application.handleFile(SourceFile)
    at com.jzbrooks.vgo.Application.handleFiles(SourceFile:0)