Skip to content

[v3] dev mode, hot update vue file, cause fatal #5037

@GuoTengda1993

Description

@GuoTengda1993

Description

4:08:05 PM [vite] (client) hmr update /src/components/proxy/Proxy.vue
4:08PM ERR

******************************** FATAL *********************************

  •  There has been a catastrophic failure in your application.      *
    

**************************** Error Details *****************************
panic error: runtime error: invalid memory address or nil pointer dereference
runtime.panicmem
at /usr/local/go/src/runtime/panic.go:336
runtime.sigpanic
at /usr/local/go/src/runtime/signal_unix.go:931
cartools/apps.(*App).WindowGetHeight
at /Users/guotengda/Projects/cartools/apps/app.go:244
reflect.Value.call
at /usr/local/go/src/reflect/value.go:586
reflect.Value.Call
at /usr/local/go/src/reflect/value.go:369
github.com/wailsapp/wails/v3/pkg/application.(*BoundMethod).Call
at /Users/guotengda/go/pkg/mod/github.com/wailsapp/wails/v3@v3.0.0-alpha.74/pkg/application/bindings.go:321
github.com/wailsapp/wails/v3/pkg/application.(*MessageProcessor).processCallMethod
at /Users/guotengda/go/pkg/mod/github.com/wailsapp/wails/v3@v3.0.0-alpha.74/pkg/application/messageprocessor_call.go:119
github.com/wailsapp/wails/v3/pkg/application.(*MessageProcessor).HandleRuntimeCallWithIDs
at /Users/guotengda/go/pkg/mod/github.com/wailsapp/wails/v3@v3.0.0-alpha.74/pkg/application/messageprocessor.go:119
github.com/wailsapp/wails/v3/pkg/application.(*HTTPTransport).handleRuntimeRequest
at /Users/guotengda/go/pkg/mod/github.com/wailsapp/wails/v3@v3.0.0-alpha.74/pkg/application/transport_http.go:162
github.com/wailsapp/wails/v3/pkg/application.(*HTTPTransport).Handler.func1.1
at /Users/guotengda/go/pkg/mod/github.com/wailsapp/wails/v3@v3.0.0-alpha.74/pkg/application/transport_http.go:83
net/http.HandlerFunc.ServeHTTP
at /usr/local/go/src/net/http/server.go:2286
github.com/wailsapp/wails/v3/pkg/application.New.func3.1
at /Users/guotengda/go/pkg/mod/github.com/wailsapp/wails/v3@v3.0.0-alpha.74/pkg/application/application.go:120


To Reproduce

In vue file, there is some action in onMounted: get window size, events on ...

Expected behaviour

not fatal when hot update vue file

Screenshots

No response

Attempted Fixes

No response

System Details

Wails (v3.0.0-alpha.74)  Wails Doctor 
                                                                                                                                            
# System 

┌──────────────────────────────────────────────────┐
| Name          | MacOS                            |
| Version       | 26.2                             |
| ID            | 25C56                            |
| Branding      | MacOS 26.2                       |
| Platform      | darwin                           |
| Architecture  | arm64                            |
| Apple Silicon | true                             |
| CPU           | Apple M4 Pro                     |
| CPU 1         | Apple M4 Pro                     |
| CPU 2         | Apple M4 Pro                     |
| GPU           | 16 cores, Metal Support: Metal 4 |
| Memory        | 24 GB                            |
└──────────────────────────────────────────────────┘

# Build Environment 

┌──────────────────────────────────────────────────────────────────────┐
| Wails CLI      | v3.0.0-alpha.74                                     |
| Go Version     | go1.26.0                                            |
| -buildmode     | exe                                                 |
| -compiler      | gc                                                  |
| CGO_CFLAGS     |                                                     |
| CGO_CPPFLAGS   |                                                     |
| CGO_CXXFLAGS   |                                                     |
| CGO_ENABLED    | 1                                                   |
| CGO_LDFLAGS    |                                                     |
| DefaultGODEBUG | cryptocustomrand=1,tlssecpmlkem=0,urlstrictcolons=0 |
| GOARCH         | arm64                                               |
| GOARM64        | v8.0                                                |
| GOOS           | darwin                                              |
└──────────────────────────────────────────────────────────────────────┘

# Dependencies 

┌──────────────────────────────────────────────────────────────┐
| *NSIS           | v3.11                                      |
| Xcode cli tools | 2416                                       |
| npm             | 11.5.1                                     |
| docker          | *docker version 5.7.0 (daemon not running) |
|                                                              |
└────────────────── * - Optional Dependency ───────────────────┘

# Checking for issues 

 SUCCESS  No issues found

# Diagnosis 

 SUCCESS  Your system is ready for Wails development!

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingv3

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions