Giter Club home page Giter Club logo

Comments (4)

bestouff avatar bestouff commented on May 18, 2024

FWIW I've tested Gnome-Terminal and tilix (both are VTE-based).

from tui-rs.

bestouff avatar bestouff commented on May 18, 2024

Moreover, if I just replace chunks[2] with chunks[1] sometimes I see this panic:

thread 'main' panicked at 'attempt to add with overflow', /home/xav/.cargo/registry/src/github.com-1ecc6299db9ec823/tui-0.2.0/src/layout.rs:57:9
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::print
             at /checkout/src/libstd/sys_common/backtrace.rs:68
             at /checkout/src/libstd/sys_common/backtrace.rs:57
   2: std::panicking::default_hook::{{closure}}
             at /checkout/src/libstd/panicking.rs:381
   3: std::panicking::default_hook
             at /checkout/src/libstd/panicking.rs:397
   4: std::panicking::rust_panic_with_hook
             at /checkout/src/libstd/panicking.rs:577
   5: std::panicking::begin_panic
             at /checkout/src/libstd/panicking.rs:538
   6: std::panicking::begin_panic_fmt
             at /checkout/src/libstd/panicking.rs:522
   7: rust_begin_unwind
             at /checkout/src/libstd/panicking.rs:498
   8: core::panicking::panic_fmt
             at /checkout/src/libcore/panicking.rs:71
   9: core::panicking::panic
             at /checkout/src/libcore/panicking.rs:51
   10: tui::layout::Rect::right
             at /home/xav/.cargo/registry/src/github.com-1ecc6299db9ec823/tui-0.2.0/src/layout.rs:57
   11: tui::widgets::Widget::background
             at /home/xav/.cargo/registry/src/github.com-1ecc6299db9ec823/tui-0.2.0/src/widgets/mod.rs:54
   12: <tui::widgets::block::Block<'a> as tui::widgets::Widget>::draw
             at /home/xav/.cargo/registry/src/github.com-1ecc6299db9ec823/tui-0.2.0/src/widgets/block.rs:107
   13: <tui::terminal::Terminal<B>>::render
             at /home/xav/.cargo/registry/src/github.com-1ecc6299db9ec823/tui-0.2.0/src/terminal.rs:103
   14: tui::widgets::Widget::render
             at /home/xav/.cargo/registry/src/github.com-1ecc6299db9ec823/tui-0.2.0/src/widgets/mod.rs:65
   15: endmic::draw::{{closure}}
             at src/main.rs:361
   16: tui::layout::Group::render
             at /home/xav/.cargo/registry/src/github.com-1ecc6299db9ec823/tui-0.2.0/src/layout.rs:330
   17: endmic::draw
             at src/main.rs:352
   18: endmic::main::run
             at src/main.rs:344
   19: endmic::main
             at ./<main macros>:14
   20: std::rt::lang_start::{{closure}}
             at /checkout/src/libstd/rt.rs:74
   21: std::panicking::try::do_call
             at /checkout/src/libstd/rt.rs:59
             at /checkout/src/libstd/panicking.rs:480
   22: __rust_maybe_catch_panic
             at /checkout/src/libpanic_unwind/lib.rs:101
   23: std::rt::lang_start_internal
             at /checkout/src/libstd/panicking.rs:459
             at /checkout/src/libstd/panic.rs:365
             at /checkout/src/libstd/rt.rs:58
   24: std::rt::lang_start
             at /checkout/src/libstd/rt.rs:74
   25: main
   26: __libc_start_main
   27: _start

from tui-rs.

fdehau avatar fdehau commented on May 18, 2024

Thanks for the complete bug report. After some research, the problem is linked to the library used to compute the layout. When i'm getting the results back, the height of the second chunk is either 0 or a negative value which converted back to an unsigned integer leads to an overflow in latter computations (and thus the panic you exhibited). This kind of behavior seems to happen only when min and max constraints are mixed together. I fixed the panic and change the documentation to advertise a more reliable solution for the moment. However, I will certainly need more time to fix the root of the instability.

from tui-rs.

bestouff avatar bestouff commented on May 18, 2024

OK thanks.

from tui-rs.

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.