Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Zero length string passed to TextLayout constructor #3487
This row called in draw():
Fail with the error "Zero length string passed to TextLayout constructor" but "testo" isn't empty, it's equal to "Assprz from G5 67509: 5 min ".
With the previous release the execution is without errors.
I have a very complex sketch that I cannot post here because it's not public.
The setup() method opens many JDBC connections then, in the end, start a thread that execute many query over the connections.
The draw() method create this string:
The two methods normalizzaTipoJob and getTempo returns a string.
In the end of draw() there is the line that cause the error:
The previous line:
I try to semplify the code in a example sketch for you, but I can't reproduce the same error in a more simple sketch.
added a commit
Aug 13, 2015
I don't know if it's a bug or not, but a variation of this problem still exits in the newest beta. It occurs anytime the first character of a string, or the first character after a line break is blank. So:
" the first space is blank"
using trim when passing String variables works in the case of the former, but not the later.