AGS 3.3.0 Release Candidate

Started by Crimson Wizard, Thu 04/04/2013 19:16:28

Previous topic - Next topic

Crimson Wizard

Found bug related to panels.

When the room is recompiled the room editor is closed.
Because of new panel system it now works differently: the panel the room editor was opened on hides, but the room still stays marked as "opened" in the project tree (colored icon).
More, if you unpin the room editor's panel and make it a floating window, it will dissapear when compiled too, but it will stay in the Windows list. Being reopened, it does not have a room image on it, just a plain grey rectangle. When you open same room again by double-clicking  in the project tree, a new panel is opened instead.

How to reproduce:
1. Open any existing room.
2. Drag it away and place as a floating panel somewhere on screen.
3. Select "Build" - "Rebuild all files". The room panel will hide, but room is still marked as "being edited" in the project tree.
4. Open "Window" menu. You will see Room N window still exists, just not visible. Click it to reveal the panel.
5. Open same room by double-clicking on it in the project tree. It will open on the new panel.

tzachs

Quote from: Crimson Wizard on Sat 27/07/2013 13:45:38
UPD: tzachs, I noticied that from Beta 6 the Project Explorer panel is missing when the editor starts for the first time (Layout.xml was not yet saved).
This didn't reproduce for me.
Did you perhaps delete the file from AGS executable folder? The xml file is not loaded from there anymore. It was an issue for people installing on program files, since then it requires administrator permissions to save the file. So the file moved to the app data folder, according to Windows best practices. I did make a fix though, it was saved to the Roaming folder, instead to Local\AGS folder.

Quote
Found bug related to panels.
...
Fixed.

MiteWiseacreLives!

I am not sure it this is the right spot for editor suggestions.. But, I would like to see the "Import Sprite" window become adjustable in size. Sometimes when trying to grab larger than the window sprites, I have to monkey around a fair bit. Anyone else agree?

kconan

Quote from: MiteWiseacreLives! on Thu 01/08/2013 07:35:03
I am not sure it this is the right spot for editor suggestions.. But, I would like to see the "Import Sprite" window become adjustable in size. Sometimes when trying to grab larger than the window sprites, I have to monkey around a fair bit. Anyone else agree?

Agreed.  I'd like to see the window bigger or sizeable.

AGD2

#204
Just wanted to drop this here. I frequently get the following crash in 3.3.0 beta when double-clicking to open a room file. It typically happens only after the editor has already been open for a while and I have been editing scripts, importing sprites, and so forth. If you need any more info, let me know.


