Bug 356455 - [YIYNOVA] Krita crashes immediately when some buttons on the remote hotkey keypad of Yiynova MVP20U+RH is pressed.
Summary: [YIYNOVA] Krita crashes immediately when some buttons on the remote hotkey ke...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tablets (tablet issues are only very rarely bugs in Krita!) (show other bugs)
Version: 2.9.10
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-10 03:34 UTC by wenhsinjen
Modified: 2016-06-16 12:05 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
attachment-4226-0.html (2.12 KB, text/html)
2015-12-10 10:10 UTC, wenhsinjen
Details
Tablet Debugging and backtrace of Krita crashes (185.43 KB, text/plain)
2015-12-11 14:08 UTC, wenhsinjen
Details
Tablet Debugging and backtrace of Krita crashes_02 (66.68 KB, text/plain)
2015-12-11 14:21 UTC, wenhsinjen
Details
patch (673 bytes, patch)
2015-12-13 14:46 UTC, Halla Rempt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wenhsinjen 2015-12-10 03:34:04 UTC
Krita functions properly with Yiynova MVP20U+RH with the pen that came with the monitor. But crashes immediately if some button on the new remote hotkey keypad is pressed. All the buttons reproduces crashes when pressed, *except the 2nd and the 3rd button* out of the 5 button line, which is below the circular scrolling buttons and counting from the circular scrolling buttons. The remote seems to be harmless to Ubuntu, I also opened GIMP and pressed the buttons inside GIMP ,but that did not crash GIMP.

Reproducible: Always

Steps to Reproduce:
1. open Krita
2. create a new document
3. press any buttons except the 2nd and the 3rd button on the remote.

Actual Results:  
Krita window dissapears, "Krita-The KDE Crash Handler" window pops up immediately. With 
Details saying "Executable: krita PID:6642 Signal: Segmentation fault(11) Time:...."

Expected Results:  
It should have perhaps only received a button press + release event but do nothing else.

Ubuntu 14.04 LTS
Memory 19.5 GiB
Processor AMD Phenom(tm) II X4 955 Processor x4
Graphics GeForce GTX 970/PCIe/SSE2
OS type 64-bit
Disk 974.4 GB
**************************************
Yiynova tablet monitor MVP20U+RH link:
http://www.yiynova.idv.tw/ProductsIncon.aspx?para01=MVP20URH
Comment 1 wenhsinjen 2015-12-10 03:40:23 UTC
Im using DIGIMend kernel driver "digimend-dkms_6_all.deb" for the tablet monitor.
link here:
https://github.com/DIGImend/digimend-kernel-drivers/releases/tag/v6
Comment 2 Halla Rempt 2015-12-10 06:29:17 UTC
Hi,

Thanks for your report. Krita 2.8 is very old, though. Could you check whether this issue still happens with Krita 2.9? You can install it the lime repo: with https://launchpad.net/~dimula73/+archive/ubuntu/krita .
Comment 3 wenhsinjen 2015-12-10 10:10:36 UTC
Created attachment 95967 [details]
attachment-4226-0.html

I tried installing this build, see link below, however this build file is
rejected by the Ubuntu apt
"dependency is not satisfiable"

https://launchpad.net/~dimula73/+archive/ubuntu/krita/+build/8413495

this, even though this package is supposed to be fore ubuntu 14.04.

On Thu, Dec 10, 2015 at 2:29 PM, Boudewijn Rempt via KDE Bugzilla <
bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=356455
>
> Boudewijn Rempt <boud@valdyas.org> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>          Resolution|---                         |WAITINGFORINFO
>                  CC|                            |boud@valdyas.org
>              Status|UNCONFIRMED                 |NEEDSINFO
>
> --- Comment #2 from Boudewijn Rempt <boud@valdyas.org> ---
> Hi,
>
> Thanks for your report. Krita 2.8 is very old, though. Could you check
> whether
> this issue still happens with Krita 2.9? You can install it the lime repo:
> with
> https://launchpad.net/~dimula73/+archive/ubuntu/krita .
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
> You reported the bug.
>
Comment 4 wenhsinjen 2015-12-11 04:58:41 UTC
I just installed Krita with the dimula73 ppa. Now running Krita 2.9.10. The crashes still happens immediately with the following steps:
Steps to Reproduce:
1. open Krita
2. create a new document
3. select one of these tools (free hand brush, dynamic brush, multi brush, gradient, bezier curve)
4. press any buttons except the 2nd and the 3rd button on the remote.

