Webview example crashes debugger
Posted: Fri Aug 02, 2024 12:30 am
On Windows PB 6.11 x64 running the Webview example from the help file will crash the debugger when i click on one of the buttons.
"The debugger executable quit unexpectedly"
Compiling it without the debugger works without crashing. Is anyone else experiencing this?
// Moved from "Bugs - Windows" to "Coding Questions" (Kiffi)
"The debugger executable quit unexpectedly"
Compiling it without the debugger works without crashing. Is anyone else experiencing this?
Code: Select all
;
; ------------------------------------------------------------
;
; PureBasic - WebView example file
;
; (c) 2024 - Fantaisie Software
;
; ------------------------------------------------------------
;
Procedure IncrementCallback(JsonParameters$)
Static Count
Debug #PB_Compiler_Procedure +": " + JsonParameters$
Count + 1
ProcedureReturn UTF8(~"{ \"count\": "+Str(Count)+ "}")
EndProcedure
Procedure ComputeCallback(JsonParameters$)
Debug #PB_Compiler_Procedure +": " + JsonParameters$
Dim Parameters(0)
; Extract the parameters from the JSON
ParseJSON(0, JsonParameters$)
ExtractJSONArray(JSONValue(0), Parameters())
Debug "Parameter 1: " + Parameters(0)
Debug "Parameter 2: " + Parameters(1)
ProcedureReturn UTF8(Str(Parameters(0) + Parameters(1)))
EndProcedure
OpenWindow(0, 100, 100, 400, 400, "Hello", #PB_Window_SystemMenu | #PB_Window_Invisible)
WebViewGadget(0, 0, 0, 400, 400)
SetGadgetText(0, "file://" + #PB_Compiler_Home + "examples/sources/Data/WebView/webview.html")
BindWebViewCallback(0, "increment", @IncrementCallback())
BindWebViewCallback(0, "compute", @ComputeCallback())
; Show the window once the webview has been fully loaded
HideWindow(0, #False)
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
// Moved from "Bugs - Windows" to "Coding Questions" (Kiffi)