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
When attempting to retrieve the value of a script variable using Java classes, the process attempts to fetch the value from EmbeddedSlotMap using the query method, but the thread becomes stuck in this operation, leading to the necessity of restarting the application.
I'm seeking assistance for a potential solution or any feasible resolution within the existing code. I suspect that the issue may be related to cyclic linked list values in the SlotMap, causing the thread to become stuck. Any insights or suggestions on how to address this concern would be greatly appreciated.
/** Locate the slot with the given name or index. */
@Override
public Slot query(Object key, int index) {
if (slots == null) {
return null;
}
int indexOrHash = (key != null ? key.hashCode() : index);
int slotIndex = getSlotIndex(slots.length, indexOrHash);
for (Slot slot = slots[slotIndex]; slot != null; slot = slot.next) {
if (indexOrHash == slot.indexOrHash && Objects.equals(slot.name, key)) {
return slot;
}
}
return null;
}
The text was updated successfully, but these errors were encountered:
is this reproduceable in your environment? Could it be a concurrent issue? (multiple threads, that access the map?)
I'm seeking assistance for a potential solution or any feasible resolution within the existing code
Can you build a custom version? Maybe you can add some asserts or a counter that will exit the loop and dump the valve, when a cycle was detected.
(I saw an interesting video on YT about efficient cycle detection https://youtu.be/d_hVz6SaF3w - maybe others can check, if it is worth to implement here and throw a code bug exception - AFAIK this method is very hot code)
When attempting to retrieve the value of a script variable using Java classes, the process attempts to fetch the value from EmbeddedSlotMap using the query method, but the thread becomes stuck in this operation, leading to the necessity of restarting the application.
I'm seeking assistance for a potential solution or any feasible resolution within the existing code. I suspect that the issue may be related to cyclic linked list values in the SlotMap, causing the thread to become stuck. Any insights or suggestions on how to address this concern would be greatly appreciated.
The text was updated successfully, but these errors were encountered: