You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// This works perfectlyvoidsetup() {
Table t = loadTable("data/table.csv", "csv");
println(t.getString(2, 0));
}
Then, edit the first column type:
// This raises a StackOverflowErrorvoidsetup() {
Table t = loadTable("data/table.csv", "csv");
t.setColumnType(0, Table.DOUBLE);
println(t.getString(2, 0)); // right there
}
Run the sketch.
Your Environment
Processing version: Processing 4.1.3-1, x86_64
Operating System and OS version: Arch Linux, Garuda Cinnamon 5.6.7, Kernel version: 6.1.12-zen1-1-zen
Other information:
Possible Causes / Solutions
After further investigation, it seems that the bug originated from the following statement, when a float is passed to the function call Double.isNan() and no else statement is defined:
Thanks for the report and for looking into it. The problem is was that if (Double.isNaN(getFloat(row, column))) { was calling getFloat() instead of getDouble(). With that fixed, no crash. There's no else statement because it falls through to the end of the function, which uses String.valueOf() to return the value.
Created by: Juicy8013
Description
The method Table::getString raises a stackOverflowError when it encounters a double value.
Expected Behavior
I was expecting to get a double value from the getString method.
Current Behavior
The getString method fails on returning a double value with a StackOverflowError.
Steps to Reproduce
Your Environment
Possible Causes / Solutions
After further investigation, it seems that the bug originated from the following statement, when a float is passed to the function call
Double.isNan()
and no else statement is defined:I fixed the bug by overriding the method as follow:
The text was updated successfully, but these errors were encountered: