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

panic: runtime error: invalid memory address or nil pointer dereference #248

Open
andmart opened this issue Oct 1, 2024 · 2 comments
Open

Comments

@andmart
Copy link
Contributor

andmart commented Oct 1, 2024

go version go1.23.1 linux/amd64

package main

import (
	"context"

	"github.com/gagliardetto/solana-go"
	serum "github.com/gagliardetto/solana-go/programs/serum"
	"github.com/gagliardetto/solana-go/rpc"
)

func main() {
	endpoint := rpc.MainNetBeta_RPC
	client := rpc.New(endpoint)
	ctx := context.Background()
	marketAddr := solana.MustPublicKeyFromBase58("GTpWscSoJegU3Ry3ZinMCLEnD2FAMRqNYRhG9E6UX2EY")
	serum.FetchMarket(ctx, client, marketAddr)
}

generates

Starting: /dev/go/bin/dlv dap --listen=127.0.0.1:40005 --log-dest=3 from /dev/projetos/proj_go/teste
DAP server listening at: 127.0.0.1:40005
Type 'dlv help' for list of commands.
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xa9f6da]

goroutine 1 [running]:
debug/elf.(*Section).ReadAt(0xc0000fef00, {0xc000154500, 0x25b, 0x25b}, 0x0)
	<autogenerated>:1 +0x7a
archive/zip.readDirectoryEnd({0xc0d4e0, 0xc0000fef00}, 0x25b)
	/dev/apps/go/src/archive/zip/reader.go:576 +0x1d6
archive/zip.(*Reader).init(0xc00017a000, {0xc0d4e0, 0xc0000fef00}, 0x25b)
	/dev/apps/go/src/archive/zip/reader.go:119 +0x78
archive/zip.NewReader({0xc0d4e0, 0xc0000fef00}, 0x25b)
	/dev/apps/go/src/archive/zip/reader.go:112 +0xbd
github.com/daaku/go%2ezipexe.zipExeReaderElf({0xc0d4c0, 0xc0000c02a8}, 0xdc5e89)
	/dev/go/pkg/mod/github.com/daaku/[email protected]/zipexe.go:128 +0x1df
github.com/daaku/go%2ezipexe.NewReader({0xc0d4c0, 0xc0000c02a8}, 0xdc5e89)
	/dev/go/pkg/mod/github.com/daaku/[email protected]/zipexe.go:48 +0x1bf
github.com/daaku/go%2ezipexe.OpenCloser({0xc00010e180, 0x38})
	/dev/go/pkg/mod/github.com/daaku/[email protected]/zipexe.go:30 +0x258
github.com/GeertJohan/go%2erice.init.0()
	/dev/go/pkg/mod/github.com/!geert!johan/[email protected]/appended.go:41 +0x205
Process 3028354 has exited with status 2
Detaching

@EUForest
Copy link

I also encountered the same problem, is there any way to solve it?

@andmart
Copy link
Contributor Author

andmart commented Dec 11, 2024

I gave up. I am using https://github.com/blocto/solana-go-sdk

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