bytelang / kplayer-go

A live streaming tool more suitable for non-graphical servers
https://kplayer.net
Apache License 2.0
756 stars 72 forks source link

报错 :panic: runtime error: invalid memory address or nil pointer dereference #63

Closed koala9527 closed 1 year ago

koala9527 commented 1 year ago

`WARN[2023-02-16 14:37:56]cmd/root.go:35 open terminal failed
kplayer for golang v0.5.7 Copyright(c) 2019-2022 the ByteLang Studio (https://kplayer.bytelang.cn) libkplayer version: v1.5.2 plugin version: 1.5.1 license version: v1 toolchains GNU(10.3.1) C++ Standard 17 on Linux-aarch64-4.18.0-193.28.1.el7.aarch64 build with build-chains cmake(3.21.3) type with Release Hope you have a good experience.

panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xab0148]

goroutine 1 [running]: github.com/bytelang/kplayer/types.GetDirectorFiles({0x4001e66ea0, 0x109}) types/utils.go:143 +0x88 github.com/bytelang/kplayer/module/resource/provider.(Provider).InitModule(0x400041d550, 0x4000403e20, 0x4000b5e050) module/resource/provider/provider.go:87 +0x1f4 github.com/bytelang/kplayer/module/resource.AppModule.InitConfig({0x400041d550}, 0x4000403e20, {0x40018ea000, 0x4aa071, 0x4ac000}) module/resource/module.go:38 +0xa4 main.InitGlobalContextConfig(0x400049ec80) main.go:228 +0xd9c main.Execute.func1(0x400049ec80, {0x4524338, 0x0, 0x0}) main.go:76 +0x100 github.com/spf13/cobra.(Command).execute(0x400049ec80, {0x4524338, 0x0, 0x0}) /root/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:835 +0x564 github.com/spf13/cobra.(Command).ExecuteC(0x400045b180) /root/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:974 +0x424 github.com/spf13/cobra.(Command).Execute(...) /root/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:902 github.com/spf13/cobra.(*Command).ExecuteContext(...) /root/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:895 github.com/bytelang/kplayer/types.SetCommandContextAndExecute(...) types/context.go:49 main.Execute(0x400045b180, {0x2abbb1a, 0x2}, {0x2ac4816, 0x6}) main.go:85 +0x3b0 main.main() main.go:47 +0x4c ` 请问下是什么问题?是机器的性能不行吗?

koala9527 commented 1 year ago

也有可能是我的配置文件太大了,2548kb
image

我又看了文档我尝试把他改成文件夹配置可以了