GithubHelp home page GithubHelp logo

Comments (4)

Wilfred avatar Wilfred commented on June 2, 2024 1

Merging into #688, thanks for the report!

from difftastic.

Krinkle avatar Krinkle commented on June 2, 2024
RUST_BACKTRACE=1 RUST_BACKTRACE=full difft blog/jquery/ jquery-wp-content/themes/jquery/
thread 'main' panicked at src/display/side_by_side.rs:488:58:
index out of bounds: the len is 281 but the index is 281
stack backtrace:
   0:        0x102e85ae4 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h6e13e5c1f43a2491
   1:        0x102c9625c - core::fmt::write::ha2c1956860377338
   2:        0x102e8bf80 - std::io::Write::write_fmt::ha4b28c52ceab65a6
   3:        0x102e858d8 - std::sys_common::backtrace::print::h479f79ccc1585c96
   4:        0x102e9b09c - std::panicking::default_hook::{{closure}}::h3432bfbcced8e86b
   5:        0x102e9adb8 - std::panicking::default_hook::h0a224004d0f52354
   6:        0x102e9b4ec - std::panicking::rust_panic_with_hook::h0a46a8ecc3586611
   7:        0x102e8606c - std::panicking::begin_panic_handler::{{closure}}::hafb87b136ffd6947
   8:        0x102e85d28 - std::sys_common::backtrace::__rust_end_short_backtrace::h35ccaf072a47767f
   9:        0x102e9b288 - _rust_begin_unwind
  10:        0x103666b78 - core::panicking::panic_fmt::h11c5b4b324cc1c7c
  11:        0x103666cd0 - core::panicking::panic_bounds_check::hc32fa3cf74afc646
  12:        0x102d158f8 - difft::display::side_by_side::print::h89ef2d4f6f4c33bb
  13:        0x102cc7c14 - difft::print_diff_result::hacca16cc5ae65f90
  14:        0x102cc0488 - std::panicking::try::h05eefcd74c88f1da
  15:        0x102cb6a40 - std::thread::scoped::scope::he2f7263efb18026e
  16:        0x102cc48dc - difft::main::hc24eec628cb9e943
  17:        0x102ccecc0 - std::sys_common::backtrace::__rust_begin_short_backtrace::hb7290b100c936322
  18:        0x102cea768 - std::rt::lang_start::{{closure}}::h4506ff0be546a910
  19:        0x102e9b190 - std::panicking::try::h339e50e350ac9bf3
  20:        0x102e87bc0 - std::rt::lang_start_internal::ha7854c9dc8ed1474
  21:        0x102cc7f9c - _main
thread '<unnamed>' panicked at src/main.rs:284:38:
Receiver should be connected: SendError { .. }
stack backtrace:
   0:        0x102e85ae4 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h6e13e5c1f43a2491
   1:        0x102c9625c - core::fmt::write::ha2c1956860377338
   2:        0x102e8bf80 - std::io::Write::write_fmt::ha4b28c52ceab65a6
   3:        0x102e858d8 - std::sys_common::backtrace::print::h479f79ccc1585c96
   4:        0x102e9b09c - std::panicking::default_hook::{{closure}}::h3432bfbcced8e86b
   5:        0x102e9adb8 - std::panicking::default_hook::h0a224004d0f52354
   6:        0x102e9b4ec - std::panicking::rust_panic_with_hook::h0a46a8ecc3586611
   7:        0x102e8606c - std::panicking::begin_panic_handler::{{closure}}::hafb87b136ffd6947
   8:        0x102e85d28 - std::sys_common::backtrace::__rust_end_short_backtrace::h35ccaf072a47767f
   9:        0x102e9b288 - _rust_begin_unwind
  10:        0x103666b78 - core::panicking::panic_fmt::h11c5b4b324cc1c7c
  11:        0x103666ff0 - core::result::unwrap_failed::h24fe7f07a22cd818
  12:        0x102ccec5c - std::sys_common::backtrace::__rust_begin_short_backtrace::h270b367dbe1c5372
  13:        0x102cd0524 - core::ops::function::FnOnce::call_once{{vtable.shim}}::hb2772cc423f7dcb4
  14:        0x102ea7dd8 - std::sys::pal::unix::thread::Thread::new::thread_start::he51aaef8aee5f8eb
  15:        0x19ae0ffa8 - __pthread_joiner_wake

from difftastic.

Krinkle avatar Krinkle commented on June 2, 2024

I can reproduce this with just the two license.txt files (the last file it diff'ed before the panic). Including when using --display=inline. I added this because there was oddly no right-hand side to the diff. Thinking it might make a difference in this mode.

If this has the same root cause, then this should narrow it down considerably. The trace does look a bit different.

$ RUST_BACKTRACE=1 RUST_BACKTRACE=full difft --display=inline -- blog/jquery/license.txt jquery-wp-content/themes/jquery/license.txt 
jquery/license.txt --- 1/2 --- Text
1                GNU GENERAL PUBLIC LICENSE
2                   Version 2, June 1991
3    
<cut>
279    
280                 END OF TERMS AND CONDITIONS
281    
thread 'main' panicked at src/display/inline.rs:115:38:
index out of bounds: the len is 281 but the index is 281
stack backtrace:
   0:        0x100d21ae4 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h6e13e5c1f43a2491
   1:        0x100b3225c - core::fmt::write::ha2c1956860377338
   2:        0x100d27f80 - std::io::Write::write_fmt::ha4b28c52ceab65a6
   3:        0x100d218d8 - std::sys_common::backtrace::print::h479f79ccc1585c96
   4:        0x100d3709c - std::panicking::default_hook::{{closure}}::h3432bfbcced8e86b
   5:        0x100d36db8 - std::panicking::default_hook::h0a224004d0f52354
   6:        0x100d374ec - std::panicking::rust_panic_with_hook::h0a46a8ecc3586611
   7:        0x100d2206c - std::panicking::begin_panic_handler::{{closure}}::hafb87b136ffd6947
   8:        0x100d21d28 - std::sys_common::backtrace::__rust_end_short_backtrace::h35ccaf072a47767f
   9:        0x100d37288 - _rust_begin_unwind
  10:        0x101502b78 - core::panicking::panic_fmt::h11c5b4b324cc1c7c
  11:        0x101502cd0 - core::panicking::panic_bounds_check::hc32fa3cf74afc646
  12:        0x100b5a4c8 - difft::display::inline::print::h2ee45b9e0c3ddfb0
  13:        0x100b63db4 - difft::print_diff_result::hacca16cc5ae65f90
  14:        0x100b6086c - difft::main::hc24eec628cb9e943
  15:        0x100b6acc0 - std::sys_common::backtrace::__rust_begin_short_backtrace::hb7290b100c936322
  16:        0x100b86768 - std::rt::lang_start::{{closure}}::h4506ff0be546a910
  17:        0x100d37190 - std::panicking::try::h339e50e350ac9bf3
  18:        0x100d23bc0 - std::rt::lang_start_internal::ha7854c9dc8ed1474
  19:        0x100b63f9c - _main

from difftastic.

jenrik avatar jenrik commented on June 2, 2024

I have encountered the same issue and made this small reproducer:

file a.yaml:

---
asdf: |-
  foo:
    foo:
      bar: b
      foo: a

  foo:

file b.yaml:

---
asdf: |-
  foo:
    foo:
      foo: a

  foo:

command used to provoke the error: difft a.yaml b.yaml

from difftastic.

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.