Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ncsixel_as_rgba: incorrect state is set following '-' #2787

Closed
waveplate opened this issue Jun 21, 2024 · 3 comments
Closed

ncsixel_as_rgba: incorrect state is set following '-' #2787

waveplate opened this issue Jun 21, 2024 · 3 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@waveplate
Copy link

oi, there seems to be another bug in ncsixel_as_rgba !

      }else if(*sx == '$'){
        x = 0;
        state = STATE_WANT_DATA;
      }else if(*sx == '-'){
        x = 0;
        y += 6;
        state = STATE_WANT_HASH;
      }else{

setting the state to STATE_WANT_DATA after the - command fixed it for me

or more concisely, since the state is already STATE_WANT_DATA at this point

      }else if(*sx == '$'){
        x = 0;
      }else if(*sx == '-'){
        x = 0;
        y += 6;
      }else{

the following sixel images will trigger the bug:

laughing.txt
red40.txt

been using notcurses for a little while now -- really great project :)

@waveplate waveplate added the bug Something isn't working label Jun 21, 2024
@dankamongmen dankamongmen self-assigned this Jun 21, 2024
@dankamongmen dankamongmen added this to the 3.1.0 milestone Jun 21, 2024
@dankamongmen
Copy link
Owner

good find! as you can see, this code has not been heavily used nor properly tested =].

i'm glad to hear you're liking the project. i'm hoping to do a release very soon that will wrap up these fixes.

@dankamongmen
Copy link
Owner

process_escape:2219:walk result on 99 (c): 1 386
handoff_initial_responses_late:1198:handing off initial responses
block_on_input:2457:blocking on input availability
block_on_input:2514:waiting on 1 fds (ibuf: 0/8192)
ncplane_new_internal:692:created new 64x132 plane "std" @ 0x0
ncsixel_as_rgba:172:invalid rle 1 + 1 > 1
ncvisual_from_sixel:809:failed converting sixel to rgba
===============================================================================
/home/dank/src/dankamongmen/notcurses/src/tests/sixels.cpp:17:
TEST CASE:  Sixels
  LoadBiggerSixel

/home/dank/src/dankamongmen/notcurses/src/tests/sixels.cpp:46: FATAL ERROR: REQUIRE( ncv ) is NOT correct!
  values: REQUIRE( nullptr )

===============================================================================
[doctest] test cases:  1 |  0 passed | 1 failed | 45 skipped
[doctest] assertions: 18 | 17 passed | 1 failed |
[doctest] Status: FAILURE!
[schwarzgerat](1) $ 

i'm reproducing this in unit tests now.

@dankamongmen
Copy link
Owner

Closed by #2788. Thanks a bunch, @waveplate !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants