Jul 13 06:05:27 RaspberryPi AdGuardHome[327]: panic: runtime error: invalid memory address or nil pointer dereference
Jul 13 06:05:27 RaspberryPi AdGuardHome[327]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x3fd768]
Jul 13 06:05:27 RaspberryPi AdGuardHome[327]: goroutine 56 [running]:
Jul 13 06:05:27 RaspberryPi AdGuardHome[327]: github.com/AdguardTeam/AdGuardHome/dnsfilter.getCachedReason(0x0, 0x0, 0x4e084a0, 0x13, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
Jul 13 06:05:27 RaspberryPi AdGuardHome[327]: #011/home/travis/gopath/src/github.com/AdguardTeam/AdGuardHome/dnsfilter/dnsfilter.go:237 +0x34
Jul 13 06:05:27 RaspberryPi AdGuardHome[327]: github.com/AdguardTeam/AdGuardHome/dnsfilter.(*Dnsfilter).checkSafeSearch(0x2c84050, 0x4e084a0, 0x13, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
Jul 13 06:05:27 RaspberryPi AdGuardHome[327]: #011/home/travis/gopath/src/github.com/AdguardTeam/AdGuardHome/dnsfilter/dnsfilter.go:304 +0x78
Jul 13 06:05:27 RaspberryPi AdGuardHome[327]: github.com/AdguardTeam/AdGuardHome/dnsfilter.(*Dnsfilter).CheckHost(0x2c84050, 0x4e084a0, 0x13, 0x1, 0x4e084e0, 0xd, 0x0, 0x0, 0x0, 0x0, ...)
Jul 13 06:05:27 RaspberryPi AdGuardHome[327]: #011/home/travis/gopath/src/github.com/AdguardTeam/AdGuardHome/dnsfilter/dnsfilter.go:192 +0x380
Jul 13 06:05:27 RaspberryPi AdGuardHome[327]: github.com/AdguardTeam/AdGuardHome/dnsforward.(*Server).filterDNSRequest(0x2c88360, 0x2d86c30, 0xc402dce, 0x6, 0xb64cb8)
Jul 13 06:05:27 RaspberryPi AdGuardHome[327]: #011/home/travis/gopath/src/github.com/AdguardTeam/AdGuardHome/dnsforward/dnsforward.go:506 +0x154
Jul 13 06:05:27 RaspberryPi AdGuardHome[327]: github.com/AdguardTeam/AdGuardHome/dnsforward.(*Server).handleDNSRequest(0x2c88360, 0x2ca4000, 0x2d86c30, 0x0, 0x0)
Jul 13 06:05:27 RaspberryPi AdGuardHome[327]: #011/home/travis/gopath/src/github.com/AdguardTeam/AdGuardHome/dnsforward/dnsforward.go:449 +0x40
Jul 13 06:05:27 RaspberryPi AdGuardHome[327]: github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).handleDNSRequest(0x2ca4000, 0x2d86c30, 0x25, 0x25)
Jul 13 06:05:27 RaspberryPi AdGuardHome[327]: #011/home/travis/gopath/pkg/mod/github.com/!adguard!team/[email protected]/proxy/proxy.go:917 +0x1c4
Jul 13 06:05:27 RaspberryPi AdGuardHome[327]: github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).handleUDPPacket(0x2ca4000, 0x4d9b530, 0x25, 0x25, 0x786650, 0x3e45ba0, 0x3f1a310)
Jul 13 06:05:27 RaspberryPi AdGuardHome[327]: #011/home/travis/gopath/pkg/mod/github.com/!adguard!team/[email protected]/proxy/proxy.go:628 +0x1b8
Jul 13 06:05:27 RaspberryPi AdGuardHome[327]: github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).udpPacketLoop.func1(0x2ca4000, 0x4d9b530, 0x25, 0x25, 0x786650, 0x3e45ba0, 0x3f1a310)
Jul 13 06:05:27 RaspberryPi AdGuardHome[327]: #011/home/travis/gopath/pkg/mod/github.com/!adguard!team/[email protected]/proxy/proxy.go:596 +0x4c
Jul 13 06:05:27 RaspberryPi AdGuardHome[327]: created by github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).udpPacketLoop
Jul 13 06:05:27 RaspberryPi AdGuardHome[327]: #011/home/travis/gopath/pkg/mod/github.com/!adguard!team/[email protected]/proxy/proxy.go:595 +0x340
Jul 13 06:05:27 RaspberryPi systemd[1]: AdGuardHome.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jul 13 06:05:27 RaspberryPi systemd[1]: AdGuardHome.service: Unit entered failed state.
Jul 13 06:05:27 RaspberryPi systemd[1]: AdGuardHome.service: Failed with result 'exit-code'.
For reference this is happening to be using AG Home v0.97 on a Raspberry Pi 3 Model B+ running Raspbian 9 Stretch. It'll work for about 30 seconds, then the service seems to crash. I can somewhat trigger it by changing client names and looking at the query log, it'll start displaying red network error messages in the bottom right.
v0.96 works perfectly though.
I have problems both on Raspberry Pi and even a Windows 10 machine:

The bug occurs when global setting 'SafeSearch' if off, but per-client setting is on. Introduced by commit 2307f55715c27f2affe5a975339cbea50377db72.
I can confirm. I changed client back to global settings and now no chrash anymore on Raspberry Pi and Windows 10 machine.
I can confirm as well.
Everyone who is experiencing this issue can now upgrade to the new beta version we've just released:
https://github.com/AdguardTeam/AdGuardHome#test-unstable-versions
(Download an archive, unpack and replace files)
Confirmed, fixed for me!