URLConnection.ResponseHeaders crash on Linux?

I’m trying with both Ubuntu 24.04 ARM64 and whatever my Steam Deck is running, both exhibit this same behavior of faulting shorting after launch. The Steam Deck is x86_64, so I know this isn’t ARM-specific. Running in the remote debugger and launched with gdb, I see the following:

[New Thread 0xffff87a0ee20 (LWP 43063)]
[New Thread 0xffff85c0ee20 (LWP 43064)]
GET https://local-api.usebeacon.app/v4/user?deviceId=dfefe421-3128-59c5-9191-31d715096fa2: 200

Thread 16 "DebugBeacon" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xffff95ef6e20 (LWP 43032)]
Downloading source file /usr/src/libsoup2.4-2.74.3-6ubuntu1/obj-aarch64-linux-gnu/../libsoup/soup-message-headers.c
0x0000ffff95484fdc in soup_message_headers_iter_next (iter=0xffff95ef4770,      
    name=0xffff95ef4758, value=0xffff95ef4750)
    at ../libsoup/soup-message-headers.c:543
warning: 543	../libsoup/soup-message-headers.c: No such file or directory

Getting a trace with bt:

(gdb) bt
#0  0x0000ffff95484fdc in soup_message_headers_iter_next
    (iter=0xffff95ef4770, name=0xffff95ef4758, value=0xffff95ef4750)
    at ../libsoup/soup-message-headers.c:543
#1  0x0000fffff768f364 [PAC] in ??? ()
    at /home/parallels/Documents/Remote Debug/Apps/DebugBeacon/DebugBeacon Libs/XojoGUIFrameworkARM64.so
#2  0x0000fffff789e184 in ??? ()
    at /home/parallels/Documents/Remote Debug/Apps/DebugBeacon/DebugBeacon Libs/XojoGUIFrameworkARM64.so
#3  0x0000fffff789b4c4 in URLConnection_ResponseHeaders ()
    at /home/parallels/Documents/Remote Debug/Apps/DebugBeacon/DebugBeacon Libs/XojoGUIFrameworkARM64.so
#4  0x000000000071d53c in _URLConnectionResponseHeadersIterable.Constructor%%o<_URLConnectionResponseHeadersIterable>o<URLConnection> ()
#5  0x00000000006ee39c in URLConnection.ResponseHeaders%o<Iterable>%o<URLConnection> ()
#6  0x0000000001a97b48 in BeaconAPI.SendSync%o<BeaconAPI.Response>%o<BeaconAPI.Request> () at BeaconAPI:154
#7  0x0000000001ab3d44 in BeaconAPI.Socket.mQueueThread_Run%%o<BeaconAPI.Socket>o<Beacon.Thread> () at BeaconAPI:975
#8  0x000000000127ec50 in Delegate.IM_Invoke%%o<Beacon.Thread> ()
#9  0x000000000127ec9c in AddHandler.Stub.2%% ()
#10 0x000000000103a54c in Beacon.Thread.Event_Run%%o<Beacon.Thread> ()

If I’m reading this correctly, this is a problem with libsoup and/or Xojo, right? It looks to be a bug with iterating over the response headers of a URLConnection.

The problem seems in the Xojo Framework, here, for ARM64. Xojo probably passed some unreachable memory address to libsoup. Something expected was released mid way? Some memory alloc fail?

During sendsync from your side, a URLConnectionResponseHeadersIterable should be constructed, but seems failed at some level.

If you could make a sample focusing at that part, or you could find something, or you can get something for William finding something broken.

I recall something about ResponseHeaders causing a crash in the past, but I can’t recall specific details. It was just supposed to have been fixed.

I remember an Android bug for that:

https://tracker.xojo.com/xojoinc/xojo/-/issues/73609

Coincidentally tied to sendSync too.

Well unfortunately this is with the very latest Xojo version.