Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled exception when saving after pasting image #782

Closed
Bone008 opened this issue May 17, 2020 · 3 comments
Closed

Unhandled exception when saving after pasting image #782

Bone008 opened this issue May 17, 2020 · 3 comments
Assignees
Projects

Comments

@Bone008
Copy link

Bone008 commented May 17, 2020

System information:

  • Windows OS version: Win10
  • ImageGlass version: 7.6.4.30 Portable

To Reproduce

Steps to reproduce the behavior:

  1. Copy a base64-encoded image string from browser or some other raw image data (e.g. from Snipping Tool, Photoshop, ...)
  2. Open empty ImageGlass without "Show welcome picture" enabled.
  3. Hit Ctrl + V to paste image.
  4. Hit Ctrl + S to try to save image.

Actual behavior:

Unhandled exception occurs:

System.ArgumentOutOfRangeException: startIndex cannot be larger than length of string.
Parameter name: startIndex
   at System.String.Substring(Int32 startIndex, Int32 length)
   at ImageGlass.frmMain.<mnuMainSaveAs_Click>d__133.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

Expected behavior:

Save dialog should open and allow saving the image.

Additional context:

Works fine when "Show welcome picture" is enabled in settings, most likely because the filename "default.jpg" is then present. Without it, the filename is empty, probably what causes the exception :)

@d2phap
Copy link
Owner

d2phap commented Jun 2, 2020

Thanks @Bone008
Confirm the bug

@d2phap d2phap added this to the Issues 7.6.4.30 milestone Jun 2, 2020
@d2phap d2phap added this to Potential tasks in 7.6 via automation Jul 4, 2020
@d2phap d2phap removed this from Potential tasks in 7.6 Jul 4, 2020
@d2phap d2phap added this to Potential tasks in 8.0 via automation Jul 4, 2020
d2phap added a commit that referenced this issue Jul 10, 2020
@d2phap d2phap moved this from Potential tasks to In progress in 8.0 Jul 10, 2020
@d2phap
Copy link
Owner

d2phap commented Jul 10, 2020

This bug is fixed in IG Moon: https://imageglass.org/moon

@d2phap d2phap moved this from In progress to Reviewing in 8.0 Jul 10, 2020
@d2phap d2phap closed this as completed Jul 20, 2020
8.0 automation moved this from Reviewing to Done Jul 20, 2020
@Bone008
Copy link
Author

Bone008 commented Jul 20, 2020

Thanks a lot for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
8.0
  
Done
Development

No branches or pull requests

2 participants