richardlehane / siegfried

signature-based file format identification
http://www.itforarchivists.com/siegfried
Apache License 2.0
225 stars 30 forks source link

0.5.0 - errors on osx 10.8 #2

Closed atomotic closed 10 years ago

atomotic commented 10 years ago

osx 10.8.5 go version go1.3.1 darwin/amd64

got this error (either the binary or a compiled one):

 ➜  Downloads  ./sf vagrant_1.6.5.dmg
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
    panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x18f8a4]

goroutine 16 [running]:
runtime.panic(0x357a40, 0x595044)
    /usr/local/go/src/pkg/runtime/panic.c:279 +0xf5
encoding/gob.catchError(0xc20805f1b8)
    /usr/local/go/src/pkg/encoding/gob/error.go:38 +0x8f
runtime.panic(0x357a40, 0x595044)
    /usr/local/go/src/pkg/runtime/panic.c:248 +0x18d
encoding/gob.allocate(0x65d208, 0x3662c0, 0x0, 0x1, 0x19d1a1)
    /usr/local/go/src/pkg/encoding/gob/decode.go:462 +0x54
encoding/gob.(*Decoder).decodeStruct(0xc20805f0e0, 0xc20817c940, 0xc208180380, 0x0, 0x1)
    /usr/local/go/src/pkg/encoding/gob/decode.go:497 +0x59
encoding/gob.func·004(0xc208075c80, 0xc208039b00, 0x0)
    /usr/local/go/src/pkg/encoding/gob/decode.go:903 +0x83
encoding/gob.(*Decoder).decodeArrayHelper(0xc20805f0e0, 0xc208039b00, 0x0, 0xc20817cbe0, 0x8, 0x3dc, 0x1, 0x6591b0, 0xc208179a50)
    /usr/local/go/src/pkg/encoding/gob/decode.go:573 +0x183
encoding/gob.(*Decoder).decodeSlice(0xc20805f0e0, 0x65d208, 0x290ea0, 0xc208039b00, 0xc208039a98, 0xc20817cbe0, 0x8, 0x0, 0x1, 0x6591b0, ...)
    /usr/local/go/src/pkg/encoding/gob/decode.go:676 +0x191
encoding/gob.func·003(0xc208188030, 0xc208039b00, 0xc208039a98)
    /usr/local/go/src/pkg/encoding/gob/decode.go:892 +0x102
encoding/gob.(*Decoder).decodeStruct(0xc20805f0e0, 0xc20817c6c0, 0xc208180140, 0xc208039a80, 0x1)
    /usr/local/go/src/pkg/encoding/gob/decode.go:519 +0x20d
encoding/gob.(*Decoder).decodeValue(0xc20805f0e0, 0xc200000046, 0x3793e0, 0xc208039a80, 0x0, 0x160)
    /usr/local/go/src/pkg/encoding/gob/decode.go:1248 +0x400
encoding/gob.(*Decoder).DecodeValue(0xc20805f0e0, 0x3793e0, 0xc208039a80, 0x0, 0x160, 0x0, 0x0)
    /usr/local/go/src/pkg/encoding/gob/decoder.go:229 +0x1ea
encoding/gob.(*Decoder).Decode(0xc20805f0e0, 0x3793e0, 0xc208039a80, 0x0, 0x0)
    /usr/local/go/src/pkg/encoding/gob/decoder.go:204 +0x279
github.com/richardlehane/siegfried/pkg/core/bytematcher.Load(0x65dab0, 0xc20802c700, 0x0, 0x0, 0x0, 0x0)
    /Users/richardlehane/Dropbox/programming/go/src/github.com/richardlehane/siegfried/pkg/core/bytematcher/bytematcher.go:42 +0x95
github.com/richardlehane/siegfried/pkg/pronom.Load(0xc208025140, 0x21, 0x358220, 0x0, 0x0)
    /Users/richardlehane/Dropbox/programming/go/src/github.com/richardlehane/siegfried/pkg/pronom/pronom.go:149 +0x69d
main.load(0xc208025140, 0x21, 0xc20801a780, 0x0, 0x0)
    /Users/richardlehane/Dropbox/programming/go/src/github.com/richardlehane/siegfried/cmd/sf/sf.go:110 +0x65
main.main()
    /Users/richardlehane/Dropbox/programming/go/src/github.com/richardlehane/siegfried/cmd/sf/sf.go:245 +0x7ea

goroutine 19 [finalizer wait]:
runtime.park(0x17720, 0x598688, 0x597109)
    /usr/local/go/src/pkg/runtime/proc.c:1369 +0x89
runtime.parkunlock(0x598688, 0x597109)
    /usr/local/go/src/pkg/runtime/proc.c:1385 +0x3b
runfinq()
    /usr/local/go/src/pkg/runtime/mgc0.c:2644 +0xcf
runtime.goexit()
    /usr/local/go/src/pkg/runtime/proc.c:1445

goroutine 17 [syscall]:
runtime.goexit()
    /usr/local/go/src/pkg/runtime/proc.c:1445
atomotic commented 10 years ago

works using the brew formula (and upgrading to go 1.3.3) https://github.com/mistydemeo/homebrew-digipres/blob/master/siegfried.rb

richardlehane commented 10 years ago

this looks to be a signature file (pronom.gob) issue: it may be because the brew formula installs the sig file to a different place than siegfried's default. I was intending to add a flag to override siegfried's home directory (e.g. sf -home /usr/share/siegfried) and will prioritise this to make life easier for this use case.