Adventure Game Studio Official

User reported issues for officially released versions of AGS

Bug Issue: Error: Output Byte Buffer is too small

Pages: [1]

Araminta

  • AGSer
  • Posts: 0
« on: 02 Mar 2017, 11:48 »
Hello,
I followed the tutorials and looked everywhere but before I can hit play this happens in the debugger.

Unexpected error: The output byte buffer is too small to contain the encoded data, encoding 'Japanese (Shift-JIS)' fallback 'System.Text.InternalEncoderBestFitFallb ack'.
Parameter name: bytes


I don't know why it's trying to read Japanese or something?

Crimson Wizard

  • AGSer
  • Posts: 7,261
« Reply #1 on: 03 Mar 2017, 08:32 »
Hello.

First of all, when AGS reports an error it usually displays a window with more detailed information (looks like a list of functions). If you get such window, could you post the full text from there?

Also, could you clarify, when you say "before I can hit play this happens", what do you mean exactly? Does this happen when you compile the game, or when you are doing something in the editor?

Finally, do you have japanese language installed in your operating system?
« Last Edit: 03 Mar 2017, 08:34 by Crimson Wizard »

Araminta

  • AGSer
  • Posts: 0
« Reply #2 on: 03 Mar 2017, 09:32 »
I can't find a window with more detailed information =/

When I press play or play without debugger it says there are "compilation errors" and to refer to the output box.

I have had Japanese IME locale set up on my system (with a default of English) but when I saw there was Japanese errors I removed the Japanese IME locale, uninstalled AGS, restarted my computer, reinstalled AGS and the error persisted. I have also uninstalled and reinstalled AGS 2 other times to make sure the first files didn't download incorrectly.
« Last Edit: 03 Mar 2017, 09:33 by Araminta »

Crimson Wizard

  • AGSer
  • Posts: 7,261
« Reply #3 on: 03 Mar 2017, 09:40 »
Oh, so these are compilation errors.

I will have to do some experiments first to see what's going on.

I have a question: are you still trying to compile same game project you created while having japanese locale installed, have you tried creating completely new game?
« Last Edit: 03 Mar 2017, 09:40 by Crimson Wizard »

Araminta

  • AGSer
  • Posts: 0
« Reply #4 on: 03 Mar 2017, 09:44 »
I made sure to delete my project when the Japanese error came up just in case the coding messed up and turned into Kanji.

I have made a new project every time I uninstalled & reinstalled and deleted the old project.

I've even tried booting up the Demo Game that comes with AGS, but I get the same error.
« Last Edit: 03 Mar 2017, 10:29 by Araminta »

Crimson Wizard

  • AGSer
  • Posts: 7,261
« Reply #5 on: 04 Mar 2017, 12:26 »
I was unable to reproduce same error, and I do not really know where to look at because the error message is not very elaborate.

I propose to go another way; here is an alternate version of AGS executables:
http://www.mediafire.com/file/veyqikgrr8ep006/AGS.Editor.3.4.0.15--compile-error-as-big-window.zip

if you copy these files into your AGS installation, and get similar error to happen again, then more information will be displayed, and we at least be able to know what action it is related to.

Araminta

  • AGSer
  • Posts: 0
« Reply #6 on: 05 Mar 2017, 08:15 »
Error: The output byte buffer is too small to contain the encoded data, encoding 'Japanese (Shift-JIS)' fallback 'System.Text.InternalEncoderBestFitFallb ack'.
Parameter name: bytes
Version: AGS 3.4.0.15

System.ArgumentException: The output byte buffer is too small to contain the encoded data, encoding 'Japanese (Shift-JIS)' fallback 'System.Text.InternalEncoderBestFitFallb ack'.
Parameter name: bytes ---> System.ArgumentException: The output byte buffer is too small to contain the encoded data, encoding 'Japanese (Shift-JIS)' fallback 'System.Text.InternalEncoderBestFitFallb ack'.
Parameter name: bytes
   at System.Text.Encoding.ThrowBytesOverflow()
   at System.Text.Encoding.ThrowBytesOverflow(EncoderNLS encoder, Boolean nothingEncoded)
   at System.Text.DBCSCodePageEncoding.GetByt es(Char* chars, Int32 charCount, Byte* bytes, Int32 byteCount, EncoderNLS encoder)
   at System.Text.EncodingNLS.GetBytes(String s, Int32 charIndex, Int32 charCount, Byte[] bytes, Int32 byteIndex)
   at AGS.Editor.DataFileWriter.GetBytes(String text, Int32 length)
   at AGS.Editor.DataFileWriter.WriteStringEn crypted(BinaryWriter writer, String text)
   at AGS.Editor.DataFileWriter.SaveThisGameT oFile(String fileName, Game game, CompileMessages errors)
   at AGS.Editor.BuildTargetDebug.CreateDebug Files(Object parameter)
   at AGS.Editor.BusyDialog.RunHandlerOnThrea d()
   --- End of inner exception stack trace ---
   at AGS.Editor.BusyDialog.Show(String message, ProcessingHandler handler, Object parameter)
   at AGS.Editor.BuildTargetDebug.Build(CompileMessages errors, Boolean forceRebuild)
   at AGS.Editor.AGSEditor.CreateMiniEXEForDe bugging(CompileMessages errors)
   at AGS.Editor.AGSEditor.CompileGame(Boolean forceRebuild, Boolean createMiniExeForDebug)
   at AGS.Editor.Components.BuildCommandsComp onent.TestGame(Boolean withDebugger)
   at AGS.Editor.Components.BuildCommandsComp onent.CommandClick(String controlID)
   at AGS.Editor.GUIController._mainForm_OnMe nuClick(String menuItemID)
   at AGS.Editor.MainMenuManager.MenuEventHan dler(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.Rais eEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem. OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.Hand leClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.Hand leMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.Fire EventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.Fire Event(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseU p(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.ControlNat iveWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNat iveWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callb ack(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Crimson Wizard

  • AGSer
  • Posts: 7,261
« Reply #7 on: 05 Mar 2017, 14:06 »
Alright, I was finally able to reproduce this error. This happens if you have current Windows locale set to Japanese (or similar language).
This is an option in the system language setup: https://www.java.com/en/download/help/locale.xml

LATER EDIT: I think I was able to fix this. Please try this build:
http://www.mediafire.com/file/4bk2p2eq55rv305/AGS.Editor.3.4.0.15--japanese-locale-fix.zip


If that does not work, you may try one of those two workarounds:
1) If your system locale is really set to japanese, then change it back to english, at least for now.
2) In AGS go to File->Preferences and check "Use legacy compiler" box at the bottom of the page. Before compiling game again delete Compiled folder in your game project (if you have one).
« Last Edit: 05 Mar 2017, 20:50 by Crimson Wizard »

Araminta

  • AGSer
  • Posts: 0
« Reply #8 on: 06 Mar 2017, 08:54 »
The japanese-locale-fix.zip worked! :D

Thank you!!!

Issue updated by Crimson Wizard
« Reply #9 on: 06 Mar 2017, 09:15 »
  • Status changed from New to Resolved

Pages: [1]

Issue Details

  • Reported
    02 Mar 2017, 11:48
  • Updated
    06 Mar 2017, 09:15
  • View Status
    Public
  • Type
    Bug
  • Status
    Resolved
  • Priority
    Normal
  • Version
    Adventure Game Studio 3.4, AGS 3.4.0
  • Fixed in
    (none)
  • Assigned to
    (none)
  • Category
    Debug

Tags



Powered by: SMF Project Tools 0.5.4 © Niko Pahajoki 2007-2011