Git Product home page Git Product logo

Comments (7)

muesli avatar muesli commented on May 18, 2024

Looking into that tonight. Looks like a stupid progressbar mis-calculation. I assume this works when gzip-compression is disabled?

from knoxite.

flibustenet avatar flibustenet commented on May 18, 2024

Yes, it works without gzip-compression (on the same directory of course)
It fail only on some files (maybe because they are smalls ?). I can dig alone next week if needed...

from knoxite.

muesli avatar muesli commented on May 18, 2024

I have a hunch this probably happens when the compressed output is larger than the uncompressed data. Which might happen on very small files indeed. We should probably also detect that and prefer the uncompressed version for such files (and such files only).

from knoxite.

muesli avatar muesli commented on May 18, 2024

Thanks for the report again! If you could confirm this is now working for you, we would very much appreciate that :)

from knoxite.

flibustenet avatar flibustenet commented on May 18, 2024

I confirm, it's ok now !

from knoxite.

flibustenet avatar flibustenet commented on May 18, 2024

Sorry, it crash again finally.
You can reproduce it with a file with 'xxx' for example.

mkdir empty
cd empty
echo "xxx">vide
knoxite -r /tmp/knx -p x store latest . -c gzip

empty                                                                                                                    28B / 4B panic: runtime error: makeslice: len out of range          
Overall Progress                                                                                                          0B / 4B [#>-----------------------------------------------]   0.00%
goroutine 1 [running]:
panic(0x801a60, 0xc4204cc150)
    /usr/local/go/src/runtime/panic.go:500 +0x1a1
strings.Repeat(0xc4204df4b0, 0x1, 0xfffffffffffffeda, 0x1, 0x156)
    /usr/local/go/src/strings/strings.go:420 +0x49
github.com/muesli/goprogressbar.(*ProgressBar).Print(0xc4204df828)
    /home/wilk/go/src/github.com/muesli/goprogressbar/progressbar.go:87 +0x5df
main.CmdStore.store(0x0, 0x0, 0x7ffda72ba5bc, 0x4, 0x0, 0x0, 0x0, 0xa76f20, 0xc4204dfb18, 0xc420087440, ...)
    /home/wilk/go/src/github.com/knoxite/knoxite/knoxite/store.go:103 +0x7e3
main.CmdStore.Execute(0x0, 0x0, 0x7ffda72ba5bc, 0x4, 0x0, 0x0, 0x0, 0xa76f20, 0xc420087320, 0x2, ...)
    /home/wilk/go/src/github.com/knoxite/knoxite/knoxite/store.go:157 +0x52d
main.(*CmdStore).Execute(0xc420018780, 0xc420087320, 0x2, 0x9, 0x1, 0x0)
    <autogenerated>:3 +0x8a
github.com/jessevdk/go-flags.(*Parser).ParseArgs(0xc420066480, 0xc42000c0b0, 0x9, 0x9, 0x41af78, 0x50, 0x841880, 0x1, 0xc420016910)
    /home/wilk/go/src/github.com/jessevdk/go-flags/parser.go:316 +0x8e6
github.com/jessevdk/go-flags.(*Parser).Parse(0xc420066480, 0xc420016910, 0x2, 0x2, 0xc42013be90, 0xc400000000)
    /home/wilk/go/src/github.com/jessevdk/go-flags/parser.go:186 +0x74
main.main()
    /home/wilk/go/src/github.com/knoxite/knoxite/knoxite/main.go:51 +0x1c9

from knoxite.

muesli avatar muesli commented on May 18, 2024

Sorry for the regression, but this should be fixed for good now. Although being a good indicator that something was incorrectly calculated, I might additionally add checks to the progress-bar implementation to prevent this from ever panic'ing again.

from knoxite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.