NSGenericException when dragging from one listbox to another

In my app users can be dragged to groups between 2 Xojo listboxes:

On Monterey I’m getting an exception:

Exception Name: NSGenericException
Description: There are 0 items on the pasteboard, but 1 drag images. There must be 1 draggingItem per pasteboardItem.
User Info: (null)

0 CoreFoundation 0x0000000197e52b08 __exceptionPreprocess + 240
1 libobjc.A.dylib 0x0000000197b9de14 objc_exception_throw + 60
2 CoreFoundation 0x0000000197e52954 +[NSException exceptionWithName:reason:userInfo:] + 0
3 AppKit 0x000000019b3ec440 -[NSDraggingSession(NSInternal) _initWithPasteboard:draggingItems:clippingRect:source:] + 264
4 AppKit 0x000000019aea49a0 -[NSCoreDragManager beginDraggingSessionWithItems:fromWindow:withClipRect:event:source:] + 1264
5 AppKit 0x000000019b212ce0 -[NSView(NSDrag) beginDraggingSessionWithItems:event:source:] + 212
6 XojoFramework 0x0000000104ee72b4 _Z16CocoaPerformDragP14DragItemObject + 1940

The app doesn’t crash. The code isn’t really complicated. Listbox 1:

Dim theDragItem As New DragItem(Self.TrueWindow, MouseX, MouseY, finalDragPicture.Width, finalDragPicture.Height)
theDragItem.rawData("User") = me.CellValueAt(row, 1)

theDragItem.DragPicture = finalDragPicture
theDragItem.Drag

Listbox 2:

dim UserGroup as String = me.getGroupForRow(row)
dim Username as String = obj.RawData("User")
if Username = "" then Return

me.resetDragging
if RaiseEvent AddUserToUserGroupOnServer(UserGroup, Username) then
  getData
end if

I had a similar problem last year with the NSTableView from the MBS plugin. As far as I remember Thomas Tempelmann saved my bacon by fiddling around with the internals of the pastboard. But here I have Xojo listboxes. Any idea for a workaround?

Xojo 2021r2. The problem is fixed in a newer version of Xojo. But I only switch Xojo versions when I start the development of a new version of my app.

The crash report mentions it thinks there are 0 items on the pasteboard, which lead me to think Xojo’s RawData isn’t recognised natively by the OS. :thinking:
What if you add a dummy text along the dragitem, like the cell’s content?

That didn’t work. I’ll leave that as is and will try to switch to a newer version of Xojo soon.