Closed non-one closed 2 years ago
Thanks for opening this. I couldn't reproduce locally. Could you please provide a bigger stack track? Thanks
I get some different track from wails dev
console:
DEB | [DevWebServer] Websocket client 0xc000480d80 connected
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x8 pc=0x9ae6a1]
goroutine 73 [running]:
main.(*App).GetRuntimeInfo(0x1?)
*/pagetop/app.go:72 +0x41
reflect.Value.call({0xa7b320?, 0xc000004c60?, 0x0?}, {0xabef41, 0x4}, {0x15d6a28, 0x0, 0x9e45a0?})
C:/Program Files/Go/src/reflect/value.go:556 +0x845
reflect.Value.Call({0xa7b320?, 0xc000004c60?, 0x4f2d9a?}, {0x15d6a28, 0x0, 0x0})
C:/Program Files/Go/src/reflect/value.go:339 +0xbf
github.com/wailsapp/wails/v2/internal/binding.(*BoundMethod).Call(0xc00014c3f0, {0x15d6a28, 0x0, 0x9e45a0?})
C:/Users/17100/go/pkg/mod/github.com/wailsapp/wails/v2@v2.0.0-beta.36/internal/binding/boundMethod.go:73 +0x16f
github.com/wailsapp/wails/v2/internal/frontend/dispatcher.(*Dispatcher).processCallMessage(0xc0002b0100, {0xc0004a2c40, 0x5f}, {0xc334e0, 0xc00029c0e0})
C:/Users/17100/go/pkg/mod/github.com/wailsapp/wails/v2@v2.0.0-beta.36/internal/frontend/dispatcher/calls.go:45 +0x188
github.com/wailsapp/wails/v2/internal/frontend/dispatcher.(*Dispatcher).ProcessMessage(0xc0002973b0?, {0xc0004a2c40?, 0xc000484500?}, {0xc334e0?, 0xc00029c0e0?})
C:/Users/17100/go/pkg/mod/github.com/wailsapp/wails/v2@v2.0.0-beta.36/internal/frontend/dispatcher/dispatcher.go:39 +0x5e
github.com/wailsapp/wails/v2/internal/frontend/desktop/windows.(*Frontend).processMessage.func1()
C:/Users/17100/go/pkg/mod/github.com/wailsapp/wails/v2@v2.0.0-beta.36/internal/frontend/desktop/windows/frontend.go:494 +0x3e
created by github.com/wailsapp/wails/v2/internal/frontend/desktop/windows.(*Frontend).processMessage
C:/Users/17100/go/pkg/mod/github.com/wailsapp/wails/v2@v2.0.0-beta.36/internal/frontend/desktop/windows/frontend.go:493 +0x21b
[0518/155819.529:ERROR:window_impl.cc(114)] Failed to unregister class Chrome_WidgetWin_0. Error = 0
Caught quit
Development mode exited
AND I am in another trouble, I cant open the wails windows,which means I have to see my project on chrome broswer start_log.txt
I Guess the wails hide the key error. I cant find what happended !
This looks like it's crashing in your own code "GetRuntimeInfo". Please provide a minimal reproducible example.
When I change go code. the frontend code will also be rebuild? Because in GetRuntimeInfo
I use a variable which has been assigned a value in startup func
. Frontend use GetRuntimeInfo
in onMounted(). So I have a question: when wails trigger rebuild, the frontend will start before app.startup?
I am back. Because something worse. I run wails build
and get the *.exe. But when I open executable file, nothing happend, no window #1305. wails dev
works randomly and I can see the window. So I try to init another app from https://github.com/misitebao/wails-template-vue and find out that I can see the window after click the exe But wails dev
not work, strange bug with no crash info. Tired...
When using a debug build you should see the panic: 'wails build --debug'
I suspect this is a highly timing issue. There's currently no guarantee that the 'OnStartup' callback has been finished before the Webview loads the frontend. So depending on the timing it could happen that other frontend callbacks, e.g from OnMounted are executed before OnStartup has been finished. So you might see uninitialized variables.
Closing this as it's old. Please reopen if you can provide more info.
I have this problem too. Tommorow i am give example code
Description
change the go file and will trigger rebuild function. but in crash "panic: runtime error: invalid memory address or nil pointer dereference" 100%
To Reproduce
log.Println("-----------------------")
code lineExpected behaviour
rebuild successfully
Screenshots
Attempted Fixes
No response
System Details
Additional context
crash_log.txt