Bug report

Started by mitlark, Fri 28/02/2014 02:38:35

Previous topic - Next topic

mitlark

This is not a bug, but here it comes.

This is an error I've found a lot in the forum this day, as I was trying to resolve it. I'm pretty sure you've heard of it in German, and other languages that aren't English (that sole fact led me to some conclusions, but sadly I didn't got to a solution).
Quote---------------------------
Error
---------------------------
An unexpected error occurred trying to start up the AGS Editor. Please consult the details below and post the error to the AGS Technical Forum.

System.IO.FileLoadException: No se puede cargar el archivo o ensamblado 'AGS.Native, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' ni una de sus dependencias. No se pudo iniciar la aplicación porque su configuración es incorrecta. Reinstalar la aplicación puede solucionar el problema. (Excepción de HRESULT: 0x800736B1)

Nombre de archivo: 'AGS.Native, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' ---> System.Runtime.InteropServices.COMException (0x800736B1): No se pudo iniciar la aplicación porque su configuración es incorrecta. Reinstalar la aplicación puede solucionar el problema. (Excepción de HRESULT: 0x800736B1)

   en AGS.Editor.NativeProxy..ctor()
   en AGS.Editor.ApplicationController..ctor()
   en AGS.Editor.Program.startupTimer_Tick(Object sender, EventArgs e)
   en System.Windows.Forms.Timer.OnTick(EventArgs e)
   en System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
   en System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
---------------------------
Aceptar   
---------------------------
The solutions I've heard are that maybe the editor is missing some files, however that doesn't seems to be the case, or not in the regular way. AGS.Native.dll is there, and I actually made AGS3.3.0 run by changing the Native dll by the one from AGS3.2.1 (obviously it "exploded" when I tried to compile a game but I knew it was going to).

Yesterday it was working fine, but today I had an issue and had to reinstall WindowsXP (it needed some cleaning after all, it was such a mess ahahaha!).
I have .NET from 1.0 to 4.0 installed (both 4.0 to be precise). But it seems that there is something I'm missing at my system. So, my question is, if there is other dependency the editor uses. Something like Microsoft VisualC/++ libraries (2008, 2010...).

By now, I've taken my game back to 3.2.1, because it works fine (with some effort I've manually managed to migrate). I can't stand a day without AGS <3. But if anyone knows something of this issue, please share your thoughts.

Thanks.
SPIN SPIN! SPIN SPIN!

Crimson Wizard

#1
@mitlark, maybe this will help:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=47966.msg636479217#msg636479217

Also, wrong forum section :), this one is for reporting website bugs.

mitlark

Whoops, sorry about the wrong section thing.

But, YEAH! Now it works! I actually tried installing a VCRedist I had somewhere in my PC, but it was for the 2010 binaries. Didn't wanted to start trying every distro because there are hundreds. Actually, not even 10, but... anyway.

So yeah! Now I can use the 3.3.0, and try the AGS3.4.0 too =D!. Thanks a bunch!
SPIN SPIN! SPIN SPIN!

Billbis

Not sure where to post this, so I'll try here. Should I have put this on the Bug and Suggestion Tracker instead ?
I am encountering a very serious bug with AGS 3.3.0 (Build 3.3.0.1156). Can someone try to reproduce it to see if it comes from my configuration (win7 64) ?
1) Open AGS editor.
2) Create a new game, default template
3) Create a new script
4) Open the header
5) Start writing in line 2:
Code: ags
#define 

6) The moment you finish writing:
Quote from: Unhandled errorError: L'index se trouve en dehors des limites du tableau.
Version: AGS 3.3.0.1156