QuoteA problem has occured, and AGS does not know how to deal with it. Please help us to improve AGS by using the "Send Error Report" button to send this error information to the AGS website for investigation.

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

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at load_room_file(SByte* )
   at load_crm_file(UnloadedRoom roomToLoad)
   at AGS.Native.NativeMethods.LoadRoomFile(UnloadedRoom roomToLoad)
   at AGS.Editor.Components.RoomsComponent.LoadNewRoomIntoMemory(UnloadedRoom newRoom, CompileMessages errors)
   at AGS.Editor.Components.RoomsComponent.LoadDifferentRoom(UnloadedRoom newRoom)
   at AGS.Editor.Components.RoomsComponent.LoadRoom(String controlID)
   at AGS.Editor.Components.RoomsComponent.ItemCommandClick(String controlID)
   at AGS.Editor.Components.BaseComponentWithFolders`2.CommandClick(String controlID)
   at AGS.Editor.ProjectTree.ProcessClickOnNode(String nodeID, MouseButtons button)
   at AGS.Editor.ProjectTree.projectTree_NodeMouseDoubleClick(Object sender, TreeNodeMouseClickEventArgs e)
   at System.Windows.Forms.TreeView.OnNodeMouseDoubleClick(TreeNodeMouseClickEventArgs e)
   at System.Windows.Forms.TreeView.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)


Another bug I have noticed: Create two separate folders in the Sprite Manager and give them identical names (let's call both folders "GFX"). Import images into sprite slots 1, 2, and 3 in the first folder and into slots 4, 5, and 6 in the second folder. Next, create a view/loop in the "Views" editor and for frames 0, 1, and 2, use sprite slots 4, 5, and 6 from the second folder.

Now, double-click on any frame in that loop to open the Sprite Manager. Instead of opening in the second "GFX" folder and highlighting the relevant sprite, as it should, it instead opens the first "GFX" folder and highlights nothing. It actually doesn't matter if the identical folder name is a sub-folder - AGS will always find the first instance of the folder name and open it, regardless of whether it's the right one. (The same bug also occurs when clicking the "Image" button for a room object sprite or on GUIs).

Crimson Wizard

Hi guys, I am sorry, I was leaving a city for some time and could not do everything I wanted before I left. Now I am back.

Last time I was trying to find the cause of this crash during room loading. The one AGD2 just reported looks like precisely the one reported by cat some time ago, and it seem to be the only serious problem found in AGS at the moment (which is still unfixed).

Knox

#206
I'm not sure if I should post this here, but I've come across a few errors while migrating my game from 3.2.1 + AGS Draconian r7 to 3.3/3.4 (worked OK before with AGS 3.2.1 + AGS Draconian r7)


I get that error when I try to use any custom extender function for the mouse..."void UseNormalCursors(this Mouse*)", for example.

It doesn't matter what is inside that function (even if I comment out the contents I still get that error). Right now the only way I can get the game to run is by commenting out the call to that function //mouse.UseNormalCursors();...the only thing is, I'm using similar functions like that everywhere and the game crashes everytime I used them.

Also, "gamma in windowed mode" no longer seems to work (System.Gamma = sldGamma.Value;). I'm guessing because the Draconian changes haven't been added yet?

**Im using AGSBlend and Custom Properties Helper Plugin(which I can finally remove since we now have no custom property limits in 3.4 :))

--All that is necessary for evil to triumph is for good men to do nothing.

Crimson Wizard

#207
We were planning to add some (if not all) of Draconian changes months ago, but still did not get to that, sorry :-/.
(Well, 256-char WFN font support is already there).
Me or Alan should just find time to look through them, copy and test results.
EDIT: Hmm... I think I know what I'll be doing on these weekends :tongue:

Regarding extender function, this is not good at all. I'll check this very soon.
EDIT2: Ok, I found what's wrong; interesting thing is that it errored only for very limited set of types (not Character, Object, etc), that's why I did not notice this before.
I'll be making a new builds for 3.3.0 and 3.4 alpha soon.

Knox

--All that is necessary for evil to triumph is for good men to do nothing.

Crimson Wizard

Yes... silly mistakes are often easy to fix :tongue:

BTW, that error message was put there by me for safety reasons, to make sure that the script runs properly. Only I marked one legal case as an illegal one, so it triggered in your script.

Crimson Wizard

Quote from: kconan on Thu 08/08/2013 03:18:50
Quote from: MiteWiseacreLives! on Thu 01/08/2013 07:35:03
I am not sure it this is the right spot for editor suggestions.. But, I would like to see the "Import Sprite" window become adjustable in size. Sometimes when trying to grab larger than the window sprites, I have to monkey around a fair bit. Anyone else agree?

Agreed.  I'd like to see the window bigger or sizeable.

Okay, making it sizeable for the next release.

Crimson Wizard

#211
AGS 3.3.0 BETA 7 released (engine version 3.3.0.1142)
-------------------------------------------------------
First of all, I added a temporary log file that will be written every time a room is loaded in the editor. Unfortunately I was unable to find out what caused the reported crash, so I hope if that happens again it will be at least possible to tell at which point it does.
The file named "agsnative.log" is created in your "My Documents\AGS" (or "<Username>\Documents\AGS") folder (this is done so to make it work under Win7/Vista in case you installed AGS on drive C).

-------------------------------------------------------
Changes from BETA 6:

Features:
- Renamed SkipSpeechType to SkipSpeechStyle (please, fix your scripts if you are using this class);
- Added two more options for the Skip speech style:
   * Skip by keyboard only (no timer) - eSkipKey,
   * Skip by mouse only (no timer) - eSkipMouse;
Now there is a full set of possible choices for this setting. Also corrected option descriptions in the game settings to make them correspond to the actual meaning of the choice.
- Sprite Import window is now resizable.

Bug fixes:
- Fixed the broken game project import (regression).
- Fixed broken dialog script compilation (regression).
- Fixed error in the savedgame loading routine which occured when loading persistent Overlays (regression). Previously created savedgames should still be usable with this version, for this fix only changes engine reaction to certain data.
- Fixed extender functions added for certain types (Mouse, System) were not correctly recognized by script interpreter (regression).
- Fixed crash that occured when ListBox.GetItemAtLocation() is called from repeatedly_execute_always() just before the list box is about to be drawn on screen for the first time.
- Moved the Layout.xml file from AppData\Roaming to AppData\Local\AGS.
- Fixed crash when auto complete is running on an extender function which is in the end of the file.
- Possible fix for docking ruined on tab switch.
- Fixed room panel was still in "Windows" menu with "loaded" icon displayed in tree after rebuilding all files.
- Fixed Editor allowed to create more game items than engine supports, which could cause crashes in Editor or Engine.


Download links (also updated at first page):
EXE:
http://www.adventuregamestudio.co.uk/betas/AGS-3.3.0-beta7.exe
ZIP:
http://www.adventuregamestudio.co.uk/betas/AGS-3.3.0-beta7.zip

Knox

#212
I'm getting this error now when trying to use that mouse extender function:

Error: Error running function 'on_mouse_click':
Error: internal error: undefined value pushed to stack

Code: ags

void EnableAllModes(this Mouse*)
{
  //enable all mouse modes...
  int i;
  while (i < Game.MouseCursorCount)
  {
    if (mouse.EnableMode(modeList[i]) == false) mouse.EnableMode(modeList[i]);
    i++;
  } 
}




(Oh, and is there a way to save/load or lock/unlock our current pane layout?) :=
--All that is necessary for evil to triumph is for good men to do nothing.

Crimson Wizard

#213
@General_Knox, this part of your function does not make much sense:
Code: ags

if (mouse.EnableMode(modeList[i]) == false) mouse.EnableMode(modeList[i]);


Mouse.EnableMode does not return anything (useful) (it may return 0 always, or random value, but details are not so important).
This seem to be a Editor/compiler issue: the "EnableMode" function is declared as "void", but it is assumed to return integer... This is very bad, because, in fact, EnableMode returns void (aka "nothing") in the engine.
The 3.2.1 and earlier versions AGS let this through, but the new engine is bit more restrictive (this helps to find errors in script). Compiler should be changed appropriately.

I am wondering what do you want to do here in this function. At the moment that line may be simply replaced by:
Code: ags

mouse.EnableMode(modeList[i]);

This will do the same.

As for fixing the error, I suppose it is not an engine bug, but a compiler's one. It should not let to use "void" in the expressions like that.
I am not yet sure if the engine needs a "backwards-compatible" fix to cover such cases (in case such expressions were used in older games). I might add it if we find out it causes troubles with any of the existing games running on a new engine.
Although I would be really reluctant to do so, because this will practically "legalize" undefined behavior in script.

EDIT: I found an interesting thing. It appears that compiler DOES usually restrict using void return values, for example:
Code: ags

bool result = mouse.EnableMode(modeList[i]);

or
Code: ags

function a(bool b)
{
}
<...>
a(mouse.EnableMode(modeList[i]));

Those script examples will cause compiler error.

However, using void return value as an argument to any operator is compiled without errors!
Code: ags

bool b = mouse.EnableMode(modeList[i]) == false;
int a = mouse.EnableMode(modeList[i]) + 1;
etc






Quote
(Oh, and is there a way to save/load or lock/unlock our current pane layout?)
Hmm, did you try dragging them around?
Check this video tutorial: http://www.youtube.com/watch?v=o6jjOmBB5gQ

Knox

#214
Quote from: Crimson Wizard on Fri 06/09/2013 08:59:29
The 3.2.1 and earlier versions AGS let this through, but the new engine is bit more restrictive (this helps to find errors in script). Compiler should be changed appropriately.
Ah I didn't know that! You're right, now it works when I remove the line that doesn't make sense (keeping it just at mouse.EnableMode(modeList) works). I mainly used "void" cause Monkey was using it and well, he's cool.

Quote from: Crimson Wizard on Fri 06/09/2013 08:59:29
As for fixing the error, I suppose it is not an engine bug, but a compiler's one. It should not let to use "void" in the expressions like that.
Ok, so should I use "function" instead of "void" for EnableAllModes()?

PS: Thanks Crimson for explaining how it all works, I learnt something today! :smiley:

EDIT: I can drag the panels around fine, I was just wondering if there way a way to lock them in place incase we move them by accident (or save the layout so we can load it again later)
--All that is necessary for evil to triumph is for good men to do nothing.

Crimson Wizard

#215
Quote from: General_Knox on Fri 06/09/2013 17:37:10
Quote from: Crimson Wizard on Fri 06/09/2013 08:59:29
As for fixing the error, I suppose it is not an engine bug, but a compiler's one. It should not let to use "void" in the expressions like that.
Ok, so should I use "function" instead of "void" for EnableAllModes()?
I don't think so, why? Void is perfectly correct type, just do not try to use the "void" return value in an expression, like you did with "EnableMode".
In fact, I'd tell not to use "function" at all. But the habit might be too strong. :)

Quote from: General_Knox on Fri 06/09/2013 17:37:10
EDIT: I can drag the panels around fine, I was just wondering if there way a way to lock them in place incase we move them by accident (or save the layout so we can load it again later)
When you drag panels over different regions of the window you'll see "docking" icons. By draggin & dropping a panel on that icon you'll lock the panel on that place. Video displays how it is done.
Regarding saving layout: I think I am starting to understand what you mean. You are speaking of layout presets that you may save/load from menu? I think you better ask tzachs about this, he was implementing those panels.

Knox

Yes, thats what I meant! Ill ask him if we can have a save/load layout, or like a "lock icon" on the panels so they no longer move, even if you attempt to drag them (like how we can lock buttons in place on a GUI). Thanks!
--All that is necessary for evil to triumph is for good men to do nothing.

tzachs

Adding a "lock" feature is a bit tricky since we're using a third party api (dockpanel suite) and they handle moving the panels. I guess it can be done, will need to check if their API allows for it (and if it doesn't we'll need to contribute to their open source project which complicates things...).

Adding save/load layout feature should be easy enough, and I'll probably add it once 3.3 ships (currently I stopped development of new features until 3.3 is out of beta).

Currently, AGS saves its layout on exit and loads it at startup, so as a workaround you can set your desired layout, close AGS, copy the layout.xml file (it should be located at %userprofile%\AppData\Local\AGS) to a backup and put it back when you want to reload it.

Sledgy

Who has 3.2.1 (build 111) source?

Crimson Wizard

#219
Quote from: Sledgy on Sun 08/09/2013 16:24:05
Who has 3.2.1 (build 111) source?
The CJ's SVN was here: https://svn.adventuregamestudio.co.uk:7743/svn/ags/trunk
But I believe it has a different address now (if it still exists), because there is no "adventuregamestudio.co.uk" anymore. :undecided:

Here I uploaded the one I have on my HD: http://www.mediafire.com/download/337kfddf8dm4eks/Pumaman_AGS.zip
I believe it has no modifications.

SMF spam blocked by CleanTalk