Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app crash if "invalid memory address or nil pointer dereference" #3965

Open
mediawall opened this issue Dec 23, 2024 · 0 comments
Open

app crash if "invalid memory address or nil pointer dereference" #3965

mediawall opened this issue Dec 23, 2024 · 0 comments
Labels
Bug Something isn't working

Comments

@mediawall
Copy link

Description

signal 11 received but handler not on signal stack
mp.gsignal stack [0xc000170000 0xc000178000], mp.g0 stack [0x7f738a1ffe08 0x7f738a9ffa08], sp=0xc000920798
fatal error: non-Go code set up signal handler without SA_ONSTACK flag

refer issue: #2152

To Reproduce

add following code to Greet method:

func (g *GreetService) Greet(name string) string {

	go func() {
		defer func() {
			if err := recover(); err != nil {
				fmt.Printf("------------------------------%#v\n", err)
			}
		}()
		time.Sleep(5 * time.Second)
		var t *time.Time
		log.Println(t.Unix())
	}()

	return "Hello " + name + "!"
}

Expected behaviour

exception is recovered.
if put the method in test function, the exception could be recovered.

Screenshots

No response

Attempted Fixes

No response

System Details

# Wails
Version         | v2.9.2
Package Manager | apt   

# System
┌──────────────────────────────────────────────────────────────────────────────────┐
| OS           | Ubuntu                                                            |
| Version      | 24.04                                                             |
| ID           | ubuntu                                                            |
| Go Version   | go1.23.2                                                          |
| Platform     | linux                                                             |
| Architecture | amd64                                                             |
| CPU          | Intel(R) Core(TM) i7-6850K CPU @ 3.60GHz                          |
| GPU 1        | Unknown                                                           |
| GPU 2        | GP102 [GeForce GTX 1080 Ti] (NVIDIA Corporation) - Driver: nvidia |
| Memory       | 98GB                                                              |
└──────────────────────────────────────────────────────────────────────────────────┘

# Dependencies
┌────────────────────────────────────────────────────────────────────┐
| Dependency | Package Name    | Status    | Version                 |
| *docker    | docker.io       | Available | 26.1.3-0ubuntu1~24.04.1 |
| gcc        | build-essential | Installed | 13.3.0                  |
| libgtk-3   | libgtk-3-dev    | Available | 3.24.41-4ubuntu1.2      |
| libwebkit  | Unknown         | Not Found |                         |
| npm        | npm             | Installed | 10.9.0                  |
| *nsis      | nsis            | Installed | v3.09-4                 |
| pkg-config | pkg-config      | Installed | 1.8.1                   |
└───────────────────── * - Optional Dependency ──────────────────────┘

# Diagnosis
Required package(s) installation details: 
  - libgtk-3: sudo apt install libgtk-3-dev
  - libwebkit: sudo apt install libwebkit2gtk-4.0-dev

Optional package(s) installation details: 
  - docker: sudo apt install docker.io

Additional context

No response

@mediawall mediawall added the Bug Something isn't working label Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant