Skip to content

Support 32bit systems#16

Open
Grimler91 wants to merge 1 commit intoismaelpadilla:mainfrom
Grimler91:arm32
Open

Support 32bit systems#16
Grimler91 wants to merge 1 commit intoismaelpadilla:mainfrom
Grimler91:arm32

Conversation

@Grimler91
Copy link
Copy Markdown

On arm (32 bit) gotorrent can run into errors like:

2025/09/17 05:12:02 strconv.Atoi: parsing "3501713069": value out of range
panic: strconv.Atoi: parsing "3501713069": value out of range

goroutine 1 [running]:
log.Panic({0x87d1f6a0, 0x1, 0x1})
        /home/builder/.termux-build/_cache/go1.25.0-r1/src/log/log.go:451 +0xa8
github.com/ismaelpadilla/gotorrent/clients/thepiratebay.pirateBayTorrent.convert({{0x87e839c0, 0x8}, {0x8802a7b0, 0x28}, {0x0, 0x0}, {0x8802a7e0, 0x28}, {0xa8877920, 0x1}, ...})
        /home/builder/.termux-build/gotorrent/build/src/github.com/ismaelpadilla/gotorrent/clients/thepiratebay/thepiratebay.go:48 +0xc0
github.com/ismaelpadilla/gotorrent/clients/thepiratebay.pirateBay.Search({}, {0xbe8eaea3, 0xa})
        /home/builder/.termux-build/gotorrent/build/src/github.com/ismaelpadilla/gotorrent/clients/thepiratebay/thepiratebay.go:38 +0x2e8
github.com/ismaelpadilla/gotorrent/ui.InitialModel({0xbe8eaea3, 0xa}, {{0xa8e241e0, 0xa912c6f8}, 0x0, {0x0, 0x0}, 0x0})
        /home/builder/.termux-build/gotorrent/build/src/github.com/ismaelpadilla/gotorrent/ui/ui.go:39 +0x188
github.com/ismaelpadilla/gotorrent/cmd.init.func1(0xa90cc4b8, {0x87c90708, 0x1, 0x1})
        /home/builder/.termux-build/gotorrent/build/src/github.com/ismaelpadilla/gotorrent/cmd/root.go:41 +0x250
github.com/spf13/cobra.(*Command).execute(0xa90cc4b8, {0x87caa1c8, 0x1, 0x1})
        /home/builder/.termux-build/gotorrent/build/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:876 +0x764
github.com/spf13/cobra.(*Command).ExecuteC(0xa90cc4b8)
        /home/builder/.termux-build/gotorrent/build/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:990 +0x444
github.com/spf13/cobra.(*Command).Execute(...)
        /home/builder/.termux-build/gotorrent/build/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:918
github.com/ismaelpadilla/gotorrent/cmd.Execute()
        /home/builder/.termux-build/gotorrent/build/src/github.com/ismaelpadilla/gotorrent/cmd/root.go:56 +0x2c
main.main()
        /home/builder/.termux-build/gotorrent/build/src/github.com/ismaelpadilla/gotorrent/main.go:8 +0x14

Fix the issue by making the converted value an Int64 instead.

On arm (32 bit) gotorrent can run into errors like:

    2025/09/17 05:12:02 strconv.Atoi: parsing "3501713069": value out of range
    panic: strconv.Atoi: parsing "3501713069": value out of range

    goroutine 1 [running]:
    log.Panic({0x87d1f6a0, 0x1, 0x1})
            /home/builder/.termux-build/_cache/go1.25.0-r1/src/log/log.go:451 +0xa8
    github.com/ismaelpadilla/gotorrent/clients/thepiratebay.pirateBayTorrent.convert({{0x87e839c0, 0x8}, {0x8802a7b0, 0x28}, {0x0, 0x0}, {0x8802a7e0, 0x28}, {0xa8877920, 0x1}, ...})
            /home/builder/.termux-build/gotorrent/build/src/github.com/ismaelpadilla/gotorrent/clients/thepiratebay/thepiratebay.go:48 +0xc0
    github.com/ismaelpadilla/gotorrent/clients/thepiratebay.pirateBay.Search({}, {0xbe8eaea3, 0xa})
            /home/builder/.termux-build/gotorrent/build/src/github.com/ismaelpadilla/gotorrent/clients/thepiratebay/thepiratebay.go:38 +0x2e8
    github.com/ismaelpadilla/gotorrent/ui.InitialModel({0xbe8eaea3, 0xa}, {{0xa8e241e0, 0xa912c6f8}, 0x0, {0x0, 0x0}, 0x0})
            /home/builder/.termux-build/gotorrent/build/src/github.com/ismaelpadilla/gotorrent/ui/ui.go:39 +0x188
    github.com/ismaelpadilla/gotorrent/cmd.init.func1(0xa90cc4b8, {0x87c90708, 0x1, 0x1})
            /home/builder/.termux-build/gotorrent/build/src/github.com/ismaelpadilla/gotorrent/cmd/root.go:41 +0x250
    github.com/spf13/cobra.(*Command).execute(0xa90cc4b8, {0x87caa1c8, 0x1, 0x1})
            /home/builder/.termux-build/gotorrent/build/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:876 +0x764
    github.com/spf13/cobra.(*Command).ExecuteC(0xa90cc4b8)
            /home/builder/.termux-build/gotorrent/build/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:990 +0x444
    github.com/spf13/cobra.(*Command).Execute(...)
            /home/builder/.termux-build/gotorrent/build/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:918
    github.com/ismaelpadilla/gotorrent/cmd.Execute()
            /home/builder/.termux-build/gotorrent/build/src/github.com/ismaelpadilla/gotorrent/cmd/root.go:56 +0x2c
    main.main()
            /home/builder/.termux-build/gotorrent/build/src/github.com/ismaelpadilla/gotorrent/main.go:8 +0x14

Fix the issue by making the converted value an Int64 instead.
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

Successfully merging this pull request may close these issues.

1 participant