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

Fix panic for homekit source (nil conn) #628

Closed
buchvald opened this issue Sep 10, 2023 · 6 comments
Closed

Fix panic for homekit source (nil conn) #628

buchvald opened this issue Sep 10, 2023 · 6 comments
Labels
bug Something isn't working panic
Milestone

Comments

@buchvald
Copy link

buchvald commented Sep 10, 2023

Hi AlexxIT

I have updated to newest version.

Here is the error:

22:18:15.943 INF go2rtc version 1.7.1 linux/amd64
22:18:15.944 INF [api] listen addr=0.0.0.0:1984
22:18:15.945 INF [rtsp] listen addr=0.0.0.0:8554
22:18:15.945 INF [webrtc] listen addr=0.0.0.0:8555/tcp
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x673425]
goroutine 6 [running]:
bufio.(*Writer).Flush(0xc0002767c0)
	bufio/bufio.go:642 +0x45
net/http.(*Request).write(0xc000143000, {0x0, 0x0}, 0x0, 0x0, 0x0)
	net/http/request.go:747 +0xc77
net/http.(*Request).Write(...)
	net/http/request.go:540
github.com/AlexxIT/go2rtc/pkg/hap.(*Client).Do(0xc000348400, 0x1134520?)
	github.com/AlexxIT/go2rtc/pkg/hap/client_http.go:22 +0x4d
github.com/AlexxIT/go2rtc/pkg/hap.(*Client).Request(0xc000348400, {0xb9f21b, 0x3}, {0xba6906, 0xc}, {0x0, 0x0}, {0x0, 0x0})
	github.com/AlexxIT/go2rtc/pkg/hap/client_http.go:38 +0x1bf
github.com/AlexxIT/go2rtc/pkg/hap.(*Client).Get(...)
	github.com/AlexxIT/go2rtc/pkg/hap/client_http.go:47
github.com/AlexxIT/go2rtc/pkg/hap.(*Client).GetAccessories(0x410225?)
	github.com/AlexxIT/go2rtc/pkg/hap/client.go:232 +0x3c
github.com/AlexxIT/go2rtc/pkg/hap.(*Client).GetFirstAccessory(0xb20c60?)
	github.com/AlexxIT/go2rtc/pkg/hap/client.go:246 +0x13
github.com/AlexxIT/go2rtc/pkg/hap/camera.(*Stream).GetFreeStream(0xc0000a1180)
	github.com/AlexxIT/go2rtc/pkg/hap/camera/stream.go:74 +0x25
github.com/AlexxIT/go2rtc/pkg/hap/camera.NewStream(0xc000348400, 0xc0000a5180, 0xc0000a51d0, 0xc0000d0e70, 0xc0000d0f20)
	github.com/AlexxIT/go2rtc/pkg/hap/camera/stream.go:25 +0xdc
github.com/AlexxIT/go2rtc/pkg/homekit.(*Client).Start(0xc000036680)
	github.com/AlexxIT/go2rtc/pkg/homekit/client.go:135 +0x5c5
github.com/AlexxIT/go2rtc/internal/streams.(*Producer).worker(0xc0001542d0, {0xcaed28?, 0xc000036680?}, 0x1)
	github.com/AlexxIT/go2rtc/internal/streams/producer.go:162 +0x2f
created by github.com/AlexxIT/go2rtc/internal/streams.(*Producer).reconnect in goroutine 54
	github.com/AlexxIT/go2rtc/internal/streams/producer.go:239 +0x4fd
@buchvald
Copy link
Author

buchvald commented Sep 10, 2023

Config:

streams:
    entrecam: hass:Entrecam	
    bryggerscam: hass:Bryggerscam

@AlexxIT AlexxIT added bug Something isn't working panic labels Sep 11, 2023
@AlexxIT
Copy link
Owner

AlexxIT commented Sep 11, 2023

What models of your cameras? Are they works before update?

@buchvald
Copy link
Author

Both cameras are Aqara G2H.
They are connected via "HomeKit Device" in Home Assistant.

The setup has worked with ver 1.6.2

@AlexxIT
Copy link
Owner

AlexxIT commented Sep 11, 2023

Ok. I have this model. But unpacked yet.

@AlexxIT AlexxIT changed the title Panic: runtime error: invalid memory address Fix panic for homekit source (nil conn) Oct 11, 2023
@AlexxIT AlexxIT added this to the v1.7.2 milestone Oct 11, 2023
@AlexxIT
Copy link
Owner

AlexxIT commented Oct 14, 2023

https://github.com/AlexxIT/go2rtc/releases/tag/v1.8.0

@AlexxIT AlexxIT closed this as completed Oct 14, 2023
felipecrs pushed a commit to felipecrs/go2rtc that referenced this issue Oct 20, 2023
@buchvald
Copy link
Author

It works. Thanks 🙏🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working panic
Projects
None yet
Development

No branches or pull requests

2 participants