Skip to content
This repository was archived by the owner on Apr 2, 2025. It is now read-only.
This repository was archived by the owner on Apr 2, 2025. It is now read-only.

panic: runtime error while trying to download some chapters #135

Open
@oae

Description

@oae

Describe the bug

This does not occur frequently but sometimes mangal throws an error during a chapter download.

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

goroutine 1 [running]:
bytes.(*Buffer).WriteTo(0x153e720?, {0x153e720?, 0xc0002fa460?})
	bytes/buffer.go:250 +0x22
io.copyBuffer({0x153e720, 0xc0002fa460}, {0x153e7c0, 0x0}, {0x0, 0x0, 0x0})
	io/io.go:409 +0x16e
io.Copy(...)
	io/io.go:386
github.com/metafates/mangal/converter/cbz.addToZip(0xc0004009c0?, {0x153e7c0, 0x0}, {0xc0000bd0e0, 0xa})
	github.com/metafates/mangal/converter/cbz/cbz.go:83 +0xa6
github.com/metafates/mangal/converter/cbz.SaveTo(0xc000348600, {0xc0000459b0?, 0xc000b55828?})
	github.com/metafates/mangal/converter/cbz/cbz.go:55 +0x36b
github.com/metafates/mangal/converter/cbz.save(0xe5bd20?, 0x60?)
	github.com/metafates/mangal/converter/cbz/cbz.go:35 +0x3f
github.com/metafates/mangal/converter/cbz.(*CBZ).Save(0xc000116900, 0x4?)
	github.com/metafates/mangal/converter/cbz/cbz.go:22 +0x1e
github.com/metafates/mangal/downloader.Download(0xc000348600, 0x12da8f0)
	github.com/metafates/mangal/downloader/download.go:104 +0xbe7
github.com/metafates/mangal/inline.Run(0xc000b55c88)
	github.com/metafates/mangal/inline/inline.go:121 +0x5dd
github.com/metafates/mangal/cmd.glob..func11(0x1cf7b60?, {0x1006797?, 0x9?, 0x9?})
	github.com/metafates/mangal/cmd/inline.go:149 +0x567
github.com/spf13/cobra.(*Command).execute(0x1cf7b60, {0xc000128900, 0x9, 0x9})
	github.com/spf13/[email protected]/command.go:920 +0x847
github.com/spf13/cobra.(*Command).ExecuteC(0x1cfaf20)
	github.com/spf13/[email protected]/command.go:1044 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/[email protected]/command.go:968
github.com/metafates/mangal/cmd.Execute()
	github.com/metafates/mangal/cmd/root.go:109 +0x5e
main.main()

Reproduction steps

The following commands are failing;

  • mangal inline --source Manganelo --query "Black Clover" --manga first --chapters 347 -d
  • mangal inline --source Manganelo --query "Black Clover" --manga first --chapters 348 -d

Expected behavior

No response

Additional context

No response

Operating System

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinginlineRelated to the Inline mode

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions