Safe navigation stack map error

Today I went to change some code from a series of structKeyExists() calls to using safe navigation, for example:

structKeyExists( response, 'data' ) && structKeyExists( response.data 'status' ) && structKeyExists( response.data.status, 'code' )

to:

isNull( response?.data?.status?.code )

and I’m getting a low-level Java error:

Expecting a stackmap frame at branch target 453 Exception Details: Location: main1708622591328_de9f1d6a_f163_5ad0_44ab_1cd434812080_cfm7020$cf.call(Llucee/runtime/PageContext;)Ljava/lang/Object; @5: iconst_1 Reason: Expected stackmap frame at this location. Bytecode: 0x0000000: 2bb6 0031 4d04 9901 bc2b b600 352a b400 0x0000010: 3903 322b 04bd 003b 5903 2ab4 0039 0432 0x0000020: 2b04 bd00 3b59 032a b400 3905 3212 3db8 0x0000030: 0043 53b8 0048 b800 4353 b800 48b9 004e 0x0000040: 0300 572b b600 352a b400 3906 322b 04bd 0x0000050: 003b 5903 2ab4 0039 0432 2b03 bd00 3bb8 0x0000060: 0048 b800 4353 b800 48b9 004e 0300 572b 0x0000070: b600 352a b400 3907 322b 03bd 003b b800 0x0000080: 48b9 004e 0300 572b 08bd 003b 5903 b200 0x0000090: 5412 56b8 0043 5359 04b2 0059 125b b800 0x00000a0: 4353 5905 b200 5eb2 0064 b800 4353 5906 0x00000b0: b200 6712 69b8 0043 5359 072b 2b2b 2bb6 0x00000c0: 0035 06bd 006b 5903 2ab4 0039 0332 5359 0x00000d0: 042a b400 3904 3253 5905 2ab4 0039 0532 0x00000e0: 5301 b800 71b8 0076 b800 7c53 b800 8157 0x00000f0: 2b08 bd00 3b59 03b2 0054 1256 b800 4353 0x0000100: 5904 b200 5912 5bb8 0043 5359 05b2 005e 0x0000110: b200 64b8 0043 5359 06b2 0067 1269 b800 0x0000120: 4353 5907 2b2b 2b2b b600 3506 bd00 6b59 0x0000130: 032a b400 3906 3253 5904 2ab4 0039 0432 0x0000140: 5359 052a b400 3905 3253 01b8 0071 b800 0x0000150: 76b8 007c 53b8 0081 572b 08bd 003b 5903 0x0000160: b200 5412 56b8 0043 5359 04b2 0059 125b 0x0000170: b800 4353 5905 b200 5eb2 0064 b800 4353 0x0000180: 5906 b200 6712 69b8 0043 5359 072b 2b2b 0x0000190: 2bb6 0035 06bd 006b 5903 2ab4 0039 0732 0x00001a0: 5359 042a b400 3904 3253 5905 2ab4 0039 0x00001b0: 0532 5301 b800 71b8 0076 b800 7c53 b800 0x00001c0: 8157 a700 a14e 2db8 0087 9900 052d bf2d 0x00001d0: b800 8b3a 042b 1904 0404 b600 8f2b 1291 0x00001e0: b600 952b b600 352a b400 3908 322b 2bb6 0x00001f0: 0035 2ab4 0039 1006 3205 bd00 3b59 032b 0x0000200: b600 35b2 0098 b900 9b02 0053 5904 129d 0x0000210: 53b6 00a1 b900 4e03 0057 2b12 91b6 0095 0x0000220: 2bb6 00a4 2b2b 1400 a5b8 00ab b600 952b 0x0000230: 2b2b b600 352a b400 3908 32b9 009b 0200 0x0000240: b800 b0b6 0095 a700 0c3a 052b b600 b319 0x0000250: 05bf 2bb6 00b3 a700 0d3a 062b 2cb6 00b6 0x0000260: 1906 bf2b 2cb6 00b6 01b0 Exception Handler Table: bci [5, 450] => handler: 453 bci [548, 585] => handler: 585 bci [5, 598] => handler: 601

Verified this is an issue with Lucee 5 on trycf.com - this is not an issue in Lucee 6. Test code below:

<cfscript>

testa = {
    bob = {
        jane = "here"
    }
};

testb = {
    bob = {}
};

testc = {};

testanull = isNull( testa?.bob?.jane );

//writeDump( isNull( testa?.bob?.jane ) );

//writeDump( isNull( testb?.bob?.jane ) );

//writeDump( isNull( testc?.bob?.jane ) );

</cfscript>

At first I thought it was just the use of isNull(), but assignment of a variable throws the same general error. Comment out the testanull variable assignment and uncomment any isNull() to see the same error thrown when using isNull() with the safe navigation.

Can anybody else confirm, please?

Local env is:

Lucee 5.3.9.160
Java 1.8.0_362-362 (OpenLogic-OpenJDK) 64bit
OS Windows 11 64 bit

TryCF env is:

Lucee 5.4.4.38
Java 1.8.0_292
OS 6.2.9-x86_64-linode160

I get the same error on
Lucee 5.3.8.189
Java 11.0.4 (AdoptOpenJDK) 64bit
OS Windows Server 2016 Standard

1 Like

Pretty sure it’s [LDEV-3496] - Lucee

1 Like

This ticket [LDEV-3496] - Lucee was reopened

1 Like