becheran / mlc

Check for broken links in markup files
MIT License
129 stars 17 forks source link

Mismatch between definition and access of `throttle` #81

Closed paulhazen closed 10 months ago

paulhazen commented 10 months ago

Describe the bug Usage of the --throttle (or -T) option causes a panic and fatal crash.

To Reproduce Steps to reproduce the behavior:

  1. Run mlc:
    mlc --root-dir ./ --match-file-extension --ignore-links "http://localhost:8080" --throttle 15 ./docs/

Expected behavior Expecting standard predicted output

Behavior observed Instead of output, the following is printed:

thread 'main' panicked at C:\Users\PaulPEW\.cargo\registry\src\index.crates.io-6f17d22bba15001f\clap_builder-4.4.7\src\parser\error.rs:32:9:
Mismatch between definition and access of `throttle`. Could not downcast to TypeId { t: 25882202575019293479932656973818029271 }, need to downcast to TypeId { t: 96503125482807615452342895184004937604 }

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Turning on RUST_BACKTRACE=1 and in PowerShell, I get the following more complete output:

thread 'main' panicked at C:\Users\PaulPEW\.cargo\registry\src\index.crates.io-6f17d22bba15001f\clap_builder-4.4.7\src\parser\error.rs:32:9:
Mismatch between definition and access of `throttle`. Could not downcast to TypeId { t: 25882202575019293479932656973818029271 }, need to downcast to TypeId { t: 96503125482807615452342895184004937604 }

stack backtrace:
   0:     0x7ff73cd055ca - <unknown>
   1:     0x7ff73cd218cb - <unknown>
   2:     0x7ff73cd009e1 - <unknown>
   3:     0x7ff73cd0534a - <unknown>
   4:     0x7ff73cd07aea - <unknown>
   5:     0x7ff73cd07758 - <unknown>
   6:     0x7ff73cd0819e - <unknown>
   7:     0x7ff73cd0808d - <unknown>
   8:     0x7ff73cd05fb9 - <unknown>
   9:     0x7ff73cd07d90 - <unknown>
  10:     0x7ff73cd39b75 - <unknown>
  11:     0x7ff73c9d05cc - <unknown>
  12:     0x7ff73c99d2e3 - <unknown>
  13:     0x7ff73c9bd8bc - <unknown>
  14:     0x7ff73c9b1601 - <unknown>
  15:     0x7ff73c9bb676 - <unknown>
  16:     0x7ff73c9bb68c - <unknown>
  17:     0x7ff73ccf9ee8 - <unknown>
  18:     0x7ff73c9b178c - <unknown>
  19:     0x7ff73cd29a7c - <unknown>
  20:     0x7ff8f1d7257d - BaseThreadInitThunk
  21:     0x7ff8f256aa78 - RtlUserThreadStart

Desktop (please complete the following information):

Additional context: It seems clear that the issue is being thrown by clap_builder-4.4.7, but it is unclear whether this is a bug in that crate, or whether the bug exists in how mlc implements usage of that crate.

It seems like this issue filed on clapper has some information in the thread about how to ameliorate the situation.

becheran commented 10 months ago

Fixed with #82