AGS crashes when opening scripts

Started by krieghan, Wed 20/03/2013 05:14:59

Previous topic - Next topic

krieghan

I'm going through one of the tutorials, and am at the point where I'm trying to open a script for a hotspot.  AGS becomes non-responsive for a minute or two, and then gives back an error dialog:

Error: Non-negative number required.
Parameter name: count
Version: AGS 3.2.1.111

System.ArgumentOutOfRangeException: Non-negative number required.
Parameter name: count
   at System.Text.EncodingNLS.GetString(Byte[] bytes, Int32 index, Int32 count)
   at Scintilla.ScintillaControl.SendMessageDirect(UInt32 msg, IntPtr wParam, String& text, Int32 length)
   at Scintilla.ScintillaControl.SendMessageDirect(UInt32 msg, Int32 wParam, String& text)
   at Scintilla.ScintillaControl.GetText()
   at AGS.Editor.ScintillaWrapper.FindLineNumberForText(String text)
   at AGS.Editor.ScriptEditor.GetLineNumberForText(String text)
   at AGS.Editor.Components.BaseComponentWithScripts.ZoomToCorrectPositionInScript(ScriptEditor editor, ZoomToFileEventArgs evArgs)
   at AGS.Editor.Components.RoomsComponent.GUIController_OnZoomToFile(ZoomToFileEventArgs evArgs)
   at AGS.Editor.GUIController.ZoomToFileHandler.Invoke(ZoomToFileEventArgs evArgs)
   at AGS.Editor.GUIController.timer_Tick(Object sender, EventArgs e)
   at System.Windows.Forms.Timer.OnTick(EventArgs e)
   at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

I am using 64-bit Windows 7, AGS 3.2.1.  I encounter the same issue when opening scripts in any other context.  Has anyone encountered this before?

Cerno

I had a "non-negative number" error recently, but for the heck of it I can't remember what I did to fix it.
From memory I think it was something like a missing bracket or closing string quote ("), or another form of incomplete command, but when trying to recreate something like it I get proper "bracket missing" errors and such.

Sorry I can't be of more help. If I remember anything more I'll let you know.
Could you try removing the hotspot code you created to check whether the error is connected to that code?

123  Currently working on: Sibun - Shadow of the Septemplicon

Crimson Wizard

krieghan, is it acceptable for you to share either your script (that causes error), or whole project?
If yes, you could upload it to some file hosting website, so we could find out what's going on there.

krieghan

It is indeed acceptable.  I ll put it up on Monday and post a link.  To be clear, though, I just started this project and haven't added any scripts yet.  AGS crashes for me when I try to edit any script.  I figured it might be related to some odd setup in my OS environment.  Nevertheless, I'll put the project up shortly.  Thanks.

krieghan

I have uploaded my project to DropBox as a .tar archive.  Let me know if the link doesn't work for you.  Thanks for helping me out:

https://www.dropbox.com/s/maubh0xbjb7w7jg/test_game.tar

Crimson Wizard

I open the project, then open the room 1, choose "Hotspots" in the combo box. Then click on lamp post (it becomes selected).
Go to events pane and click on "..." button opposed to "Any click on hotspot" event.
Script opens, showing newly created function.

Is this how you do? I experience no crashes... (having Win7 64-bit too).

krieghan

Yeah, that's exactly what I'm doing.  This tells me that it has something to do with my environment, but I'm not sure what exactly.  I thought it might be my version of the .net framework, but I'm up to date on that and I'm still seeing the crash.

Crimson Wizard

#7
Yes, I would make a guess it is something to do with either .NET framework, or operating system (such as locale settings, for instance).
I really hope someone with higher level of expertise in .NET will look into this.

krieghan

I'm inclined to repost this in the Advanced forum.  Does that seem reasonable?

Snarky

No. Only one thread for one question. If it fits better under advanced (and I'm not sure it does; this isn't an advanced scripting issue, just a difficulty getting AGS to run properly), a moderator will move it.

Gilbert

I think this is more related to the editor's code/compatibility/whatever. Should I move it to Editor Dev. Forum?

Crimson Wizard

Quote from: Iceboty V7000a on Tue 26/03/2013 15:53:29
I think this is more related to the editor's code/compatibility/whatever. Should I move it to Editor Dev. Forum?
I think that makes sense, it is not a scripting error, but an editor error. Hopefully it will bring appropriate attention there too.

Gilbert


tzachs

Like CW, I tried your project and it worked fine.
Do you by any chance have a non English Windows?
Another possibility, is there a chance you have some other software which uses scintilla (the text editor used by AGS)? Maybe you have another scintilla version downloaded which gives different results or something weird like that...

Also, can you try this version and see what happens?
http://www.mediafire.com/?sl5vly8p0cycep9

SMF spam blocked by CleanTalk