AGS 3.1.0 Final - World's Heaviest Bridegroom Edition

Started by Pumaman, Sat 05/07/2008 23:21:19

Previous topic - Next topic

monkey0506

When I manually abort the game using AbortGame I get an error and the call stack, but the call stack pane at the bottom sits on top of the script making it impossible for me to see the line in question without closing the call stack pane (since it's one of the last lines in the script). IIRC the error pane used to shorten the length of the script pane didn't it?

Shane 'ProgZmax' Stevens

Nice work getting d3d to stretch properly, CJ!

GarageGothic

#142
I was playing around with the beta 8 editor and managed to crash it while testing my game. I'm not sure what exactly caused the crash, but I was dragging some lens effect objects (that use DynamicSprites created from the background) outside the screen limits. There does seems to be an error in my own SafeCreateFromBackground code, which is supposed to calculate sprite offsets to avoid invalid coordinates, because while trying to trigger the crash again I got an "Invalid coordinates" message from the debugger. But still, that shouldn't make the editor crash. I can't reproduce the bug consistently, but I've managed to do it three times now (out of ten or so attempts).

First, I get this message, twice:

QuoteError: Object reference not set to an instance of an object.
Version: AGS 3.1.0.55

System.NullReferenceException: Object reference not set to an instance of an object.
   at AGS.Editor.CallStackPanel.RefreshList()
   at AGS.Editor.CallStackPanel.set_CallStack(DebugCallStack value)
   at AGS.Editor.GUIController.ShowCallStack(DebugCallStack callStack)
   at AGS.Editor.AGSEditor._debugger_BreakAtLocation(DebugCallStack callStack)
   at AGS.Editor.DebugController._communicator_MessageReceived(XmlDocument doc)
   at AGS.Editor.EngineCommunication._watcher_Changed(Object sender, FileSystemEventArgs e)
   at System.IO.FileSystemWatcher.OnChanged(FileSystemEventArgs e)
   at System.IO.FileSystemWatcher.NotifyFileSystemEventArgs(Int32 action, String name)
   at System.IO.FileSystemWatcher.CompletionStatusChanged(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* overlappedPointer)
   at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)

Then a normal Windows crash message shows up ("AGS Editor for windows has generated errors and will be closed"). The crash data that it offers to send to Microsoft are:

QuoteEventType : clr20r3     P1 : agseditor.exe     P2 : 3.1.0.55     P3 : 48c972db
P4 : agseditor     P5 : 3.1.0.55     P6 : 48c972db     P7 : 46a     P8 : 90
P9 : system.nullreferenceexception

(Not sure if you can use the latter for anything.)

Then the editor closes and leaves me with a frozen game window. Since the game itself doesn't crash, no CrashInfo.dmp is created.

Pumaman

Quote from: monkey_05_06 on Thu 11/09/2008 21:11:38
When I manually abort the game using AbortGame I get an error and the call stack, but the call stack pane at the bottom sits on top of the script making it impossible for me to see the line in question without closing the call stack pane (since it's one of the last lines in the script). IIRC the error pane used to shorten the length of the script pane didn't it?

Oops thanks, I'll fix that.

QuoteI was playing around with the beta 8 editor and managed to crash it while testing my game. I'm not sure what exactly caused the crash, but I was dragging some lens effect objects (that use DynamicSprites created from the background) outside the screen limits. There does seems to be an error in my own SafeCreateFromBackground code, which is supposed to calculate sprite offsets to avoid invalid coordinates, because while trying to trigger the crash again I got an "Invalid coordinates" message from the debugger. But still, that shouldn't make the editor crash. I can't reproduce the bug consistently, but I've managed to do it three times now (out of ten or so attempts).

Hmm I haven't managed to reproduce this yet. Can you run the game without the debugger (Ctrl+F5), and see what error you get?

GarageGothic

Quote from: Pumaman on Sat 13/09/2008 14:46:36Hmm I haven't managed to reproduce this yet. Can you run the game without the debugger (Ctrl+F5), and see what error you get?

I cannot reproduce it when the debugger is turned off. Instead, I consistently get the error message:

Quotein "GlobalUtilities.asc", line 174
from "RefractObjects.asc", line 421
from "RefractObjects.asc", line 684

Error: DynamicSprite.CreateFromBackground: invalid co-ordinates specified

Which is also what I get about half the time I try to reproduce it with the debugger turned on. I managed to track down the bug in my own code (it turned out that the area I was retrieving was one pixel too wide because I didn't take into consideration that the top left pixel is 0,0 and not 1,1) and no longer get the bug, so I can only think it's directly related to calling DynamicSprite.CreateFromBackground on an area that is outside the room edges.

I did keep the original code in case you want to see it, but my test room is pretty messy (I use a debug function to drag objects and characters around on the screen with the mouse) so I'm not sure if anybody else would be able to reproduce the error.


Lt. Smash

1 BUG: Importing a single sprite with any corner as transparent, changes all black pixels in the sprite to the color of the corner pixels.
1 SUGGESTION: When importing multiple sprites, I would like to be able to choose the transparency settings once for all of them.

Adamski

The new Direct 3D scaling options seem to do some weird things! In 'Nearest Neighbour' mode there's some crazy mix-resolution thing going on, and characters and objects are all blurred and horrible. In 'Anti-Alias' mode, you can see black outlines of the walk-behind areas everywhere. I can drop some screenshots in a PM if it's helpful?

Shane 'ProgZmax' Stevens

CJ, I get this error exclusively in D3d mode in my game after executing a series of Lockview animations. 
I have confirmed that this does not occur in ddraw mode, however.  It's strange because it had no problem with other animation sequences up to that point.


This is with D3d mode with the 2x filter windowed.

---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occurred in ACWIN.EXE at EIP = 0x00000A0D ; program pointer is +32, ACI version 3.10.1042, gtags (4,0)

AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and notify CJ on the Tech forum.



Most versions of Windows allow you to press Ctrl+C now to copy this entire message to the clipboard for easy reporting.

An error file CrashInfo.dmp has been created. You may be asked to upload this file when reporting this problem on the AGS Forums. (code 0)
---------------------------
OK   
---------------------------

Pumaman

QuoteWhich is also what I get about half the time I try to reproduce it with the debugger turned on. I managed to track down the bug in my own code (it turned out that the area I was retrieving was one pixel too wide because I didn't take into consideration that the top left pixel is 0,0 and not 1,1) and no longer get the bug, so I can only think it's directly related to calling DynamicSprite.CreateFromBackground on an area that is outside the room edges.

I did keep the original code in case you want to see it, but my test room is pretty messy (I use a debug function to drag objects and characters around on the screen with the mouse) so I'm not sure if anybody else would be able to reproduce the error.

Hmm, it seems like the editor is having trouble parsing the call stack when the game quits with the error ... but I've tried this a few times myself and haven't been able to get it to crash.

Would you be able to upload the test game that caused this so that I can see if I can get it to crash too?

Quote1 BUG: Importing a single sprite with any corner as transparent, changes all black pixels in the sprite to the color of the corner pixels.
1 SUGGESTION: When importing multiple sprites, I would like to be able to choose the transparency settings once for all of them.

Can you post a sample image file that causes the bug?

As for multiple sprites, when you do a Quick Import Multiple Sprites it should use the transparency option that was last selected in the import window.

QuoteThe new Direct 3D scaling options seem to do some weird things! In 'Nearest Neighbour' mode there's some crazy mix-resolution thing going on, and characters and objects are all blurred and horrible. In 'Anti-Alias' mode, you can see black outlines of the walk-behind areas everywhere. I can drop some screenshots in a PM if it's helpful?

I can reproduce the anti-aliased mode black outlines, which I'll look into ... but I don't get any problems in Nearest Neighbour mode ... could you post a screenshot of that, and what resolution and colour depth is your game?

QuoteCJ, I get this error exclusively in D3d mode in my game after executing a series of Lockview animations. 
I have confirmed that this does not occur in ddraw mode, however.  It's strange because it had no problem with other animation sequences up to that point.

Any chance you could upload the CrashDump file, or post the game that this happens in for me to reproduce it?

Lt. Smash

Quote from: Pumaman on Sun 14/09/2008 15:03:45
Quote1 BUG: Importing a single sprite with any corner as transparent, changes all black pixels in the sprite to the color of the corner pixels.
1 SUGGESTION: When importing multiple sprites, I would like to be able to choose the transparency settings once for all of them.

Can you post a sample image file that causes the bug?
here:
normal sprite      sprite imported with top left pixel as transparent.

Quote
As for multiple sprites, when you do a Quick Import Multiple Sprites it should use the transparency option that was last selected in the import window.
I know that but its not very comfortable with many animations. Because I have some with alpha-transparency, some with blue/pink transparent areas, some with transparent pixels only on the bottom left/right. So I always have to import a single sprite first before I can import the rest? Not very easy/fast.

Pumaman

I just tried importing that image using top-left transparency and it seemed to import correctly.

Are you sure that PNG file is the exact same one you were trying to import?

Lt. Smash


subspark

Quote
* Added 4x Nearest Neighbour filter to allow 320x200 games to easily be run on widescreen monitors at 1280x800
* Fixed D3D causing stretched pixels if it ran a 320x200 game at 640x400


Thankful very much Chris. Your a brilliant programmer/designer/manager! Love your work on this version. It will allow sharp graphics at 2560x1600. I truly appreciate your support for these newer formats.
Cheers,
Sparx.

Pumaman

Quoteits this one

Ok thanks, I get the problem with that one; probably something to do with it being an 8-bit image. I'll look into it.

subspark, thanks, I'm glad you appreciate it :)

GarageGothic

#154
Quote from: Pumaman on Sun 14/09/2008 15:03:45Hmm, it seems like the editor is having trouble parsing the call stack when the game quits with the error ... but I've tried this a few times myself and haven't been able to get it to crash. Would you be able to upload the test game that caused this so that I can see if I can get it to crash too?

I managed to recreate the issue with a single line of code, but it behaves very inconsistently. In my game-in-progress, half the time it triggers a scripting error message from the debugger, half the time it simply crashes the editor. When I add the line to a newly created default game and run it with the debugger, the game may give the correct error a couple of times. But if I keep testing, the game starts locking up and must be ended through the task manager. If I run the same game without the debugger, the game always aborts with the correct error message (invalid coordinates).
For a long time I thought I couldn't replicate the editor crash with a newly created game, but it simply took one more step: After experiencing the frozen game, try opening another (or the same) game in the editor. The editor will crash with the "Error: Object reference not set to an instance of an object" message reported above.

The line causing the problems (in a 640x480 32-bit game) is:
Code: ags
DynamicSprite.CreateFromBackground(0, 600, 100, 41, 80);


Edit: Later in the evening I experienced the same type of engine crash after calling DynamicSprite.Resize with a zero width/height.

RickJ

#155
Quote
The problem is that it's hard to tell where the problem lies. The error thrown is an internal .NET Framework error so the problem could be:
1. A bug in the .NET Framework when running in VirtualBox
2. A bug in Windows when running on VirtualBox that returns an invalid error code
3. A bug in the VirtualBox network/mapped drive driver, that returns an unexpected error code
4. Any/all of the above
Thanks for the info.  I have done a little research and it would appear that the "No more files" exception is thrown when .net attempts to get a list of files from an empty network maped directory as illustrated in the code below.   I found this mentioned in this  MSDN Forum post describing the same problem.

Code: ags

String[] files = Directory.GetFiles("\\localhost\myfolder","abc*.exe", SearchOption.AllDirectories);


I have discussed this with smiley, who created the audio manager plug-in.  He and I ran a number of tests to confirm that this is indeed the behavior.   It would appear that ignoring the "No more files" exception on a network drive is, more likely than not, acceptable and would allow the .NET Directory.GetFiles function to work the same on both networked and local drives. 

I hope this info is useful to you.  I'll leave it up to your own good judgment as how to proceed from here.   I will be happy to volunteer as a tester or volunteer to create an old style C dll if you decide to pursue this issue further.  Thanks for all your hard work;  it's greatly appreciated.   

Rick

Pumaman

QuoteI managed to recreate the issue with a single line of code, but it behaves very inconsistently. In my game-in-progress, half the time it triggers a scripting error message from the debugger, half the time it simply crashes the editor

I didn't manage to reproduce this myself; but the debugger has been rather dodgy because of the way it was communicating between the editor and the engine.

For beta 9 I have rewritten this to use a different method, so can you let me know whether you still get the problem?

QuoteI have discussed this with smiley, who created the audio manager plug-in.  He and I ran a number of tests to confirm that this is indeed the behavior.   It would appear that ignoring the "No more files" exception on a network drive is, more likely than not, acceptable and would allow the .NET Directory.GetFiles function to work the same on both networked and local drives. 

The problem is that it's not possible to easily ignore this exception. The exception type is a "IOException" which is quite generic, and if it ignored that then real errors would not get picked up.

It's not possible to filter on the "No more files" message, because on non-English versions of Windows that message will be localized.

Therefore I'm not sure how to address this. Maybe I could add an "unofficial" registry setting or something which would allow the editor to ignore this exception, making it a "use at your own risk" type feature.



Anyway, beta 9 is now up. Originally this was going to be a Release Candidate, but I ended up doing two quite major things (custom dialog options, and rewriting the debugger communication) so I think it needs a bit longer to be tested.

monkey0506

I'm pretty excited about the new custom dialog system. It seems like it might be a bit complicated for the end-user (say if they want a scrolling dialog), but modules could be written to encapsulate and simplify the code...provided the dialog_options_* functions are available from scripts other than the global script (not yet tested).

Thanks for your hard work on this Chris!

Lt. Smash

wow the new custom dialog system is great.
Just a little grafical issue:

When a text is displayed in a textwindow (Display("asdf");) you can erase the dialog gui.

monkey0506

I think it's removing the dialog DrawingSurface from the screen but then displaying the text box before the screen is actually graphically updated.

SMF spam blocked by CleanTalk