Skip to content

Table's insertRow doesn't work #120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
b2renger opened this issue Jul 1, 2015 · 1 comment
Closed

Table's insertRow doesn't work #120

b2renger opened this issue Jul 1, 2015 · 1 comment

Comments

@b2renger
Copy link
Member

b2renger commented Jul 1, 2015

This is an issue specific to the android mode in 2.2.1

It's related to this issue, that is resolved in java mode since 2.1
processing/processing#2137

running the example code given crashes the app launching. Running it from eclipse the app doesn't crash and I get this as an error (not exactly the same sample code as in the one below the array is much bigger)

"Caused by: java.lang.ArrayIndexOutOfBoundsException: src.length=311 srcPos=13 dst.length=312 dstPos=14 length=299"

but still an ArrayIndexOutOfBoundsException as stated in the former desktop issue

@b2renger
Copy link
Member Author

b2renger commented Jul 1, 2015

Looking at the source code from the processing-android repo, the fix is not present :

https://github.com/processing/processing-android/blob/master/core/src/processing/data/Table.java#L1858

should be

System.arraycopy(columns[col], insert, stringTemp, insert+1, rowCount - insert);

b2renger added a commit to b2renger/processing-android that referenced this issue Jul 1, 2015
@b2renger b2renger closed this as completed Jul 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant