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: open source file bug #17

Open
maha-hajja opened this issue Aug 15, 2022 · 2 comments
Open

Bug: open source file bug #17

maha-hajja opened this issue Aug 15, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@maha-hajja
Copy link
Contributor

maha-hajja commented Aug 15, 2022

Bug description

if you have a file-file pipeline, when you open the source file and write to it, you get an error
but if you only echo something into it... then it works fine

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x185ac22]
goroutine 96 [running]:
github.com/conduitio/conduit-connector-file.(*Source).Read(0xc000171801?, {0x38209a0, 0xc0001035c0})
/Users/mahahajja/go/pkg/mod/github.com/conduitio/[email protected]/source.go:57 +0xe2
github.com/conduitio/conduit-connector-sdk.(*sourcePluginAdapter).runRead(0xc0004fa8c0, {0x38209a0?, 0xc0001035c0?}, {0x3819ff8, 0xc0000d8940})
/Users/mahahajja/go/pkg/mod/github.com/conduitio/[email protected]/source.go:163 +0xf8
github.com/conduitio/conduit-connector-sdk.(*sourcePluginAdapter).Run.func1()
/Users/mahahajja/go/pkg/mod/github.com/conduitio/[email protected]/source.go:144 +0x72
gopkg.in/tomb%2ev2.(*Tomb).run(0xc0001d31d0, 0xc00016b290?)
/Users/mahahajja/go/pkg/mod/gopkg.in/[email protected]/tomb.go:163 +0x36
created by gopkg.in/tomb%2ev2.(*Tomb).Go
/Users/mahahajja/go/pkg/mod/gopkg.in/[email protected]/tomb.go:159 +0xee

note: this is reproduced using macOS Monterey / Version 12.5

Steps to reproduce

  1. create a file to file pipeline
  2. open the source file and write to it "not from the cmd"
  3. an error will occur

Version

v0.3.0-nightly.20220809-2-gc8b4e52-dirty darwin/amd64

@maha-hajja maha-hajja added the bug Something isn't working label Aug 15, 2022
@hariso
Copy link
Contributor

hariso commented Aug 15, 2022

@maha-hajja Is the source file initially empty? When you say:

when you open the source file and write to it, you get an error
but if you only echo something into it... then it works fine

so you open the file using an editor, and then you get the nil dereference, but when you use echo, it works as expected?

@maha-hajja
Copy link
Contributor Author

maha-hajja commented Aug 15, 2022

@hariso the source file could be initially empty or not.. either way, if you open it from an editor and add something, the pipeline would fail
using "echo" works as expected yes

@lovromazgon lovromazgon transferred this issue from ConduitIO/conduit Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants