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

[NBug] Overflow error. #6633

Closed
daniel-beet opened this issue May 22, 2019 · 3 comments
Closed

[NBug] Overflow error. #6633

daniel-beet opened this issue May 22, 2019 · 3 comments

Comments

@daniel-beet
Copy link

daniel-beet commented May 22, 2019

Current behaviour

Attempting to display a diff of an UTF16LE-BOM file causes crash.

Expected behaviour

Expect no crash and that file is displayed as text initially without forcing it.

Steps to reproduce

Select a UTF16LE-BOM file from a commit to display diff (will not as claims is binary)
Right click and select "Treat all files as text"
See Unicode text (with double byte chars)
Change encoding dropdown to "Unicode"
Get error.

Error Details

System.OverflowException: Overflow error.
   at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
   at System.Drawing.Graphics.FillRectangle(Brush brush, Single x, Single y, Single width, Single height)
   at System.Drawing.Graphics.FillRectangle(Brush brush, RectangleF rect)
   at ICSharpCode.TextEditor.TextView.DrawDocumentWord(Graphics g, String word, Point position, Font font, Color foreColor, Brush backBrush)
   at ICSharpCode.TextEditor.TextView.PaintLinePart(Graphics g, Int32 lineNumber, Int32 startColumn, Int32 endColumn, Rectangle lineRectangle, Int32 physicalXPos)
   at ICSharpCode.TextEditor.TextView.PaintDocumentLine(Graphics g, Int32 lineNumber, Rectangle lineRectangle)
   at ICSharpCode.TextEditor.TextView.Paint(Graphics g, Rectangle rect)
   at ICSharpCode.TextEditor.TextArea.OnPaint(PaintEventArgs e)
   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
   at System.Windows.Forms.Control.WmPaint(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Environment

  • Git Extensions 3.1.0.5877
  • Build bb1687f
  • Git 2.21.0.windows.1
  • Microsoft Windows NT 10.0.16299.0
  • .NET Framework 4.7.3394.0
  • DPI 96dpi (no scaling)
@gerhardol
Copy link
Member

See also #6934 for reproduce info (I still cannot reproduce)

@palver123
Copy link
Contributor

I don't know about this issue, but I think I have found the solution of #7023 .

@RussKie
Copy link
Member

RussKie commented Aug 17, 2019

Closing in favour of #7023.

@RussKie RussKie closed this as completed Aug 17, 2019
@RussKie RussKie removed 👓 status: needs review type: dependency bug up-for-grabs Easy tasks for those looking to get involved. Refer to https://up-for-grabs.net/ labels Aug 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants