Confirmed. Crashes here with an "Invalid memory access" error on the RemoveGadgetItem() line.
And here's another related bug: When an image is assigned to the added item, but then the item is removed before the event loop, the item is still visible (image and text) until the mouse is moved over it. But you can make it go away correctly with InvalidateRect_() API call. Try this:
Code:
UsePNGImageDecoder()
LoadImage(0, #PB_Compiler_Home + "examples/sources/Data/world.png")
If OpenWindow(0, 0, 0, 270, 180, "ComboBoxGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ComboBoxGadget(0, 10, 10, 250, 21, #PB_ComboBox_Editable)
AddGadgetItem(0, -1, "ComboBox editable...")
ComboBoxGadget(1, 10, 40, 250, 21, #PB_ComboBox_Image)
AddGadgetItem(1, -1, "ComboBox item with image", ImageID(0))
ComboBoxGadget(2, 10, 70, 250, 21)
For a = 1 To 5
AddGadgetItem(2, -1,"ComboBox item " + Str(a))
Next
SetGadgetState(0, 0)
SetGadgetState(1, 0)
SetGadgetState(2, 2)
RemoveGadgetItem(1, 0) ; Item with image is still visible until the mouse is moved over it.
;InvalidateRect_(GadgetID(1),0,1) ; Uncomment this line to fix the bug.
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf