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

Leftover stroke end on canvas update under certain conditions #1196

Closed
Jose-Moreno opened this issue Mar 18, 2019 · 7 comments
Closed

Leftover stroke end on canvas update under certain conditions #1196

Jose-Moreno opened this issue Mar 18, 2019 · 7 comments

Comments

@Jose-Moreno
Copy link
Member

@Jose-Moreno Jose-Moreno commented Mar 18, 2019

Issue Summary

There is currently a leftover brush stroke "line terminator / end" pending canvas update when disabling pressure checkbox for the following tools:

  • Pen tool
  • Brush tool
  • Pencil tool
  • Eraser (only visible if you erase outside the camera bounds)

The leftover appears when using the "Clear Frame" action, creating a new frame or deleting the current frame. This only happens when using the stylus.

Workaround is "forcibly" updating the canvas by using the eraser and clicking on canvas with it.

Expected Results

Such stroke ends should not be visible after updating the canvas when erasing or performing keyframe operations.

@CandyFace performed recently a PR Fix on #1181 that seems related to this, since the original issue was much broader (it appeared regardless of pressure but using stylus) but this case appears to be very particular (disabling the pressure checkbox only activates the bug)

Video or Image Reference

Making a stroke using Pen tool, no pressure
image

Using the "Clear Frame" action to clear the canvas
image

Steps to reproduce

  1. Open Pencil2D
  2. Select any drawing tool with a pressure checkbox (I used Pen tool in my test)
  3. Make a reference stroke with the pressure checkbox enabled.
  4. Delete the reference stroke using the Clear Frame command or make a new keyframe
  5. Next disable the pressure checkbox on the tool
  6. Draw a new line normally
  7. Clear the frame or create a new keyframe. Compare the results

System Information

  • Pencil2D Version:

Version: 0.6.3
Operating System: Windows 7 SP 1 (6.1)
CPU Architecture: x86_64

@scribblemaniac
Copy link
Member

@scribblemaniac scribblemaniac commented Apr 19, 2019

I cannot reproduce this. @Jose-Moreno Does this occur only when you are using your problematic tablet or does this occur when you use the mouse too?

@Jose-Moreno
Copy link
Member Author

@Jose-Moreno Jose-Moreno commented Apr 19, 2019

@scribblemaniac Since this must be a leftover from the original "reed & friends" issue we tested it back then, it should only happen under windows then (I forgot the label, oops).

I understand wanting to pin this on my tablet, but another person mentioned they had the same issue (un-erasable stroke) a few weeks after I reported this, on 0.6.3.

Strangely It only happens when the pressure checkbox is turned off, as I described, and It doesn't happen with the mouse, only with the tablet input. I didn't bump this too much mainly because even though it's annoying, the chances of people using their tablet input without pressure on windows was low.

@scribblemaniac
Copy link
Member

@scribblemaniac scribblemaniac commented May 3, 2019

@Jose-Moreno When the new new nightly build comes out for Windows (or if you wish to build the current master branch), can you please retest this? We haven't done anything to address this issue directly, but I fixed another issue with the same result, so there is a chance this was fixed too.

@Jose-Moreno
Copy link
Member Author

@Jose-Moreno Jose-Moreno commented May 3, 2019

@scribblemaniac Sure thing I'll test it as soon as I'm able and report back.

@Jose-Moreno
Copy link
Member Author

@Jose-Moreno Jose-Moreno commented May 5, 2019

@scribblemaniac I compiled the latest code available today, May 4th, but the specific stroke issue isn't solved. It keeps happening only when the pressure checkbox is unchecked and only when using a graphics tablet, as per my initial report. As soon as I use the mouse, It allows me for some reason to delete the leftover stroke normally. I keep using clean frame command, but the eraser "refresh also deletes the stroke even if the cursor is not over the stroke.

@scribblemaniac
Copy link
Member

@scribblemaniac scribblemaniac commented May 5, 2019

@Jose-Moreno Alright thanks for testing.

@Jose-Moreno
Copy link
Member Author

@Jose-Moreno Jose-Moreno commented Aug 20, 2020

[2020] Ok I'm now using Windows 10, and while this issue is difficult to reproduce sometimes it's still there.

Unfortunately I've found a sure fire way to have it happen by enabling the Windows 7 compatibility (which for reasons yet unknown is required so the pressure sensitivity is recognized if Windows Ink is turned off on the wacom driver settings). Other than that the reproduction steps and everything else still stands.

It seems that while under this compatibility mode Pencil2D will lag a bit more than usual compared to not having that, and the described problem will appear without fail.

I mentioned this before but from observation it seems to be related to how stroke computations occur, and probably the order of tablet input events. I'm not sure if the stroke points are being queued into a vector or something before being rendered but it's awfully weird that it's always the last input that seems to escape the input and gets left behind on the canvas "buffer"

@Jose-Moreno Jose-Moreno added this to Medium priority in Bug Fix Priority Aug 30, 2020
@CandyFace CandyFace closed this in 5c8f2da Sep 8, 2020
Bug Fix Priority automation moved this from Medium priority to Closed Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Bug Fix Priority
  
Closed
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants