bmx-ng / maxgui.mod

BlitzMax MaxGUI modules port.
7 stars 11 forks source link

Tabber Freeze on win32 #42

Open thareh opened 4 years ago

thareh commented 4 years ago

Hi, I came across a weird bug that makes the program freeze on Windows.

SuperStrict

Framework BRL.StandardIO
Import MaxGUI.Drivers
Import BRL.EventQueue

Local Window:TGadget = CreateWindow("Test", 0, 0, 1280, 768, Null, WINDOW_TITLEBAR | WINDOW_RESIZABLE | WINDOW_STATUS | WINDOW_ACCEPTFILES | WINDOW_MENU)

Local Tabber:TGadget = CreateTabber(0, 0, ClientWidth(Window), ClientHeight(Window), Window)

AddGadgetItem(Tabber, "foo", 0, 0)
AddGadgetItem(Tabber, "bar", 0, 1)

Local Panels:TGadget[2]
Panels[0] = CreatePanel(0, 0, ClientWidth(Tabber), ClientHeight(Tabber), Tabber)
CreateHTMLView(0, 0, ClientWidth(Panels[0]), ClientHeight(Panels[0]), Panels[0])
HideGadget(Panels[0])

Panels[1] = CreatePanel(0, 0, ClientWidth(Tabber), ClientHeight(Tabber), Tabber)
CreateTextArea(0, 0, ClientWidth(Panels[1]), ClientHeight(Panels[1]), Panels[1])
HideGadget(Panels[1])

Repeat

    WaitEvent()

    Print CurrentEvent.ToString()

    Select EventID()
        Case EVENT_WINDOWCLOSE
            End

        Case EVENT_GADGETACTION
            ShowGadget(Panels[EventData()])
    EndSelect

Forever

Click on the second tab and then press the tab key and the program freezes.

thareh commented 4 years ago

(Happens in vanilla BlitzMax as well)

woollybah commented 4 years ago

Well, if it happens with the original, it must be a feature, not a bug :)

GWRon commented 4 years ago

Shouldn't a run in GDB show the endless running loop?