LazMapViewer crashes on GPSItems.Add when using threads with GTK2 on Linux

The app crashes on MapView1.GPSItems.Add when UseThreads = True. Happens with GTK2. qt5 is working.

[xcb] Unknown sequence number while processing reply
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
lazmapviewtest2-gtk2.elf: ../../src/xcb_io.c:725: _XReply: Проверочное утверждение «!xcb_xlib_threads_sequence_lost» не выполнено.

Test app lazmapviewtest2.7z

Trunk FPC/Lazarus

Edited by regs01
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information