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

Bug report: one-off panic: runtime error: invalid memory address or nil pointer dereference at startup #530

Closed
ChrysmOre opened this issue Feb 16, 2024 · 4 comments
Labels

Comments

@ChrysmOre
Copy link

Have recently integrated Air into a repo at work, everything has been running fine until today on a fresh pull from the repository, everything in the same state as has been working perfectly but have hit a panic:

building...
***
2024-02-16 14:08:32 panic: runtime error: invalid memory address or nil pointer dereference
2024-02-16 14:08:32 [signal SIGSEGV: segmentation violation code=0x1 addr=0x90 pc=0x518949]
2024-02-16 14:08:32 
2024-02-16 14:08:32 goroutine 37 [running]:
2024-02-16 14:08:32 regexp.(*Regexp).doExecute(0x28?, {0x0?, 0x0?}, {0xc000126750?, 0xc0001266f5?, 0x4?}, {0x0?, 0x2d?}, 0x28?, 0x0, ...)
2024-02-16 14:08:32     /usr/local/go/src/regexp/exec.go:527 +0x89
2024-02-16 14:08:32 regexp.(*Regexp).doMatch(...)
2024-02-16 14:08:32     /usr/local/go/src/regexp/exec.go:514
2024-02-16 14:08:32 regexp.(*Regexp).Match(...)
2024-02-16 14:08:32     /usr/local/go/src/regexp/regexp.go:539
2024-02-16 14:08:32 github.com/cosmtrek/air/runner.(*Engine).isExcludeRegex(0xc000246000?, {0xc0001266f0, 0x2d})
2024-02-16 14:08:32     /go/pkg/mod/github.com/cosmtrek/[email protected]/runner/util.go:149 +0xcb
2024-02-16 14:08:32 github.com/cosmtrek/air/runner.(*Engine).watchPath.func1()
2024-02-16 14:08:32     /go/pkg/mod/github.com/cosmtrek/[email protected]/runner/engine.go:255 +0x3c9
2024-02-16 14:08:32 created by github.com/cosmtrek/air/runner.(*Engine).watchPath in goroutine 1
2024-02-16 14:08:32     /go/pkg/mod/github.com/cosmtrek/[email protected]/runner/engine.go:222 +0x24e
2024-02-16 14:08:32 panic: runtime error: invalid memory address or nil pointer dereference
2024-02-16 14:08:32 [signal SIGSEGV: segmentation violation code=0x1 addr=0x90 pc=0x518949]
2024-02-16 14:08:32 
2024-02-16 14:08:32 goroutine 39 [running]:
2024-02-16 14:08:32 regexp.(*Regexp).doExecute(0x1b?, {0x0?, 0x0?}, {0xc0000bedc0?, 0xc0000beda5?, 0x4?}, {0x0?, 0x20?}, 0x1b?, 0x0, ...)
2024-02-16 14:08:32     /usr/local/go/src/regexp/exec.go:527 +0x89
2024-02-16 14:08:32 regexp.(*Regexp).doMatch(...)
2024-02-16 14:08:32     /usr/local/go/src/regexp/exec.go:514
2024-02-16 14:08:32 regexp.(*Regexp).Match(...)
2024-02-16 14:08:32     /usr/local/go/src/regexp/regexp.go:539
2024-02-16 14:08:32 github.com/cosmtrek/air/runner.(*Engine).isExcludeRegex(0xc000246000?, {0xc0000beda0, 0x20})
2024-02-16 14:08:32     /go/pkg/mod/github.com/cosmtrek/[email protected]/runner/util.go:149 +0xcb
2024-02-16 14:08:32 github.com/cosmtrek/air/runner.(*Engine).watchPath.func1()
2024-02-16 14:08:32     /go/pkg/mod/github.com/cosmtrek/[email protected]/runner/engine.go:255 +0x3c9
2024-02-16 14:08:32 created by github.com/cosmtrek/air/runner.(*Engine).watchPath in goroutine 1
2024-02-16 14:08:32     /go/pkg/mod/github.com/cosmtrek/[email protected]/runner/engine.go:222 +0x24e
2024-02-16 14:08:32 panic: runtime error: invalid memory address or nil pointer dereference
2024-02-16 14:08:32 [signal SIGSEGV: segmentation violation code=0x1 addr=0x90 pc=0x518949]
2024-02-16 14:08:32 
2024-02-16 14:08:32 goroutine 38 [running]:
2024-02-16 14:08:32 regexp.(*Regexp).doExecute(0x28?, {0x0?, 0x0?}, {0xc0002598c0?, 0xc000259865?, 0x4?}, {0x0?, 0x2d?}, 0x28?, 0x0, ...)
2024-02-16 14:08:32     /usr/local/go/src/regexp/exec.go:527 +0x89
2024-02-16 14:08:32 regexp.(*Regexp).doMatch(...)
2024-02-16 14:08:32     /usr/local/go/src/regexp/exec.go:514
2024-02-16 14:08:32 regexp.(*Regexp).Match(...)
2024-02-16 14:08:32     /usr/local/go/src/regexp/regexp.go:539
2024-02-16 14:08:32 github.com/cosmtrek/air/runner.(*Engine).isExcludeRegex(0xc000246000?, {0xc000259860, 0x2d})
2024-02-16 14:08:32     /go/pkg/mod/github.com/cosmtrek/[email protected]/runner/util.go:149 +0xcb
2024-02-16 14:08:32 github.com/cosmtrek/air/runner.(*Engine).watchPath.func1()
2024-02-16 14:08:32     /go/pkg/mod/github.com/cosmtrek/[email protected]/runner/engine.go:255 +0x3c9
2024-02-16 14:08:32 created by github.com/cosmtrek/air/runner.(*Engine).watchPath in goroutine 1
2024-02-16 14:08:32     /go/pkg/mod/github.com/cosmtrek/[email protected]/runner/engine.go:222 +0x24e

Simply re-running the container seemingly fixed the bug, so it seems like a one-off, however is something you probably would like to be aware of.

@carinabquiroz
Copy link

carinabquiroz commented Jul 29, 2024

I've been running into this issue relatively often as well. Did you happen to find a fix or workaround?

@jonwalz
Copy link

jonwalz commented Aug 11, 2024

Also stuck by this.

@cosmtrek
Copy link
Collaborator

@ChrysmOre hi, could you give more details to help me reproduce it?

@xiantang
Copy link
Collaborator

#677 fixed

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

No branches or pull requests

5 participants