Skip to content

Loading SVG file gives Illegal base64 character 20 encoding error (worked in v3.5.4) #592

Closed
@processing-bot

Description

Created by: villares

Description

SVG files that could previously be loaded and displayed in Processin 3.5.4 no longer work.

Expected Behavior

image

Current Behavior

Sketch is interrupted with Illegal base64 character 20 error.

Steps to Reproduce

  1. Copy this SVG file to a data folder inside a new sketch:
    https://github.com/villares/desenho-sem-argumentos/blob/2022/1_outubro_2022/gerador_completo/base_frente.svg
  2. Paste in and run this code:
void setup(){
    size(562, 920);
    PShape frente = loadShape("base_frente.svg");
    shape(frente, 0, 0, 562, 920);  // optional, will not be reached
}

Your Environment

  • Processing version: Processing 4.0.1
  • Operating System and OS version: Manjaro 21.3 Kernel 5.15

More information

Accessing Processing 4 core from py5 I got this:

Filters are not supported.
Ignoring <clipPath> tag.
py5 encountered an error in your code:File "PSurfaceNone.java", line 356, in processing.core.PSurfaceNone$AnimationThread.run

File "PSurfaceAWT.java", line 1386, in processing.awt.PSurfaceAWT$9.callDraw

File "PApplet.java", line 2088, in processing.core.PApplet.handleDraw

File "Sketch.java", line 196, in py5.core.Sketch.setup

File "jdk.proxy2.$Proxy7.java", line -1, in jdk.proxy2.$Proxy7.run_method

File "org.jpype.proxy.JPypeProxy.java", line -1, in org.jpype.proxy.JPypeProxy.invoke

File "org.jpype.proxy.JPypeProxy.java", line -2, in org.jpype.proxy.JPypeProxy.hostInvoke

File "PApplet.java", line 12377, in processing.core.PApplet.shape

File "PGraphics.java", line 4220, in processing.core.PGraphics.shape

File "PShape.java", line 1654, in processing.core.PShape.draw

File "PShape.java", line 1665, in processing.core.PShape.drawImpl

File "PShape.java", line 1680, in processing.core.PShape.drawGroup

File "PShape.java", line 1654, in processing.core.PShape.draw

File "PShape.java", line 1665, in processing.core.PShape.drawImpl

File "PShape.java", line 1680, in processing.core.PShape.drawGroup

File "PShape.java", line 1654, in processing.core.PShape.draw

File "PShape.java", line 1667, in processing.core.PShape.drawImpl

File "PShape.java", line 1712, in processing.core.PShape.drawPrimitive

File "PShape.java", line 1951, in processing.core.PShape.loadImage

File "PShape.java", line 1971, in processing.core.PShape.loadBase64Image

File "PShape.java", line 1988, in processing.core.PShape.parseBase64Image

File "Base64.java", line 589, in java.util.Base64$Decoder.decode

File "Base64.java", line 566, in java.util.Base64$Decoder.decode

File "Base64.java", line 847, in java.util.Base64$Decoder.decode0

Exception: Java Exception

The above exception was the direct cause of the following exception:

File "/home/villares/GitHub/desenho-sem-argumentos/1_outubro_2022/gerador_completo/gerador_completo_wip.py", line 10, in _py5_faux_setup
    6    def setup():
    7        size(562, 943)
    8        
    9        frente = load_shape('data/base_frente.svg')
--> 10       shape(frente, 0, 0, 562, 943)
    ..................................................
     frente = <py5.shape.Py5Shape object at 0x7fadf5a4fc40>
    ..................................................

java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Illegal base64 character 20

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    has attachmentAttachment was not transfered from GitLabhelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions