This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Tablet offset bug -- Interesting fix found.

Tags: None
(comma "," separated)
conradgea
Registered Member
Posts
5
Karma
0
So my thought is, maybe the "fix" I found exposes some underlying issue with the way Krita is programmed.

I have two workstations, a laptop and a desktop which are rigged up with a Ugee HK1650 pen display, and a normal monitor each. Krita plays nice with the Ugee HK1650 if it is in sole monitor mode, but becomes offset if the systems are in extended desktop mode.

Now here's the interesting part.

In multi-monitor situations, how I open Krita makes all the difference between a functional pen display tablet, and one that refuses to accept any adjustments to offsets or wintab/driver choices.

Case A.) Open Krita with mouse. Create new document or load a document with mouse. Pick up stylus, touch stylus to screen. Immediately I am asked if I want to listen to wintab, the tablet drivers, or set my own resolution and offset. No matter which I chose, the offset of the mouse is always wrong and about -1600~2000 pixels on X. Attempts to change Y do nothing. This indicates that the selections are being ignored/not applied, somehow, when made this late into the usage cycle of a Krita document.

Case B.) The fix. As silly as this sounds, I open Krita with my stylus. Immediately, Krita's loading logo is interrupted by asking me the same popup. Wintab, tablet drivers, or custom offset. Only now, X and Y offsets are obeyed. Choosing wintab or the drivers, is obeyed. Calibrations are obeyed. I can draw normally and my cursor tracks my stylus accurately. This means that if the stylus logic is addressed early in the Krita software loading up, it is obeyed and applied correctly. In fact, Krita will not finish loading until I make my choice.

Most excitingly, this might explain why some users are unable to reliably duplicate the bug. It would be quite normal for many artists to open Krita with their stylus or operate without a mouse entirely. This might explain the mystery of why some users with the same hardware do or do not experience the bug.

Environment: Windows 10 creators update / Windows 10 professional creators update.
Chipsets: An I5 Mobile and an I5 desktop
Graphics: Intel/GeForce on system A, and Geforce on system B
Ram: 8GB and 16GB
HD: SSD in both cases.
Tablet: Ugee HK1560 display digitizer, in multi-monitor system, stylus constrained to it's own screen only.
Krita version: 3.2 beta 2
conradgea
Registered Member
Posts
5
Karma
0
If anyone wants to walk me through what I should file this "Solution" to on the bug tracker, please let me know. There were already a ton of bugs submitted for unrelenting stylus offset problems and I figured my bug report would be more noise in the system.
alvinwong
Registered Member
Posts
117
Karma
0
OS
It would be interesting to see the debug output for both cases.

