Imageglass: Error with Windows touch and pen input.

Created on 10 Dec 2020  路  5Comments  路  Source: d2phap/ImageGlass

System information:

  • Windows OS version: 10.0.19041 Build 19041
  • ImageGlass version: 8.0.12.8

To Reproduce

Steps to reproduce the behavior:

  1. Using a device with pen and/or touch input on ImageGlass program.
  2. Error happens.
    I'm using Wacom Cintiq Pro 13, which has both touch and pen input.

Expected behavior:


No error, and WinAPI pen and touch input is fully supported.

Screenshots:


image

https://user-images.githubusercontent.com/3154213/104157804-df7e0300-5426-11eb-96e2-30d49ae7a5d2.mov

Additional context:


There are a lot of professional is using pen input devices for their works. I think most of them would rather find another program, instead of spending time to report pen input bug. So please buy a cheap wacom tablet to test it.
I love using ImageGlass, and thank you for your hard work!


```
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

*** Exception Text ***
System.InvalidOperationException: RunSynchronously may not be called on a task that has already completed.
at System.Threading.Tasks.Task.InternalRunSynchronously(TaskScheduler scheduler, Boolean waitForCompletion)
at ImageGlass.Library.WinAPI.Touch.AcceptTouch(Form form)
at ImageGlass.frmMain.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

*** Loaded Assemblies ***
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4250.0 built by: NET48REL1LAST_C

CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll

ImageGlass
Assembly Version: 8.0.12.8
Win32 Version: 8.0.12.8

CodeBase: file:///C:/Program%20Files/ImageGlass/ImageGlass.exe

System
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4200.0 built by: NET48REL1LAST_C

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

ImageGlass.Services
Assembly Version: 8.0.7645.27245
Win32 Version: 8.0.7645.27245

CodeBase: file:///C:/Program%20Files/ImageGlass/ImageGlass.Services.DLL

ImageGlass.Base
Assembly Version: 1.3.0.0
Win32 Version: 1.3.0.0

CodeBase: file:///C:/Program%20Files/ImageGlass/ImageGlass.Base.DLL

ImageGlass.Settings
Assembly Version: 8.0.0.0
Win32 Version: 8.0.0.0

CodeBase: file:///C:/Program%20Files/ImageGlass/ImageGlass.Settings.DLL

System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4270.0 built by: NET48REL1LAST_C

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

ImageGlass.Library
Assembly Version: 8.0.7645.27244
Win32 Version: 8.0.7645.27244

CodeBase: file:///C:/Program%20Files/ImageGlass/ImageGlass.Library.DLL

System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4270.0 built by: NET48REL1LAST_C

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

ImageGlass.UI
Assembly Version: 8.0.7645.27245
Win32 Version: 8.0.7645.27245

CodeBase: file:///C:/Program%20Files/ImageGlass/ImageGlass.UI.DLL

ImageGlass.Heart
Assembly Version: 8.0.0.0
Win32 Version: 8.0.0.0

CodeBase: file:///C:/Program%20Files/ImageGlass/ImageGlass.Heart.DLL

System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

Magick.NET-Q16-OpenMP-x64
Assembly Version: 7.22.2.0
Win32 Version: 7.22.2.2

CodeBase: file:///C:/Program%20Files/ImageGlass/Magick.NET-Q16-OpenMP-x64.DLL

Magick.NET.Core
Assembly Version: 5.2.2.0
Win32 Version: 5.2.2.0

CodeBase: file:///C:/Program%20Files/ImageGlass/Magick.NET.Core.DLL

Magick.NET.SystemDrawing
Assembly Version: 2.0.8.0
Win32 Version: 2.0.8.0

CodeBase: file:///C:/Program%20Files/ImageGlass/Magick.NET.SystemDrawing.DLL

FileWatcherEx
Assembly Version: 1.3.0.0
Win32 Version: 1.3.0.0

CodeBase: file:///C:/Program%20Files/ImageGlass/FileWatcherEx.DLL

ImageGlass.ImageBox
Assembly Version: 8.0.7645.27244
Win32 Version: 8.0.7645.27244

CodeBase: file:///C:/Program%20Files/ImageGlass/ImageGlass.ImageBox.DLL

ImageGlass.ImageListView
Assembly Version: 11.0.0.7
Win32 Version: 11.0.0.7

CodeBase: file:///C:/Program%20Files/ImageGlass/ImageGlass.ImageListView.DLL

System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4190.0 built by: NET48REL1LAST_B

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

Accessibility
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll

*** JIT Debugging ***
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:



When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.```

馃悶 bug 馃憣 ready

All 5 comments

I can also confirm this same problem, when it comes to any touch input (as OP stated, pen or touch).

