f2 icon indicating copy to clipboard operation
f2 copied to clipboard

exiftool - fatal error: all goroutines are asleep - deadlock

Open d-Rickyy-b opened this issue 2 years ago • 2 comments

As I was trying to use the exiftool, it seems that I broke your tool (again) :D. I am using Windows and installed the exiftool via chocolatey (choco install exiftool). Maybe It's because of the way I installed exiftool. Are there instructions for installing exiftool on Windows?

PS > f2 -r '{{xt.Title}} by {{xt.Creator}}{{ext}}'
fatal error: all goroutines are asleep - deadlock!

goroutine 1 [select]:
io.(*pipe).read(0xc00002a300, {0xc00014106f, 0xf91, 0x9?})
        C:/Program Files/Go/src/io/pipe.go:57 +0xb1
io.(*PipeReader).Read(0xc000141000?, {0xc00014106f?, 0x1000?, 0x201300?})
        C:/Program Files/Go/src/io/pipe.go:136 +0x25
bufio.(*Scanner).Scan(0xc00009b980)
        C:/Program Files/Go/src/bufio/scan.go:214 +0x876
github.com/barasher/go-exiftool.(*Exiftool).ExtractMetadata(0xc000136fc0, {0xc00010f2f8, 0x1, 0xc00010f250?})
        C:/Users/Rico/go/pkg/mod/github.com/barasher/[email protected]/exiftool.go:131 +0x3d6
github.com/ayoisaiah/f2/src.replaceExifToolVariables({0xc000010cf0, 0x22}, {0xc000016d68, 0x12}, {{0xc000162000, 0x2, 0xa}, {0xc0000f16e0, 0x2, 0x2}})
        C:/Users/Rico/go/pkg/mod/github.com/ayoisaiah/[email protected]/src/variables.go:666 +0xfc
github.com/ayoisaiah/f2/src.(*Operation).replaceVariables(0xc000049a00, 0xc00010f838, 0xc00010f908)
        C:/Users/Rico/go/pkg/mod/github.com/ayoisaiah/[email protected]/src/variables.go:884 +0x4ef
github.com/ayoisaiah/f2/src.(*Operation).replace(0xc000049a00)
        C:/Users/Rico/go/pkg/mod/github.com/ayoisaiah/[email protected]/src/replace.go:643 +0x23a
github.com/ayoisaiah/f2/src.(*Operation).handleReplacementChain(0xc000049a00)
        C:/Users/Rico/go/pkg/mod/github.com/ayoisaiah/[email protected]/src/operation.go:572 +0x9e
github.com/ayoisaiah/f2/src.(*Operation).run(0xc000049a00)
        C:/Users/Rico/go/pkg/mod/github.com/ayoisaiah/[email protected]/src/operation.go:632 +0xaf
github.com/ayoisaiah/f2/src.newApp.func1(0xc000061740)
        C:/Users/Rico/go/pkg/mod/github.com/ayoisaiah/[email protected]/src/app.go:359 +0x2c9
github.com/urfave/cli/v2.(*App).RunContext(0xc00013e000, {0x68c530?, 0xc00000e0d0}, {0xc000060040, 0x3, 0x4})
        C:/Users/Rico/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:315 +0x9f5
github.com/urfave/cli/v2.(*App).Run(...)
        C:/Users/Rico/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:215
main.main()
        C:/Users/Rico/go/pkg/mod/github.com/ayoisaiah/[email protected]/cmd/f2/main.go:14 +0x65

d-Rickyy-b avatar Dec 19 '22 02:12 d-Rickyy-b

Thank you for reporting this. I will try to reproduce and see what the problem could be

ayoisaiah avatar Dec 19 '22 07:12 ayoisaiah

I've been able to reproduce the problem.

image

Seems to be Windows specific as it works fine on Linux with the same file.

image

It's likely an issue with the underlying library I'm using. Will investigate further and update this when a resolution is reached.

ayoisaiah avatar Dec 19 '22 21:12 ayoisaiah

I'm unable to reproduce this anymore with the latest version

ayoisaiah avatar May 11 '24 08:05 ayoisaiah