Adventure Game Studio

AGS Development => Editor Development => Topic started by: Radiant on Thu 29/08/2013 17:06:33

Title: (solved) Font overflow
Post by: Radiant on Thu 29/08/2013 17:06:33
Attempting to create more than 15 fonts (0-14) in AGS 3.2.1 gives the following error,


Error: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Version: AGS 3.2.1.111

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at reload_font(Int32 )
   at GameUpdated(Game game)
   at AGS.Native.NativeMethods.GameSettingsChanged(Game game)
   at AGS.Editor.Components.FontsComponent.CommandClick(String controlID)
   at AGS.Editor.GUIController._mainForm_OnMenuClick(String menuItemID)
   at AGS.Editor.ProjectTree.ContextMenuEventHandler(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Title: Re: Font overflow
Post by: Crimson Wizard on Sat 31/08/2013 15:24:13
I will add restriction for maximal fonts in game project to match the engine restriction, in 3.3.0.
Also for cursors, inventory items and dialogs.
Title: Re: Font overflow
Post by: Radiant on Mon 02/09/2013 11:13:46
I'm apparently the first person to run into this, but I would appreciate it if the limit was higher (say, 32 instead of 16).
Title: Re: Font overflow
Post by: Crimson Wizard on Mon 02/09/2013 12:29:36
Quote from: Radiant on Mon 02/09/2013 11:13:46
I'm apparently the first person to run into this, but I would appreciate it if the limit was higher (say, 32 instead of 16).
Heh.
It will be unlimited in 3.4.0 (although I forgot to remove font limit there somehow).
But from the looks of the code it does not look like it will be a problem to increase the limit for 3.3.0.