-
Notifications
You must be signed in to change notification settings - Fork 848
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
ArrayIndexOutOfBoundsException - EmbeddedSlotMap? #390
Comments
Can you share the stack trace? I hope we didn't miss an edge case --
certainly across lots of product usage and tests I haven't -- but anything
is possible and a stack trace would help a lot!
…On Wed, Feb 14, 2018 at 9:05 AM, tmallery ***@***.***> wrote:
I'm seeing an ArrayIndexOutOfBoundsException in ScriptableObject.getIds(boolean,
boolean) because the EmbeddedSlotMap iterator is returning one more result
than its count, "map.size()", is returning.
Has anyone else seen this? I haven't found the cause yet so I can't make a
test case, I only see the error after a lot of processing has happened so I
don't yet know the sequence of events that cause this problem. However I
tried removing EmbeddedSlotMap by having SlopMapContainer just make
HashSlotMap and that "fixed" this issue.
This also might be caused by a fix I'm currently doing to allow Object.getOwnPropertyDescriptor("z",
0) and "z".propertyIsEnumerable(0) to work. I'll provide more information
as I find it.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#390>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAf0a5ukFV7kIqxqncXObCo3oay6DBunks5tUxJzgaJpZM4SFp73>
.
|
ArrayIndexOutOfBoundsException: 231 (evaluateExpression_39102403#1) |
I haven't created a test case yet, but I believe I found the issue. EmbeddedSlotMap.createSlot when there is an existing slot. The code adds the new slot to the linked list as if it were a brand new slot, but its not really, it's replacing the existing slot. The code does not remove the existing node from the linked list before adding the new one. I did a quick and dirty test and it works. // add new slot to linked list |
I'll throw this into a test case, but here's the JS to reproduce the ArrayIndexoutofBoundsException |
You are exactly right -- Thanks! That is a nasty error in a complicated bit of code. I just submitted a PR -- can you take a look? |
Fixed in #391. |
Aw man. This ".0" behaviour has been bothering us forever. We have workaround-code at our end to find the integer from the floting point number again. I handle way more integers than floating point numbers in my programs... |
So are you suggesting that the fix for the ".0" Integer translation is
something we should enable by default? I cautiously asked for the opposite
but we can always change it later, or for language level. We broke backward
compatibility in the recent string of releases (with a "strict mode"
feature that we since put under a language version check) and I am
sensitive to doing it again.
…On Thu, Mar 15, 2018 at 12:21 AM, raimi ***@***.***> wrote:
Aw man. This ".0" behaviour has been bothering us forever. We have
workaround-code at our end to find the integer from the floting point
number again.
I'm also a little worried about the performance impact of that extra
conversion-check - but the overall behaviour becomes better and less
surprising.
I handle way more integers than floating point numbers in my programs...
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#390 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAf0a159uuFB1GOZu16ti6VHwSdvR_OEks5tehZlgaJpZM4SFp73>
.
|
No no no, do not enable it by default (yet). I also think it may break things for too many people. |
the best |
I'm seeing an ArrayIndexOutOfBoundsException in ScriptableObject.getIds(boolean, boolean) because the EmbeddedSlotMap iterator is returning one more result than its count, "map.size()", is returning.
Has anyone else seen this? I haven't found the cause yet so I can't make a test case, I only see the error after a lot of processing has happened so I don't yet know the sequence of events that causes this problem. However I tried removing EmbeddedSlotMap by having SlopMapContainer just make HashSlotMap and that "fixed" this issue.
This also might be caused by a fix I'm currently doing to allow Object.getOwnPropertyDescriptor("z", 0) and "z".propertyIsEnumerable(0) to work. I'll provide more information as I find it.
The text was updated successfully, but these errors were encountered: