macOS M2 / Apple Silicon - Threading Freeze with EditorGadget
Posted: Wed Sep 24, 2025 4:29 am
I've tested this exact code on an M2 Mac (macOS), and the application just freezes without populating the EditorGadget. However, it works perfectly on Linux ARM and Windows x64. Can anyone else confirm this behavior?
Code: Select all
Enumeration
#Window_Main
#Editor_Log
EndEnumeration
Procedure PopulateEditor(Gadget)
Protected i
For i = 1 To 100000
AddGadgetItem(#Editor_Log, -1, "Esta é a string de número: " + Str(i))
Next i
EndProcedure
If OpenWindow(#Window_Main, 0, 0, 600, 400, "Populando EditorGadget com Thread", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
EditorGadget(#Editor_Log, 0, 0, WindowWidth(#Window_Main), WindowHeight(#Window_Main))
CreateThread(@PopulateEditor(), GadgetID(#Editor_Log))
Repeat
Define Event = WaitWindowEvent()
Select Event
Case #PB_Event_CloseWindow
Break
EndSelect
ForEver
EndIf