System.IndexOutOfRangeException: L'index se trouve en dehors des limites du tableau.
   Ã Â  AGS.Editor.AutoComplete.ProcessPreProcessorDirective(List`1 defines, FastString& script, AutoCompleteParserState state)
   Ã Â  AGS.Editor.AutoComplete.ConstructCache(Script scriptToCache, Boolean isBackgroundThread)
   Ã Â  AGS.Editor.ScriptEditor.scintilla_OnBeforeShowingAutoComplete(Object sender, EventArgs e)
   Ã Â  AGS.Editor.ScintillaWrapper.ShowAutoComplete(Int32 charsTyped, String autoCompleteList)
   Ã Â  AGS.Editor.ScintillaWrapper.ShowAutoCompleteIfAppropriate(Int32 minimumLength)
   Ã Â  AGS.Editor.ScintillaWrapper.OnUpdateUI(Object sender, EventArgs e)
   Ã Â  Scintilla.ScintillaControl.DispatchScintillaEvent(SCNotification notification)
   Ã Â  Scintilla.ScintillaControl.WndProc(Message& m)
   Ã Â  System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   Ã Â  System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   Ã Â  System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Quote from: save changes---------------------------
Adventure Game Studio
---------------------------
A serious error occurred and the AGS Editor may now be in an unstable state. You are STRONGLY ADVISED to shut down the editor and restart it. Before saving your work, make a backup copy of your game folder in case any data has been corrupted.



Error: System.IndexOutOfRangeException: L'index se trouve en dehors des limites du tableau.

   Ã Â  AGS.Editor.AutoComplete.ProcessPreProcessorDirective(List`1 defines, FastString& script, AutoCompleteParserState state)

   Ã Â  AGS.Editor.AutoComplete.ConstructCache(Script scriptToCache, Boolean isBackgroundThread)

   Ã Â  AGS.Editor.ScriptEditor.scintilla_OnBeforeShowingAutoComplete(Object sender, EventArgs e)

   Ã Â  AGS.Editor.ScintillaWrapper.ShowAutoComplete(Int32 charsTyped, String autoCompleteList)

   Ã Â  AGS.Editor.ScintillaWrapper.ShowAutoCompleteIfAppropriate(Int32 minimumLength)

   Ã Â  AGS.Editor.ScintillaWrapper.OnUpdateUI(Object sender, EventArgs e)

   Ã Â  Scintilla.ScintillaControl.DispatchScintillaEvent(SCNotification notification)

   Ã Â  Scintilla.ScintillaControl.WndProc(Message& m)

   Ã Â  System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

   Ã Â  System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

   Ã Â  System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
---------------------------
OK   
---------------------------
And when you close the game without saving:
Quote---------------------------
Save changes?
---------------------------
Files have been added, removed or renamed. If you don't save the game now, you may not be able to successfully open this game next time. Do you want to save your changes?
---------------------------
Oui   Non   
---------------------------
If you click on yes, it can corrupt your game file. If you click on no, it seems to be ok.

Atavismus

Billbis is right: I have the same problem (note I use the english version).

Crimson Wizard

#5
This bug originates from earlier versions of AGS, but it reproduces differently in 3.2.1:
1. Do same steps as above.
2. After typing "#define" save the script header.
3. Same error occurs.

This happens immediately now because the intellisense cache is updated by timer rather than by some events.

@tzachs, I think it will be very easy to fix: the actual problem is that the program tries to get first character from the empty string at AGS.Editor/AutoComplete.cs, function ProcessPreProcessorDirective(), line 393. A simple check for string being null or empty will suffice IMO. But I leve it for you in case I miss anything else.
E: I suggest fixing in "master", because it is a hotfix (master may be merged to 3.3.1 later). This way the hotfixed version may be released without 3.3.1 additions.

TEMPORARY WORKAROUND:
1. Type "efine YOUR-MACRO-NAME".
2. Add "#d".

Billbis

Hey, many thanks for the tip. ;-D

tzachs

Yes, easy fix, fixed in master.

Adeel

Quote from: mitlark on Fri 28/02/2014 02:38:35
The solutions I've heard are that maybe the editor is missing some files, however that doesn't seems to be the case, or not in the regular way. AGS.Native.dll is there, and I actually made AGS3.3.0 run by changing the Native dll by the one from AGS3.2.1 (obviously it "exploded" when I tried to compile a game but I knew it was going to).

I'm quite surprised that you followed the same path which I did. Great minds think alike. Don't they? :=

SMF spam blocked by CleanTalk