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

下载文件失败 #283

Open
yangfl opened this issue Jul 3, 2023 · 2 comments
Open

下载文件失败 #283

yangfl opened this issue Jul 3, 2023 · 2 comments

Comments

@yangfl
Copy link

yangfl commented Jul 3, 2023

VERSION: v3.9.2

https://pan.baidu.com/s/1siKcJCU9oNq8HNMrPDSCFQ 提取码:1234

➜  bin ./BaiduPCS-Go
提示: 方向键上下可切换历史命令.
提示: Ctrl + A / E 跳转命令 首 / 尾.
提示: 输入 help 获取帮助.
BaiduPCS-Go:temp xxxxxxx$ d corexy-plus/

[0] 提示: 当前下载最大并发量为: 1, 下载缓存为: 65536
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x69 pc=0x89d162]

goroutine 1 [running]:
github.com/qjfoidnh/BaiduPCS-Go/internal/pcscommand.RunDownload.func2(0xc000398bc0, 0x0)
	/home/liu/Projects/BaiduPCS-Go/internal/pcscommand/download.go:141 +0x22
sort.medianOfThree_func({0xc00024d110, 0xc000398bc0}, 0xc0000966c0, 0xe6ff00, 0x8)
	/usr/local/go/src/sort/zfuncversion.go:53 +0x4a
sort.doPivot_func({0xc00024d110, 0xc000398bc0}, 0x0, 0x72)
	/usr/local/go/src/sort/zfuncversion.go:76 +0x8a
sort.quickSort_func({0xc00024d110, 0xc000398bc0}, 0xc0000966c0, 0x0, 0xc0003aa0f6)
	/usr/local/go/src/sort/zfuncversion.go:143 +0x85
sort.Slice({0x920b00, 0xc0000966c0}, 0xa0)
	/usr/local/go/src/sort/slice.go:20 +0x9f
github.com/qjfoidnh/BaiduPCS-Go/internal/pcscommand.RunDownload({0xc000396500, 0x0, 0x819000}, 0xc00024d468)
	/home/liu/Projects/BaiduPCS-Go/internal/pcscommand/download.go:140 +0x4fc
main.main.func21(0xc0003b0160)
	/home/liu/Projects/BaiduPCS-Go/main.go:1073 +0x3ce
github.com/urfave/cli.HandleAction({0x932600, 0xa16800}, 0x8)
	/home/liu/go/pkg/mod/github.com/urfave/cli@v1.22.5/app.go:524 +0xa8
github.com/urfave/cli.Command.Run({{0x9e82aa, 0x8}, {0x0, 0x0}, {0xc000341230, 0x1, 0x1}, {0x9f0237, 0x13}, {0xc000313f20, ...}, ...}, ...)
	/home/liu/go/pkg/mod/github.com/urfave/cli@v1.22.5/command.go:173 +0x652
github.com/urfave/cli.(*App).Run(0xc00016c8c0, {0xc0003ac000, 0x3, 0x3})
	/home/liu/go/pkg/mod/github.com/urfave/cli@v1.22.5/app.go:277 +0x705
main.main.func1(0xc00012b080)
	/home/liu/Projects/BaiduPCS-Go/main.go:323 +0x545
github.com/urfave/cli.HandleAction({0x92a820, 0xc000341190}, 0xc00016c8c0)
	/home/liu/go/pkg/mod/github.com/urfave/cli@v1.22.5/app.go:526 +0x50
github.com/urfave/cli.(*App).Run(0xc00016c8c0, {0xc00001e200, 0x1, 0x1})
	/home/liu/go/pkg/mod/github.com/urfave/cli@v1.22.5/app.go:286 +0x625
main.main()
	/home/liu/Projects/BaiduPCS-Go/main.go:2233 +0x6865

// 处理队列, 小文件优先下载
sort.Slice(file_dir_list, func(i, j int) bool {
return file_dir_list[i].Size < file_dir_list[j].Size
})

@pongfcnkl
Copy link

正常、
截图_20230704223821

@yangfl
Copy link
Author

yangfl commented Jul 9, 2023

似乎是malloc的问题,分配内存重叠了,不好调试

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants