I believe I have identified the issue and why it was not detected earlier. In Java, standard values like integers utilize 32 bits (4 bytes), and their associated bytecode instructions (e.g. ILOAD, ISTORE) need only a single stack slot for handling int values. On the other hand, long types demand a maximum stack of 3 due to the following factors: Long values in Java consume 64 bits (8 bytes), and their corresponding bytecode instructions (e.g. LLOAD, LSTORE) necessitate two stack slots for managing long values. As a result, both the second and third slots (1 and 2) are employed for storing the long value. The attempt to set a long value fails because it mandates an operand stack size of 3. |