If it helps at all, the devices I have running version 7.x (e.g. on this current laptop, Yoga C930 running v. 7.6.4.30), touch input works perfectly fine. Devices I updated to 8.x (e.g. Yoga 7i running v. 8.0.12.8) all crash as soon as there is touch input into IG.

Not sure if this helps at all, but just wanted to inform you that it did work perfectly fine on previous v.7. So hopefully this can help you save some time and zero in on what to look for - something that changed since then. And just as OP said - thanks so much for the hard work and this great application!

Thanks @DraHD & @i5lee8bit
The issue was from code refactoring async. I will fix it and push an IG Moon version.

I can confirm I have the same issue on Windows 10 1909 (or at least its very similar). Here's the stacktrace:

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.InvalidOperationException: RunSynchronously may not be called on a task that has already completed.
   at System.Threading.Tasks.Task.InternalRunSynchronously(TaskScheduler scheduler, Boolean waitForCompletion)
   at ImageGlass.Library.WinAPI.Touch.AcceptTouch(Form form)
   at ImageGlass.frmMain.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4300.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
ImageGlass
    Assembly Version: 8.0.12.8
    Win32 Version: 8.0.12.8
    CodeBase: file:///C:/Program%20Files/ImageGlass/ImageGlass.exe
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4300.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
ImageGlass.Services
    Assembly Version: 8.0.7645.27245
    Win32 Version: 8.0.7645.27245
    CodeBase: file:///C:/Program%20Files/ImageGlass/ImageGlass.Services.DLL
----------------------------------------
ImageGlass.Base
    Assembly Version: 1.3.0.0
    Win32 Version: 1.3.0.0
    CodeBase: file:///C:/Program%20Files/ImageGlass/ImageGlass.Base.DLL
----------------------------------------
ImageGlass.Settings
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.0.0
    CodeBase: file:///C:/Program%20Files/ImageGlass/ImageGlass.Settings.DLL
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4270.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
ImageGlass.Library
    Assembly Version: 8.0.7645.27244
    Win32 Version: 8.0.7645.27244
    CodeBase: file:///C:/Program%20Files/ImageGlass/ImageGlass.Library.DLL
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4300.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
ImageGlass.UI
    Assembly Version: 8.0.7645.27245
    Win32 Version: 8.0.7645.27245
    CodeBase: file:///C:/Program%20Files/ImageGlass/ImageGlass.UI.DLL
----------------------------------------
ImageGlass.Heart
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.0.0
    CodeBase: file:///C:/Program%20Files/ImageGlass/ImageGlass.Heart.DLL
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Magick.NET-Q16-OpenMP-x64
    Assembly Version: 7.22.2.0
    Win32 Version: 7.22.2.2
    CodeBase: file:///C:/Program%20Files/ImageGlass/Magick.NET-Q16-OpenMP-x64.DLL
----------------------------------------
Magick.NET.Core
    Assembly Version: 5.2.2.0
    Win32 Version: 5.2.2.0
    CodeBase: file:///C:/Program%20Files/ImageGlass/Magick.NET.Core.DLL
----------------------------------------
Magick.NET.SystemDrawing
    Assembly Version: 2.0.8.0
    Win32 Version: 2.0.8.0
    CodeBase: file:///C:/Program%20Files/ImageGlass/Magick.NET.SystemDrawing.DLL
----------------------------------------
FileWatcherEx
    Assembly Version: 1.3.0.0
    Win32 Version: 1.3.0.0
    CodeBase: file:///C:/Program%20Files/ImageGlass/FileWatcherEx.DLL
----------------------------------------
ImageGlass.ImageBox
    Assembly Version: 8.0.7645.27244
    Win32 Version: 8.0.7645.27244
    CodeBase: file:///C:/Program%20Files/ImageGlass/ImageGlass.ImageBox.DLL
----------------------------------------
ImageGlass.ImageListView
    Assembly Version: 11.0.0.7
    Win32 Version: 11.0.0.7
    CodeBase: file:///C:/Program%20Files/ImageGlass/ImageGlass.ImageListView.DLL
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4190.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
Accessibility
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.



Tried to fix this bug, please help to test the latest build:
https://imageglass.org/moon

Nice, I've been waiting for an 8.x moon build. Just did a quick test - seems to be fixed. Admittedly, I didn't do much testing beyond some quick basic touch inputs. Tried tapping, swiping, pinch to zoom in / out. Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

d2phap picture d2phap  路  4Comments

Matix-Media picture Matix-Media  路  5Comments

fire-eggs picture fire-eggs  路  4Comments

TheDutchJewel picture TheDutchJewel  路  4Comments

xmha97 picture xmha97  路  4Comments