DevToys-app / DevToys

A Swiss Army knife for developers.
https://devtoys.app/
MIT License
26.72k stars 1.43k forks source link

Base64 encoder crashes with dark theme #675

Closed My-MC closed 1 year ago

My-MC commented 1 year ago

Description

I have been using this tool for a long time. But a bug has recently occurred. I usually use this with a dark theme. I wanted to convert text to Base64. But When I opened the Base64 encoder and decoder page, It crashed. But when I used this with a white theme, It didn't crash. I tried this with Japanese and English, But it also crashed. I think this is a bug. I would appreciate your kind consideration.

Steps To Reproduce

  1. Change the theme to white.
  2. Open the Base64 (Text)
  3. Crash

Expected behavior

Not to crash

DevToys Version

Version 1.0.10.0 | X64 | RELEASE | b949a18 | b949a18

Relevant Assets/Logs

# - [09/25/2022 09:08:14]
Feature name: SmartDetection - Check if tool is recommended
Custom message: Tool : Xml Validator
Exception message: Data at the root level is invalid. Line 1, position 2.
Exception stack trace:
   at System.Xml.XmlTextReaderImpl.Throw(Exception) + 0x6c
   at System.Xml.XmlTextReaderImpl.Throw(String, String) + 0x56
   at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace() + 0x1a5
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent() + 0x22d
   at System.Xml.XmlTextReaderImpl.Read() + 0x355
   at System.Xml.XmlTextReader.Read() + 0xf
   at System.Xml.Schema.Parser.StartParsing(XmlReader, String) + 0xb7
   at System.Xml.Schema.Parser.Parse(XmlReader, String) + 0x10
   at System.Xml.Schema.XmlSchema.Read(XmlReader, ValidationEventHandler) + 0x86
   at DevToys.ViewModels.Tools.XmlValidator.XmlValidatorToolProvider.ValidateXsdData(String) + 0x122
   at DevToys.ViewModels.Tools.XmlValidator.XmlValidatorToolProvider.CanBeTreatedByTool(String) + 0x18
   at DevToys.Api.Tools.ToolProviderViewItem.<UpdateIsRecommendedAsync>d__40.MoveNext() + 0xc0
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x70
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x38
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task) + 0x17
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult() + 0xb
   at DevToys.ViewModels.MainPageViewModel.<>c__DisplayClass88_1.<<UpdateRecommendedToolsAsync>b__2>d.MoveNext() + 0x107
sbaker-devolutions commented 1 year ago

Same issue here, I'll be using the white theme in the meantime

Edit: Further investigation with a colleague having the same issue, the theme that is not the current "Default App Mode" in Windows Colors settings seems to be the one that crashes. Using Win 10

veler commented 1 year ago

Duplicate with #757