tehmoon / cryptocli

The ultimate tool for data transfer, manipulation and proxy.
MIT License
16 stars 2 forks source link

Panic in elasticsearch-put #12

Closed tehmoon closed 4 years ago

tehmoon commented 5 years ago

I got this panic:

creator@infrastructure:~$ seq 1 10 | bash json_lines.sh blih 1 2>/dev/null | ./cryptocli -- stdin -- line -- elasticsearch-put --index number --type number
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x69f6b2]

goroutine 51 [running]:
gopkg.in/olivere/elastic%2ev5.(*BulkIndexRequest).Source(0xc4202ca000, 0x2, 0xc420066010, 0x2, 0xc420252ea0, 0x69d65d)
        /home/moon/work/cryptocli/src/cryptocli/.go/src/gopkg.in/olivere/elastic.v5/bulk_index_request.go:236 +0x4e2
gopkg.in/olivere/elastic%2ev5.(*BulkService).estimateSizeInBytes(0xc4201ce0c0, 0xa67960, 0xc4202ca000, 0xc420066010)
        /home/moon/work/cryptocli/src/cryptocli/.go/src/gopkg.in/olivere/elastic.v5/bulk.go:155 +0x31
gopkg.in/olivere/elastic%2ev5.(*BulkService).EstimatedSizeInBytes(0xc4201ce0c0, 0xc4201ce0f8)
        /home/moon/work/cryptocli/src/cryptocli/.go/src/gopkg.in/olivere/elastic.v5/bulk.go:145 +0x8c
gopkg.in/olivere/elastic%2ev5.(*bulkWorker).commitRequired(0xc4200b4b80, 0xc420252f18)
        /home/moon/work/cryptocli/src/cryptocli/.go/src/gopkg.in/olivere/elastic.v5/bulk_processor.go:595 +0x5d
gopkg.in/olivere/elastic%2ev5.(*bulkWorker).work(0xc4200b4b80, 0xa6ac20, 0xc4200a0010)
        /home/moon/work/cryptocli/src/cryptocli/.go/src/gopkg.in/olivere/elastic.v5/bulk_processor.go:455 +0x2b6
created by gopkg.in/olivere/elastic%2ev5.(*BulkProcessor).Start
        /home/moon/work/cryptocli/src/cryptocli/.go/src/gopkg.in/olivere/elastic.v5/bulk_processor.go:306 +0x1d7

When trying to insert raw data without the raw flag.

tehmoon commented 4 years ago

Closing this after #30.