Would you be able to install DebugView (https://docs.microsoft.com/en-us/sysinternals/downloads/debugview)? For both cases, start DebugView, then start Krita, use the stylus, confirm the tablet resolution and offset, and then save the log from DebugView.
conradgea
Registered Member
Posts
5
Karma
0
Trouble is, that isn't designed for windows 10. It will not give me kernel debug messages or pass-through messages according to the warning message I got when I attempted to use it because it couldn't access specific things in the windows 32 directory that it wanted. In anycase, here's what I got. Broken case first.
00000001 5:31:42 AM [6108] d:\rs2\shellcommon\shell\windows.ui.shell\actioncenter\product\common\imageutilities.cpp(325)\Windows.UI.ActionCenter.dll!00007FFCE6A75608: (caller: 00007FFCE6A4D72D) LogHr(29) tid(2f9c) 8000FFFF Catastrophic failure
00000002 5:31:45 AM [6108] Suspending
00000003 5:31:45 AM [10516] [05:05:31:45:790][ 2084] IGIESW s:\program files\krita (x64)\bin\krita.exe found in whitelist: NO
00000004 5:31:45 AM [10516] [05:05:31:45:791][ 2084] IGIWHW Game s:\program files\krita (x64)\bin\krita.exe found in whitelist: NO
00000005 5:31:45 AM [10516] No "breeze" available.
00000006 5:31:45 AM [10516] Set style "fusion"
00000007 5:31:45 AM [10516] OpenGL Info
00000008 5:31:45 AM [10516] Vendor: NVIDIA Corporation
00000009 5:31:45 AM [10516] Renderer: "GeForce GTX 1060 6GB/PCIe/SSE2"
00000010 5:31:45 AM [10516] Version: 4.5.0 NVIDIA 385.41
00000011 5:31:45 AM [10516] Shading language: 4.50 NVIDIA
00000012 5:31:45 AM [10516] Requested format: QSurfaceFormat(version 3.0, options QFlags(0x4), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior 2, swapInterval 0, profile 2)
00000013 5:31:45 AM [10516] Current format: QSurfaceFormat(version 4.5, options QFlags(0x4), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples 0, swapBehavior 2, swapInterval 1, profile 2)
00000014 5:31:45 AM [10516] Version: 4 . 5
00000015 5:31:45 AM [10516] Supports deprecated functions true
00000016 5:31:45 AM [10516] krita has opengl true
00000017 5:31:45 AM [10516] Setting XDG_DATA_DIRS "S:/Program Files/Krita (x64)/bin/../share"
00000018 5:31:45 AM [10516] Available translations QSet("da", "eu", "ast", "pt", "wa", "he", "bg", "mai", "sl", "sv", "ne", "is", "ta", "en_GB", "it", "ru", "ro", "ca", "et", "zh_CN", "hne", "vi", "th", "ms", "pa", "hi", "kk", "uz@cyrillic", "be", "hr", "cy", "tr", "es", "de", "fy", "uk", "ga", "lv", "gl", "oc", "zh_TW", "pt_BR", "nn", "mk", "nb", "ia", "xh", "tg", "ug", "br", "cs", "ar", "mr", "fi", "km", "sk", "nl", "eo", "pl", "se", "fr", "af", "ja", "nds", "en_US", "fa", "lt", "sq", "el", "uz", "bs", "ko", "hu", "ca@valencia")
00000019 5:31:45 AM [10516] Available domain translations QSet("da", "eu", "ast", "pt", "wa", "he", "bg", "mai", "sl", "sv", "ne", "is", "ta", "en_GB", "it", "ru", "ro", "ca", "et", "zh_CN", "hne", "vi", "th", "ms", "pa", "hi", "kk", "uz@cyrillic", "be", "hr", "cy", "tr", "es", "de", "fy", "uk", "ga", "lv", "gl", "oc", "zh_TW", "pt_BR", "nn", "mk", "nb", "ia", "xh", "tg", "ug", "br", "cs", "ar", "mr", "fi", "km", "sk", "nl", "eo", "pl", "se", "fr", "af", "ja", "nds", "en_US", "fa", "lt", "sq", "el", "uz", "bs", "ko", "hu", "ca@valencia")
00000020 5:31:45 AM [10516] Override language: ""
00000021 5:31:45 AM [10516] PATH "S:/Program Files/Krita (x64)/bin;S:/Program Files/Krita (x64)/lib;S:/Program Files/Krita (x64)/Frameworks;S:/Program Files/Krita (x64);C:\\ProgramData\\Oracle\\Java\\javapath;[[cut for privacy]]"
00000022 5:31:45 AM [10516] krita.tabletlog: Opened tablet context 0x101 on window 0xc2c0a changed packet queue size 32 -> 128
00000023 5:31:45 AM [10516] mincore\com\oleaut32\dispatch\ups.cpp(2128)\OLEAUT32.dll!00007FFD077B16A1: (caller: 00007FFD077A44B9) ReturnHr(1) tid(824) 8002801D Library not registered.
00000024 5:31:45 AM [10516] mincore\com\oleaut32\dispatch\ups.cpp(2128)\OLEAUT32.dll!00007FFD077B16A1: (caller: 00007FFD077A44B9) ReturnHr(2) tid(824) 8002801D Library not registered.
00000025 5:31:48 AM [10516] libpng warning: iCCP: too many profiles
00000026 5:31:48 AM [10516] libpng warning: iCCP: too many profiles
00000027 5:31:48 AM [10516] libpng warning: iCCP: too many profiles
00000028 5:31:48 AM [10516] libpng warning: iCCP: too many profiles
00000029 5:31:48 AM [10516] QLayout: Attempting to add QLayout "" to QWidget "", which already has a layout
00000030 5:31:48 AM [5756] avcore\npsm\localprovider\baseprovider\lib\baseprovider.cpp(604)\NPSMDesktopProvider.dll!00007FFCD62139A4: (caller: 00007FFCD6214113) ReturnHr(374) tid(1720) 80070490 Element not found.
00000031 5:31:48 AM [5756] onecore\base\appmodel\resourcepolicy\gameconfigstore\client\gameconfigstoreclient.cpp(104)\ResourcePolicyClient.dll!00007FFD0319BA6C: (caller: 00007FFCE999BA76) LogHr(45) tid(2858) 80070490 Element not found.


//////////////////// This is when I touched stylus to tablet screen and was given the option to choose interpretations of posistion data. //////////////////


00000032 5:31:57 AM [10516] libpng warning: iCCP: too many profiles
00000033 5:32:11 AM [10516] krita.tabletlog: # Getting current context data:
00000034 5:32:11 AM [10516] krita.tabletlog: lc.lcName = 0x5fba90
00000035 5:32:11 AM [10516] krita.tabletlog: lc.lcDevice = 0
00000036 5:32:11 AM [10516] krita.tabletlog: lc.lcInOrgX = 0
00000037 5:32:11 AM [10516] krita.tabletlog: lc.lcInOrgY = 0
00000038 5:32:11 AM [10516] krita.tabletlog: lc.lcInExtX = 34416
00000039 5:32:11 AM [10516] krita.tabletlog: lc.lcInExtY = 19359
00000040 5:32:11 AM [10516] krita.tabletlog: lc.lcOutOrgX = 0
00000041 5:32:11 AM [10516] krita.tabletlog: lc.lcOutOrgY = 0
00000042 5:32:11 AM [10516] krita.tabletlog: lc.lcOutExtX = 34416
00000043 5:32:11 AM [10516] krita.tabletlog: lc.lcOutExtY = -19359
00000044 5:32:11 AM [10516] krita.tabletlog: lc.lcSysOrgX = 1920
00000045 5:32:11 AM [10516] krita.tabletlog: lc.lcSysOrgY = 0
00000046 5:32:11 AM [10516] krita.tabletlog: lc.lcSysExtX = 1920
00000047 5:32:11 AM [10516] krita.tabletlog: lc.lcSysExtY = 1080
00000048 5:32:11 AM [10516] krita.tabletlog: Qt Desktop Geometry QRect(0,0 3840x1080)
00000049 5:32:11 AM [10516] qtDesktopRect = QRect(0,0 3840x1080)
00000050 5:32:11 AM [10516] wintabDesktopRect = QRect(1920,0 1920x1080)
00000051 5:32:11 AM [5756] onecore\base\appmodel\resourcepolicy\gameconfigstore\client\gameconfigstoreclient.cpp(104)\ResourcePolicyClient.dll!00007FFD0319BA6C: (caller: 00007FFCE999BA76) LogHr(46) tid(2cf4) 80070490 Element not found.
00000052 5:32:11 AM [5756] avcore\npsm\localprovider\baseprovider\lib\baseprovider.cpp(604)\NPSMDesktopProvider.dll!00007FFCD62139A4: (caller: 00007FFCD6214113) ReturnHr(375) tid(1720) 80070490 Element not found.


////////////////////////////// This was after selecting my option. //////////////////////////


00000053 5:32:25 AM [10516] krita.tabletlog: # Getting current context data:
00000054 5:32:25 AM [10516] krita.tabletlog: lc.lcName = 0x5f7de0
00000055 5:32:25 AM [10516] krita.tabletlog: lc.lcDevice = 0
00000056 5:32:25 AM [10516] krita.tabletlog: lc.lcInOrgX = 0
00000057 5:32:25 AM [10516] krita.tabletlog: lc.lcInOrgY = 0
00000058 5:32:25 AM [10516] krita.tabletlog: lc.lcInExtX = 34416
00000059 5:32:25 AM [10516] krita.tabletlog: lc.lcInExtY = 19359
00000060 5:32:25 AM [10516] krita.tabletlog: lc.lcOutOrgX = 0
00000061 5:32:25 AM [10516] krita.tabletlog: lc.lcOutOrgY = 0
00000062 5:32:25 AM [10516] krita.tabletlog: lc.lcOutExtX = 34416
00000063 5:32:25 AM [10516] krita.tabletlog: lc.lcOutExtY = -19359
00000064 5:32:25 AM [10516] krita.tabletlog: lc.lcSysOrgX = 1920
00000065 5:32:25 AM [10516] krita.tabletlog: lc.lcSysOrgY = 0
00000066 5:32:25 AM [10516] krita.tabletlog: lc.lcSysExtX = 1920
00000067 5:32:25 AM [10516] krita.tabletlog: lc.lcSysExtY = 1080
00000068 5:32:25 AM [10516] krita.tabletlog: Qt Desktop Geometry QRect(0,0 3840x1080)
00000069 5:32:25 AM [10516] qtDesktopRect = QRect(0,0 3840x1080)
00000070 5:32:25 AM [10516] wintabDesktopRect = QRect(1920,0 1920x1080)
00000071 5:32:26 AM [5756] avcore\npsm\localprovider\baseprovider\lib\baseprovider.cpp(604)\NPSMDesktopProvider.dll!00007FFCD62139A4: (caller: 00007FFCD6214113) ReturnHr(376) tid(1720) 80070490 Element not found.
00000072 5:32:45 AM [5756] avcore\npsm\localprovider\baseprovider\lib\baseprovider.cpp(604)\NPSMDesktopProvider.dll!00007FFCD62139A4: (caller: 00007FFCD6214113) ReturnHr(377) tid(1720) 80070490 Element not found.


Working case.
00000001 6:00:53 AM [7768] Suspending
00000002 6:00:54 AM [10712] [05:06:00:54:042][10724] IGIESW s:\program files\krita (x64)\bin\krita.exe found in whitelist: NO
00000003 6:00:54 AM [10712] [05:06:00:54:043][10724] IGIWHW Game s:\program files\krita (x64)\bin\krita.exe found in whitelist: NO
00000004 6:00:54 AM [10712] No "breeze" available.
00000005 6:00:54 AM [10712] Set style "fusion"
00000006 6:00:54 AM [10712] OpenGL Info
00000007 6:00:54 AM [10712] Vendor: NVIDIA Corporation
00000008 6:00:54 AM [10712] Renderer: "GeForce GTX 1060 6GB/PCIe/SSE2"
00000009 6:00:54 AM [10712] Version: 4.5.0 NVIDIA 385.41
00000010 6:00:54 AM [10712] Shading language: 4.50 NVIDIA
00000011 6:00:54 AM [10712] Requested format: QSurfaceFormat(version 3.0, options QFlags(0x4), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior 2, swapInterval 0, profile 2)
00000012 6:00:54 AM [10712] Current format: QSurfaceFormat(version 4.5, options QFlags(0x4), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples 0, swapBehavior 2, swapInterval 1, profile 2)
00000013 6:00:54 AM [10712] Version: 4 . 5
00000014 6:00:54 AM [10712] Supports deprecated functions true
00000015 6:00:54 AM [10712] krita has opengl true


////// Krita launched with stylus in hand, on screen surface, clicking shortcut. /////


00000016 6:00:54 AM [10712] Setting XDG_DATA_DIRS "S:/Program Files/Krita (x64)/bin/../share"
00000017 6:00:54 AM [10712] Available translations QSet("is", "hr", "ast", "oc", "hu", "lt", "pt_BR", "zh_CN", "bg", "es", "tr", "nl", "lv", "th", "hne", "it", "ar", "ia", "hi", "zh_TW", "ug", "se", "mk", "nds", "cs", "ro", "uz@cyrillic", "et", "wa", "ru", "nn", "mai", "ga", "pt", "pl", "cy", "en_US", "sq", "kk", "fy", "ko", "el", "br", "fr", "ca", "xh", "mr", "nb", "en_GB", "ca@valencia", "ta", "eu", "bs", "sk", "fa", "fi", "pa", "uk", "be", "km", "uz", "vi", "ms", "sv", "de", "eo", "ja", "he", "sl", "gl", "tg", "ne", "da", "af")
00000018 6:00:54 AM [10712] Available domain translations QSet("is", "hr", "ast", "oc", "hu", "lt", "pt_BR", "zh_CN", "bg", "es", "tr", "nl", "lv", "th", "hne", "it", "ar", "ia", "hi", "zh_TW", "ug", "se", "mk", "nds", "cs", "ro", "uz@cyrillic", "et", "wa", "ru", "nn", "mai", "ga", "pt", "pl", "cy", "en_US", "sq", "kk", "fy", "ko", "el", "br", "fr", "ca", "xh", "mr", "nb", "en_GB", "ca@valencia", "ta", "eu", "bs", "sk", "fa", "fi", "pa", "uk", "be", "km", "uz", "vi", "ms", "sv", "de", "eo", "ja", "he", "sl", "gl", "tg", "ne", "da", "af")
00000019 6:00:54 AM [10712] Override language: ""
00000020 6:00:54 AM [10712] PATH "S:/Program Files/Krita (x64)/bin;S:/Program Files/Krita (x64)/lib;S:/Program Files/Krita (x64)/Frameworks;S:/Program Files/Krita (x64);C:\\ProgramData\\Oracle\\Java\\javapath;c:\\windows\\system32;c:\\windows;c:\\windows\\system32\\wbem;c:\\windows\\system32\\windowspowershell\\v1.0\\;c:\\program files\\common files\\autodesk shared\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;[[cut for privacy]]"
00000021 6:00:54 AM [10712] krita.tabletlog: Opened tablet context 0x141 on window 0xd038a changed packet queue size 32 -> 128
00000022 6:00:54 AM [10712] mincore\com\oleaut32\dispatch\ups.cpp(2128)\OLEAUT32.dll!00007FFB275916A1: (caller: 00007FFB275844B9) ReturnHr(1) tid(29e4) 8002801D Library not registered.
00000023 6:00:54 AM [10712] mincore\com\oleaut32\dispatch\ups.cpp(2128)\OLEAUT32.dll!00007FFB275916A1: (caller: 00007FFB275844B9) ReturnHr(2) tid(29e4) 8002801D Library not registered.


///// Dialogue box immediately popping up asking me to select Stylus offset mode. Further loading of Krita meets a hard halt here, until selection is made. ////


00000024 6:00:54 AM [10712] krita.tabletlog: # Getting current context data:
00000025 6:00:54 AM [10712] krita.tabletlog: lc.lcName = 0x5fb770
00000026 6:00:54 AM [10712] krita.tabletlog: lc.lcDevice = 0
00000027 6:00:54 AM [10712] krita.tabletlog: lc.lcInOrgX = 0
00000028 6:00:54 AM [10712] krita.tabletlog: lc.lcInOrgY = 0
00000029 6:00:54 AM [10712] krita.tabletlog: lc.lcInExtX = 34416
00000030 6:00:54 AM [10712] krita.tabletlog: lc.lcInExtY = 19359
00000031 6:00:54 AM [10712] krita.tabletlog: lc.lcOutOrgX = 0
00000032 6:00:54 AM [10712] krita.tabletlog: lc.lcOutOrgY = 0
00000033 6:00:54 AM [10712] krita.tabletlog: lc.lcOutExtX = 34416
00000034 6:00:54 AM [10712] krita.tabletlog: lc.lcOutExtY = -19359
00000035 6:00:54 AM [10712] krita.tabletlog: lc.lcSysOrgX = 1920
00000036 6:00:54 AM [10712] krita.tabletlog: lc.lcSysOrgY = 0
00000037 6:00:54 AM [10712] krita.tabletlog: lc.lcSysExtX = 1920
00000038 6:00:54 AM [10712] krita.tabletlog: lc.lcSysExtY = 1080
00000039 6:00:54 AM [10712] krita.tabletlog: Qt Desktop Geometry QRect(0,0 3840x1080)
00000040 6:00:54 AM [10712] qtDesktopRect = QRect(0,0 3840x1080)
00000041 6:00:54 AM [10712] wintabDesktopRect = QRect(1920,0 1920x1080)
00000042 6:00:54 AM [6044] onecore\base\appmodel\resourcepolicy\gameconfigstore\client\gameconfigstoreclient.cpp(104)\ResourcePolicyClient.dll!00007FFB2268BA6C: (caller: 00007FFB089CBA76) LogHr(21) tid(1bd8) 80070490 Element not found.


///// Counted 4 seconds out to leave a time stamp here, chose my mode. Krita continued loading. //////


00000043 6:00:58 AM [10712] libpng warning: iCCP: too many profiles
00000044 6:00:58 AM [10712] libpng warning: iCCP: too many profiles
00000045 6:00:58 AM [10712] libpng warning: iCCP: too many profiles
00000046 6:00:58 AM [10712] libpng warning: iCCP: too many profiles
00000047 6:00:58 AM [10712] QLayout: Attempting to add QLayout "" to QWidget "", which already has a layout
00000048 6:00:59 AM [6044] onecore\base\appmodel\resourcepolicy\gameconfigstore\client\gameconfigstoreclient.cpp(104)\ResourcePolicyClient.dll!00007FFB2268BA6C: (caller: 00007FFB089CBA76) LogHr(22) tid(2278) 80070490 Element not found.
00000049 6:01:13 AM [10712] libpng warning: iCCP: too many profiles
alvinwong
Registered Member
Posts
117
Karma
0
OS
Turns out that after reading the handling code, it is not related to whether the stylus is used to start Krita or not. When the screen resolution dialog appears, if the stylus is moved out of the proximity of the tablet and re-entered proximity, it will cause the settings in the dialog to not be applied. If the stylus stays within proximity, then the settings are applied.

Can you confirm my observations?

I have a fix for this to go in the next release.
conradgea
Registered Member
Posts
5
Karma
0
Can confirm. I purposely pulled my stylus away from the tablet after the dialogue for the choice was presented to me. Then brought the stylus back, made my selection and confirmed it, and then the offset bug came back. Huh!

So I helped you find the problem then?
alvinwong
Registered Member
Posts
117
Karma
0
OS
Yes, that's one bug fixed. Thanks for your help :)


Bookmarks



Who is online

Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]