'Processing can't access PShape array

I'm afraid I have a problem with a "NullPointerException".

I'm writing a Processing (v4) Sketch, which should load multiple svg files from a folder, into a PShape Array. Initializing the array works fine, giving it a length works fine but somehow when I want to overwrite a value, I get a NullPointerException.

int imageCount = 1;
PShape[] images;


void setup() {
  images = new PShape[imageCount];

  for (int i = 0; i<images.length; i++) {
    println(images.length); //prints the expected result 1
    images[i] = loadShape("platzhalter/Platzhalter_2_"+str(i)+".svg"); 
    // throws NullPointerException
  }
}

I hope someone here can help me, thx!



Solution 1:[1]

Okay so I solved it in the meantime. Turns out that processing has some kind of limitations in terms of interpreting svg files. I had to transform text to outlines in the adobe illustrator export settings to make it work. Hope this helps anyone with the same issue.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 dorndalf