ArrayIndexOutofBoundsException when using tint() or VLW fonts in 3.3.1 #5028

Closed
ewhynott opened this Issue Apr 25, 2017 · 11 comments

Comments

Projects
None yet
4 participants
@ewhynott

ewhynott commented Apr 25, 2017

I'm new to Processing, but I only started having issues when I downloaded the latest version. When I try to load any font, it only works with specific text within the text function. For instance, it might display "test" but "tent" will not work. I get an error message "Target VM failed to initialize" as well as " ArrayIndexOutofBoundsException18". When I run the sketch, it crashes and displays the message: "Java (TM) Platform SE binary is not Responding".
If it helps, I have Windows 10 and the latest version of Processing.
Thank you in advance, any help is appreciated!

//my code:
PFont myFont;

void setup(){
size(800,800);
 myFont = loadFont("LithosPro-Black-30.vlw");//the name is copied from sketch folder
}

void draw(){
  
  background(0);//keep in draw to make text move around without paint trail
 textFont(myFont); //set "family font" --this line--before changing scale
    fill(255,0,0);//color of text
  textSize(20);//mouseX makes it change scale
 
  text("poetry",400,400);//"text" is what is being written
 
}
@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Apr 25, 2017

Member

Is there a file named LithosPro-Black-30.vlw in the data folder of this sketch?

Member

benfry commented Apr 25, 2017

Is there a file named LithosPro-Black-30.vlw in the data folder of this sketch?

@ewhynott

This comment has been minimized.

Show comment
Hide comment
@ewhynott

ewhynott Apr 25, 2017

Thanks for the fast reply! There is. I have had the issue with multiple fonts, all in the sketch folder. My professor was unable to determine the cause of the issue, he said the code was sound but for some reason would not execute on my laptop. I'd be happy to send screen shots of the specific error messages if it would help?

Thanks for the fast reply! There is. I have had the issue with multiple fonts, all in the sketch folder. My professor was unable to determine the cause of the issue, he said the code was sound but for some reason would not execute on my laptop. I'd be happy to send screen shots of the specific error messages if it would help?

@waikman1

This comment has been minimized.

Show comment
Hide comment
@waikman1

waikman1 Apr 25, 2017

I've had a similar error this morning in 3.3.1 when resizing and tinting mulitple png's. The sketch was running perfectly in earlier processing versions. I've tested in processing 2.2.1 and its solved the problem.

I've had a similar error this morning in 3.3.1 when resizing and tinting mulitple png's. The sketch was running perfectly in earlier processing versions. I've tested in processing 2.2.1 and its solved the problem.

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Apr 25, 2017

Member

Yeah, I've just reproduced the problem. Sorry about that.

@JakubValtar tint() is broken for images (breaking VLW fonts as well)… suspect this is from the pixel changes in PGraphicsJava2D. Do you have a minute to take a look?

Member

benfry commented Apr 25, 2017

Yeah, I've just reproduced the problem. Sorry about that.

@JakubValtar tint() is broken for images (breaking VLW fonts as well)… suspect this is from the pixel changes in PGraphicsJava2D. Do you have a minute to take a look?

@JakubValtar

This comment has been minimized.

Show comment
Hide comment
@JakubValtar

JakubValtar Apr 25, 2017

Contributor

@benfry I will fix it today.

Contributor

JakubValtar commented Apr 25, 2017

@benfry I will fix it today.

@benfry benfry changed the title from Target VM failed to initialize and ArrayIndexOutofBoundsException18 with Load Text to ArrayIndexOutofBoundsException when using tint() or VLW fonts in 3.3.1 Apr 25, 2017

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Apr 25, 2017

Member

Great, thanks. I was able to reproduce with just the LoadDisplayImage example and adding a tint() line. (As well as using any loadFont() and trying to draw text.)

Member

benfry commented Apr 25, 2017

Great, thanks. I was able to reproduce with just the LoadDisplayImage example and adding a tint() line. (As well as using any loadFont() and trying to draw text.)

JakubValtar added a commit to JakubValtar/processing that referenced this issue Apr 25, 2017

@JakubValtar

This comment has been minimized.

Show comment
Hide comment
@JakubValtar

JakubValtar Apr 25, 2017

Contributor

@benfry Done. My bad. I went quickly through the whole diff and also fixed a similar typo in FX2D.

Contributor

JakubValtar commented Apr 25, 2017

@benfry Done. My bad. I went quickly through the whole diff and also fixed a similar typo in FX2D.

@ewhynott

This comment has been minimized.

Show comment
Hide comment
@ewhynott

ewhynott Apr 25, 2017

Thank you so much for your help! I am still having the ArrayIndexOutofBoundsException18 issue, is there a new version of Processing or something I should do to allow for the corrections made by @JakubValtar? Thank you for your patience, again I only just started learning the language!

Thank you so much for your help! I am still having the ArrayIndexOutofBoundsException18 issue, is there a new version of Processing or something I should do to allow for the corrections made by @JakubValtar? Thank you for your patience, again I only just started learning the language!

@JakubValtar

This comment has been minimized.

Show comment
Hide comment
@JakubValtar

JakubValtar Apr 25, 2017

Contributor

@ewhynott Please use 3.3 for now. We need to merge the fix and release a new version of Processing. You will be able to download the fixed version as soon as Processing 3.3.2 appears on the download page. https://processing.org/download/

Contributor

JakubValtar commented Apr 25, 2017

@ewhynott Please use 3.3 for now. We need to merge the fix and release a new version of Processing. You will be able to download the fixed version as soon as Processing 3.3.2 appears on the download page. https://processing.org/download/

@ewhynott

This comment has been minimized.

Show comment
Hide comment
@ewhynott

ewhynott Apr 25, 2017

Awesome, I can't thank you enough for your help! Thank you for being so available and patient! Fingers crossed this is the last time I have to reach out :)

Awesome, I can't thank you enough for your help! Thank you for being so available and patient! Fingers crossed this is the last time I have to reach out :)

@benfry benfry closed this in #5029 Apr 26, 2017

@benfry

This comment has been minimized.

Show comment
Hide comment
Member

benfry commented Apr 26, 2017

Thanks @JakubValtar!

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