Invalid Bytecode: Expecting a stackmap frame at branch target

Description

The following code:

var x = 0; if (false) x \= 1;

Produces this odd low-level error:

Expecting a stackmap frame at branch target 41 Exception Details: Location: main1598477771611_6a694247_bb6d_7254_7b48_66b511133cd6_cfm7020$cf.call(Llucee/runtime/PageContext;)Ljava/lang/Object; @5: iconst_1 Reason: Expected stackmap frame at this location. Bytecode: 0x0000000: 2bb6 0031 4d04 9900 202b b600 35b2 003b 0x0000010: b200 41b9 0047 0300 5703 9900 0c2b b200 0x0000020: 3b0f 58a7 0003 a700 a04e 2db8 004d 9900 0x0000030: 052d bf2d b800 533a 042b 1904 0404 b600 0x0000040: 572b 1259 b600 5d2b b600 612a b400 6503 0x0000050: 322b 2bb6 0061 2ab4 0065 0432 05bd 0067 0x0000060: 5903 2bb6 0061 b200 6ab9 0070 0200 5359 0x0000070: 0412 7253 b600 76b9 0077 0300 572b 1259 0x0000080: b600 5d2b b600 7a2b 2b14 007b b800 81b6 0x0000090: 005d 2b2b 2bb6 0061 2ab4 0065 0332 b900 0x00000a0: 7002 00b8 0086 b600 5da7 000c 3a05 2bb6 0x00000b0: 0089 1905 bf2b b600 89a7 000d 3a06 2b2c 0x00000c0: b600 8c19 06bf 2b2c b600 8c01 b0 Exception Handler Table: bci [5, 38] => handler: 41 bci [135, 172] => handler: 172 bci [5, 185] => handler: 188

TryCF example:
https://trycf.com/gist/fdc4d6735b3a5ecd1de209e04cc629a1/lucee5?theme=monokai

I also saw this error the other day while running some code that had the safe navigation operator.

Environment

None

Attachments

1
  • 09 Mar 2021, 03:31 pm

Activity

Show:

David Rogers 11 June 2024 at 18:29

Here’s one that affects 5.4.6.9, though it seems fine on 6
<cfscript>
// writedump(server.lucee) // 5.4.6.9 at this time
x = {}
writedump(isNull(x?.v)) // isNull(x.v) is fine though
</cfscript>

Zac Spitzer 18 July 2023 at 13:52

please keep in mind that

  • 5.3 is EOL,

  • 5.4 is in maintenance mode (mostly regressions and security fixes)

  • 6.0 is in active development

dan.switzer@givainc.com 18 July 2023 at 13:21
Edited

Here’s another example I ran into today:

https://trycf.com/gist/43a6d74a23278433cb9487495f7449de/lucee5?theme=monokai

This works on the Lucee 6 beta on TryCF, but fails on Lucee 5.3.10.97 (our version) and 5.3.10.120 (TryCF’s current version).

function test(item){ writedump(isNull(arguments.item?.response?.choices)); } test();

Adam Cameron 27 July 2022 at 12:41

Had another instance of something along these lines today (on Lucee 5.3.9.133).

Inside a test callback I had this:

expect(local.result?.amount).toBe(100)

And this gave one of these errors. However this does not:

expect(result?.amount).toBe(100)

:-|

We’re approaching the second anniversary of this issue, btw, and close to 1.5yrs since anyone from Lucee had anything to say about it.

Brad Wood 20 May 2022 at 17:11

I just hit this again today-- nearly impossible to track down without just commenting out line by line until the error went away. Turns out this 6 year old but was the cause this time.

https://luceeserver.atlassian.net/browse/LDEV-756

Details

Assignee

Reporter

Priority

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Created 26 August 2020 at 21:39
Updated 11 June 2024 at 18:29

Flag notifications