Author Topic: crashes when retyping things AGS Editor  (Read 182 times)

crashes when retyping things AGS Editor
« on: 13 Jul 2019, 15:26 »
Hello,

Since today I am getting two weird bugs that I either didn't have before or never noticed on the AGS 3.4.3.1 Editor. Note that I use AGS Editor on Ubuntu 18.04 (previously 16.04) through Wine, for years, but this has never been a problem.

Sometimes, when I try to rename a script and then cancel the action, I get the following error on the Editor.

Error: External component has thrown an exception.
Version: AGS 3.4.3.1

Code: Adventure Game Studio
  1. System.Runtime.InteropServices.SEHException: External component has thrown an exception.
  2.    at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
  3.    at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
  4.    at System.Windows.Forms.Control.DefWndProc(Message& m)
  5.    at System.Windows.Forms.TreeView.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
  6.    at System.Windows.Forms.TreeView.WndProc(Message& m)
  7.    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
  8.    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
  9.    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Also when I replace some text on the code editor, when I rewrite the name of a variable by double clicking it to select and start typing, I get:

Error: Length cannot be less than zero.
Parameter name: length
Version: AGS 3.4.3.1

Code: Adventure Game Studio
  1. System.ArgumentOutOfRangeException: Length cannot be less than zero.
  2. Parameter name: length
  3.    at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
  4.    at AGS.CScript.Compiler.FastString.Substring(Int32 offset, Int32 length)
  5.    at AGS.Editor.AutoComplete.ConstructCache(Script scriptToCache, Boolean isBackgroundThread)
  6.    at AGS.Editor.ScriptEditor.scintilla_OnBeforeShowingAutoComplete(Object sender, EventArgs e)
  7.    at AGS.Editor.ScintillaWrapper.ShowAutoComplete(Int32 charsTyped, String autoCompleteList)
  8.    at AGS.Editor.ScintillaWrapper.ShowAutoCompleteIfAppropriate(Int32 minimumLength)
  9.    at AGS.Editor.ScintillaWrapper.OnUpdateUI(Object sender, EventArgs e)
  10.    at Scintilla.ScintillaControl.DispatchScintillaEvent(SCNotification notification)
  11.    at Scintilla.ScintillaControl.WndProc(Message& m)
  12.    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
  13.    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
  14.    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Has someone ever met those bugs? I have recently used the latest 3.5.0.14 release of the Editor and I think they don't happen there, but I think I didn't got they before on 3.4.3.1, so I think I have something funny somewhere on my project.

I have backups so currently I am trying to see if there was any state before where this didn't occur. I really don't remember having them.