linebender / linebender/tiny-skia

assertion failed in path.rs

Open
#167 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.6k
Forks
99
Avg merge
2h 52m
Merged PRs (30d)
1

Description

experienced on master also

input being

[Pos { x: 1221.5938, y: 534.0 }, Pos { x: 1224.7139, y: -693631800.0 }]
thread 'main' (30026) panicked at /home/.cargo/git/checkouts/tiny-skia-4fbce405cb081ac9/6943c20/src/scan/path.rs:221:13:
assertion failed: edges[curr_idx].last_y >= curr_y as i32
stack backtrace:
   0: __rustc::rust_begin_unwind
             at /rustc/254b59607d4417e9dffbc307138ae5c86280fe4c/library/std/src/panicking.rs:689:5
   1: core::panicking::panic_fmt
             at /rustc/254b59607d4417e9dffbc307138ae5c86280fe4c/library/core/src/panicking.rs:80:14
   2: core::panicking::panic
             at /rustc/254b59607d4417e9dffbc307138ae5c86280fe4c/library/core/src/panicking.rs:150:5
   3: tiny_skia::scan::path::walk_edges
   4: tiny_skia::scan::path::fill_path_impl
             at /home/.cargo/git/checkouts/tiny-skia-4fbce405cb081ac9/6943c20/src/scan/path.rs:188:5
   5: tiny_skia::scan::path_aa::fill_path_impl
             at /home/.cargo/git/checkouts/tiny-skia-4fbce405cb081ac9/6943c20/src/scan/path_aa.rs:120:5
   6: tiny_skia::scan::path_aa::fill_path
             at /home/.cargo/git/checkouts/tiny-skia-4fbce405cb081ac9/6943c20/src/scan/path_aa.rs:73:5
   7: tiny_skia::painter::<impl tiny_skia::pixmap::PixmapMut>::fill_path
             at /home/.cargo/git/checkouts/tiny-skia-4fbce405cb081ac9/6943c20/src/painter.rs:296:21
   8: tiny_skia::painter::<impl tiny_skia::pixmap::PixmapMut>::stroke_path
             at /home/.cargo/git/checkouts/tiny-skia-4fbce405cb081ac9/6943c20/src/painter.rs:445:18
   9: tiny_skia::painter::<impl tiny_skia::pixmap::Pixmap>::stroke_path
             at /home/.cargo/git/checkouts/tiny-skia-4fbce405cb081ac9/6943c20/src/painter.rs:149:14
  10: rupl::ui::Painter::line_segment
             at /home/.r/rupl/src/ui.rs:407:21
  11: rupl::<impl rupl::types::Graph>::draw_point

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/scan/path.rs around the assertion at line 221, then follow fill_path_impl and walk_edges from the reported stack trace. Reproduce the panic using the two Pos values in the issue through the stroke_path/fill_path path. Done means this input no longer panics and the relevant rendering behavior remains valid.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.