fluentCODE / ScrawlIssues

Issue Tracker for Scrawl by fluentCODE
14 stars 0 forks source link

Crashes when you have multiple files open and quickly resize text with your mouse (ctrl+mousewheel) and then close a window #107

Closed willl closed 9 years ago

willl commented 9 years ago

Gif recording of the repeatable process: Crash gif Or gifv - http://i.imgur.com/D72lSEI.gifv

Repo steps:

  1. Open a directory (jabbr v2 source code in this case)
  2. Double click open a few files
  3. Hold down ctrl key, and use the mousewheel to increase/decrease the font size quickly.
  4. Close current window by using ctrl+w shortcut key.
  5. Scrawl crashes.

Exception details in the event viewer: Application: Scrawl.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.NullReferenceException Stack: at Scrawl.Editor.Controls.EditorControl.CalculateLayout() at Scrawl.Editor.Controls.EditorControl.Theme_EditorFontChange(System.Object, System.EventArgs) at System.EventHandler.Invoke(System.Object, System.EventArgs) at Scrawl.Common.Theming.Theme.OnEditorFontChange() at Scrawl.Common.Theming.Theme.set_EditorFont(Eto.Drawing.Font) at Scrawl.Editor.Controls.EditorControl.EditorControl_MouseWheel(System.Object, Eto.Forms.MouseEventArgs) at Eto.PropertyStore.TriggerEvent[[System.Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Object, System.Object, System.Canon) at Eto.Forms.Control.OnMouseWheel(Eto.Forms.MouseEventArgs) at Eto.Forms.Control+Callback+<>cDisplayClass20.b21() at Eto.Platform.Invoke(System.Action) at Eto.Forms.Control+Callback.OnMouseWheel(Eto.Forms.Control, Eto.Forms.MouseEventArgs) at Eto.WinForms.Forms.ApplicationHandler+<>cDisplayClass0.b1(Eto.Forms.Control, ICallback, Eto.Forms.MouseEventArgs) at Eto.WinForms.BubbleEventFilter.MouseEvent(Eto.WinForms.BubbleEventArgs, System.Action3<Eto.Forms.Control,ICallback,Eto.Forms.MouseEventArgs>, System.Nullable1, System.Func`2<Eto.Forms.MouseButtons,Eto.Forms.MouseButtons>) at Eto.WinForms.BubbleEventFilter+<>cDisplayClass4.b5(Eto.WinForms.BubbleEventArgs) at Eto.WinForms.BubbleEventFilter.PreFilterMessage(System.Windows.Forms.Message ByRef) at System.Windows.Forms.Application+ThreadContext.ProcessFilters(MSG ByRef, Boolean ByRef) at System.Windows.Forms.Application+ThreadContext.PreTranslateMessage(MSG ByRef) at System.Windows.Forms.Application+ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FPreTranslateMessage(MSG ByRef) at System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32) at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext) at System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext) at System.Windows.Forms.Application.Run(System.Windows.Forms.Form) at Eto.WinForms.Forms.ApplicationHandler.Run() at Eto.Forms.Application.Run(Eto.Forms.Form) at Scrawl.App.Windows.Program.Main(System.String[])

stirno commented 9 years ago

Window not available when not focused causing layout calcs to fail. Pretty sure this fix might cause us probs later but.. this fixes it.. (in dev only atm)