ANO : "panic: runtime error: invalid memory address or nil pointer dereference" à l'utilisation de net.broadcast #6

Closed
opened 2023-03-03 10:27:44 +01:00 by cmsassot · 0 comments
Owner

Contexte

  • L'envoi d'un message depuis serveur à tous les clients, en utilisant net.brodcast({mon:'test'})
2023-03-03 09:03:58.783 [DEBUG]	<bus.go:48>	publishing message	{"dispatchers": 2, "messageNamespace": "server"}
2023-03-03 09:03:58.783 [DEBUG]	<bus.go:35>	unsubscribing from messages	{"sessionID": "runm02bb", "messageNamespace": "server"}
2023-03-03 09:03:58.784 [DEBUG]	<bus.go:35>	unsubscribing from messages	{"sessionID": "fp3ooomr", "messageNamespace": "server"}
2023-03-03 09:03:58.784 [DEBUG]	<sockjs.go:59>	unsubscribed	{"sessionID": "runm02bb"}
2023-03-03 09:03:58.784 [DEBUG]	<sockjs.go:59>	unsubscribed	{"sessionID": "fp3ooomr"}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0xa79d18]

goroutine 196 [running]:
forge.cadoles.com/arcad/edge/pkg/module.ContextValue[...]({0x0, 0x0}, {0xed0b34, 0x0?})
	/home/wpetit/workspace/edge/pkg/module/context.go:68 +0x38
forge.cadoles.com/arcad/edge/pkg/http.(*Handler).handleServerMessages(0xc0002c2000, {0x10cca68, 0xc0006f0450}, {0xc0009193e0?})
	/home/wpetit/workspace/edge/pkg/http/sockjs.go:87 +0x276
created by forge.cadoles.com/arcad/edge/pkg/http.(*Handler).handleSockJSSession
	/home/wpetit/workspace/edge/pkg/http/sockjs.go:45 +0x1ec
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0xa79d18]

goroutine 130 [running]:
forge.cadoles.com/arcad/edge/pkg/module.ContextValue[...]({0x0, 0x0}, {0xed0b34, 0x0?})
	/home/wpetit/workspace/edge/pkg/module/context.go:68 +0x38
forge.cadoles.com/arcad/edge/pkg/http.(*Handler).handleServerMessages(0xc0002c2000, {0x10cca68, 0xc000f84090}, {0xc000970090?})
	/home/wpetit/workspace/edge/pkg/http/sockjs.go:87 +0x276
created by forge.cadoles.com/arcad/edge/pkg/http.(*Handler).handleSockJSSession
	/home/wpetit/workspace/edge/pkg/http/sockjs.go:45 +0x1ec
make: *** [Makefile:45: run] Error 2

## Contexte - L'envoi d'un message depuis serveur à tous les clients, en utilisant `net.brodcast({mon:'test'})` ``` 2023-03-03 09:03:58.783 [DEBUG] <bus.go:48> publishing message {"dispatchers": 2, "messageNamespace": "server"} 2023-03-03 09:03:58.783 [DEBUG] <bus.go:35> unsubscribing from messages {"sessionID": "runm02bb", "messageNamespace": "server"} 2023-03-03 09:03:58.784 [DEBUG] <bus.go:35> unsubscribing from messages {"sessionID": "fp3ooomr", "messageNamespace": "server"} 2023-03-03 09:03:58.784 [DEBUG] <sockjs.go:59> unsubscribed {"sessionID": "runm02bb"} 2023-03-03 09:03:58.784 [DEBUG] <sockjs.go:59> unsubscribed {"sessionID": "fp3ooomr"} panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0xa79d18] goroutine 196 [running]: forge.cadoles.com/arcad/edge/pkg/module.ContextValue[...]({0x0, 0x0}, {0xed0b34, 0x0?}) /home/wpetit/workspace/edge/pkg/module/context.go:68 +0x38 forge.cadoles.com/arcad/edge/pkg/http.(*Handler).handleServerMessages(0xc0002c2000, {0x10cca68, 0xc0006f0450}, {0xc0009193e0?}) /home/wpetit/workspace/edge/pkg/http/sockjs.go:87 +0x276 created by forge.cadoles.com/arcad/edge/pkg/http.(*Handler).handleSockJSSession /home/wpetit/workspace/edge/pkg/http/sockjs.go:45 +0x1ec panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0xa79d18] goroutine 130 [running]: forge.cadoles.com/arcad/edge/pkg/module.ContextValue[...]({0x0, 0x0}, {0xed0b34, 0x0?}) /home/wpetit/workspace/edge/pkg/module/context.go:68 +0x38 forge.cadoles.com/arcad/edge/pkg/http.(*Handler).handleServerMessages(0xc0002c2000, {0x10cca68, 0xc000f84090}, {0xc000970090?}) /home/wpetit/workspace/edge/pkg/http/sockjs.go:87 +0x276 created by forge.cadoles.com/arcad/edge/pkg/http.(*Handler).handleSockJSSession /home/wpetit/workspace/edge/pkg/http/sockjs.go:45 +0x1ec make: *** [Makefile:45: run] Error 2 ```
cmsassot added the
Type = Anomalie
label 2023-03-03 10:27:44 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: arcad/edge#6
No description provided.