Tyrrrz / DiscordChatExporter

Exports Discord chat logs to a file
MIT License
7.48k stars 682 forks source link

Touch controls crash gui app #1135

Closed ethanaobrien closed 11 months ago

ethanaobrien commented 11 months ago

Version

2.41.1

Flavor

GUI (Graphical User Interface)

Platform

Windows 11

Export format

No response

Steps to reproduce

  1. Open the application using a device with a touch screen
  2. Attempt to interact with the application using touch

Details

Touch should at least act as a mouse cursor and press. Although this doesnt really matter, it currently crashes the app

Error from event viewer:

Log Name:      Application
Source:        .NET Runtime
Date:          10/3/2023 11:22:16 PM
Event ID:      1026
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      lillipup
Description:
Application: DiscordChatExporter.exe
CoreCLR Version: 7.0.723.27404
.NET Version: 7.0.7
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentException: '{0}' must be greater than or equal to '{1}'. (Parameter 'maximum')
   at System.Windows.Input.StylusPointPropertyInfo..ctor(StylusPointProperty stylusPointProperty, Int32 minimum, Int32 maximum, StylusPointPropertyUnit unit, Single resolution)
   at System.Windows.Input.PenContext.InitStylusPointDescription()
   at System.Windows.Input.PenContext.FirePenInRange(Int32 stylusPointerId, Int32[] data, Int32 timestamp)
   at System.Windows.Input.PenThreadWorker.ThreadProc()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)

Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name=".NET Runtime" />
    <EventID Qualifiers="0">1026</EventID>
    <Version>0</Version>
    <Level>2</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2023-10-04T04:22:16.1259723Z" />
    <EventRecordID>1273</EventRecordID>
    <Correlation />
    <Execution ProcessID="1672" ThreadID="0" />
    <Channel>Application</Channel>
    <Computer>lillipup</Computer>
    <Security />
  </System>
  <EventData>
    <Data>Application: DiscordChatExporter.exe
CoreCLR Version: 7.0.723.27404
.NET Version: 7.0.7
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentException: '{0}' must be greater than or equal to '{1}'. (Parameter 'maximum')
   at System.Windows.Input.StylusPointPropertyInfo..ctor(StylusPointProperty stylusPointProperty, Int32 minimum, Int32 maximum, StylusPointPropertyUnit unit, Single resolution)
   at System.Windows.Input.PenContext.InitStylusPointDescription()
   at System.Windows.Input.PenContext.FirePenInRange(Int32 stylusPointerId, Int32[] data, Int32 timestamp)
   at System.Windows.Input.PenThreadWorker.ThreadProc()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
</Data>
  </EventData>
</Event>

Checklist

Tyrrrz commented 11 months ago

Works fine for me on MS Surface 5. You'll need to provide more detailed reproduction steps.

ethanaobrien commented 11 months ago

Not much more I can provide, because interacting with the app at all kills it

Here is a video of me opening, tapping the screen, then the app just closing. The tap is shown for a very little amount of time, right above the "account" in "To get a token for a bot account"

https://github.com/Tyrrrz/DiscordChatExporter/assets/77750390/94477102-a03b-42eb-a45b-7c03fe3ccbbf

The error in event viewer stays the same

Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentException: '{0}' must be greater than or equal to '{1}'. (Parameter 'maximum')
   at System.Windows.Input.StylusPointPropertyInfo..ctor(StylusPointProperty stylusPointProperty, Int32 minimum, Int32 maximum, StylusPointPropertyUnit unit, Single resolution)
   at System.Windows.Input.PenContext.InitStylusPointDescription()
   at System.Windows.Input.PenContext.FirePenInRange(Int32 stylusPointerId, Int32[] data, Int32 timestamp)
   at System.Windows.Input.PenThreadWorker.ThreadProc()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)

Wouldn't surprise me if it's just my computer - or if my current version of dotnet is bugged (windows update doesn't show any updates)

Tyrrrz commented 11 months ago

Weird, I can tap anywhere just fine. Are you using a stylus by any chance?

ethanaobrien commented 11 months ago

Are you using a stylus by any chance?

No I am not.

I will try to debug this application when I get the chance, since it seems to only be my computer

ethanaobrien commented 11 months ago

Well heres where I'm at. Its not your application

Tried updating the dotnet runtime/sdk (shouldnt change anything there) but still does not work

Opened the visual studio installer to download the C# dev tools. Was randomly tapping on the screen and the visual studio installer crashed. Re-opened the visual studio installer, did a single tap, and it crashed again. Looks like this might be a bug with the touchscreen driver, which doesn't really surprise me.

Sorry for the trouble, and thanks for your time.

nkolarevic commented 8 months ago

@ethanaobrien The same issue on Surface pro 9 and Surface 5. When disable touch, everything works fine.

How did you resolve it? Update driver?

Thanks

ethanaobrien commented 8 months ago

I never resolved it, the conclusion I came to is that it's an issue with dotnet

Tyrrrz commented 8 months ago

@ethanaobrien The same issue on Surface pro 9 and Surface 5. When disable touch, everything works fine.

How did you resolve it? Update driver?

Thanks

Works for me on Surface 5 / Windows 11.

CanePlayz commented 8 months ago

For me too (Surface Pro 8, Windows 11)