*the 2nd button seems to act as the middle mouse button, activates panning, and it works fine.
*the 3rd button function as the right mouse button, brings up the pie menu, also works fine.
Comment 5 Halla Rempt 2015-12-11 12:01:09 UTC
Well, then we must figure out what those buttons are sending... Try starting Krita 
on the command line, and press crtl-shift-t to enable tablet debugging. Press those
buttons and attach the output here.
Comment 6 Halla Rempt 2015-12-11 12:01:36 UTC
Oh, and try to attach the backtrace of the crash, too!
Comment 7 wenhsinjen 2015-12-11 14:08:58 UTC
Created attachment 95996 [details]
Tablet Debugging and backtrace of Krita crashes

I tested the remote with GDB and Tablet Debugging running.
In the attachment are button presses of First, fourth, fifth and scroll center button. Krita crashes instantly with just one press of any of these buttons.
Comment 8 wenhsinjen 2015-12-11 14:21:42 UTC
Created attachment 95997 [details]
Tablet Debugging and backtrace of Krita crashes_02

This time I first presses the 2 buttons that does not cause crashes, then at last pressed one of the buttons which causes crashes.
Comment 9 Halla Rempt 2015-12-12 14:00:06 UTC
Hm, that's interesting. The crash is an assert in the display code that happens because we get a NaN for one of the parameters. We can check for that, but I would really like to know what this tablet is actually sending to Krita. Unfortunately that isn't in the log.
Comment 10 wenhsinjen 2015-12-12 16:18:12 UTC
Should I run xinput --dump /dev/...   and report to you the key-codes on ubuntu-linux?

I have done this already, all the buttons report some code, and could in principle be mapped to something useful in Krita.
Comment 11 Halla Rempt 2015-12-13 14:41:56 UTC
Hm, yes... But what's really needed is figuring out where the NaN parameters come from. That is rather involved though, and means you'd have to put a breakpoint in krita/ui/tool/strokes/freehand_stroke.cpp:76 and check at which point we get the invalid data. Is that something you could try? If so, if you could join us on irc, we might be able to help you.
Comment 12 Halla Rempt 2015-12-13 14:46:17 UTC
Created attachment 96037 [details]
patch

You could also try to apply this patch. It doesn't fix what's wrong with the input from the tablet, but it should fix the crash.
Comment 13 Halla Rempt 2015-12-13 14:59:37 UTC
Git commit e749f160150a3d14ff0bfaad32607e17886b80fb by Boudewijn Rempt.
Committed on 13/12/2015 at 14:46.
Pushed by rempt into branch 'master'.

The Yiynova MVP20U+RH has hotkeys that generate some broken input,
and this patch corrects that down the line. I still want to know
what is broken, though.

M  +8    -0    krita/plugins/paintops/libpaintop/kis_dab_cache.cpp

http://commits.kde.org/krita/e749f160150a3d14ff0bfaad32607e17886b80fb
Comment 14 Halla Rempt 2015-12-13 15:03:39 UTC
Git commit fc534a1f8bd2f6ed9e0b350d960d94fe38d4036e by Boudewijn Rempt.
Committed on 13/12/2015 at 15:03.
Pushed by rempt into branch 'calligra/2.9'.

The Yiynova MVP20U+RH has hotkeys that generate some broken input,
and this patch corrects that down the line. I still want to know
what is broken, though.

M  +8    -0    krita/plugins/paintops/libpaintop/kis_dab_cache.cpp

http://commits.kde.org/calligra/fc534a1f8bd2f6ed9e0b350d960d94fe38d4036e
Comment 15 wenhsinjen 2015-12-17 17:13:32 UTC
**Krita_testing: test01**
Hi, finally got down to testing the Krita_testing version.
"krita-testing_2+git20151214+r45-61~ubuntu14.04.1_amd64.deb (36.0 MiB)"
https://code.launchpad.net/~dimula73/+archive/ubuntu/krita/+build/8438324

1.
Good news is, pressing the buttons does not crash Krita anymore. But something is wrong, the first few times I tried, krita froze after pressing the button, and the viewport turns into some transparency thingy state, but comes back to somewhat normal state.. see url video 001. But it only happened in the first few times, I can no longer replicate this effect.
VIDEO 001:(might be hard to see , sorry ...)
https://youtu.be/NaAMUkvBdlc
2.
I can however replicate a "pixelation with white edge" effect which only occurs after button presses.
See video 002:
https://youtu.be/p6ToT7xATMA
Comment 16 Halla Rempt 2016-06-16 12:05:13 UTC
Hi,

I'm actually not sure what I see on that video. In any case, it's irrelevant for this bug report. If it still occurs with 3.0, please create a new bug report.