AGS 3.4.0.6 (Alpha) - Builder Patch

Started by Crimson Wizard, Sat 27/09/2014 17:25:18

Previous topic - Next topic

Terrorcell

#220
I've found a bug relating to for loops and 'continue' (reproducible). I created a game from the Default Game template, placed that code in the first room's room_FirstLoad() function, and tried to compile.

Example:
Code: ags

function room_FirstLoad()
{
    for (int i = 0; i < 10; i += 1)
    {
        if (true)
        {
            continue;
        }
    }
}


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

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. ---> System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at ccCompileText(SByte* , SByte* )
   at AGS.Native.NativeMethods.CompileScript(Script script, String[] preProcessedScripts, Game game, Boolean isRoomScript)
   at AGS.Editor.NativeProxy.CompileScript(Script script, String[] preProcessedData, Game game, Boolean isRoomScript)
   at AGS.Editor.AGSEditor.CompileScript(Script script, List`1 headers, CompileMessages errors, Boolean isRoomScript)
   at AGS.Editor.Components.RoomsComponent.SaveRoomOnThread(Object parameter)
   at AGS.Editor.BusyDialog.RunHandlerOnThread()
   --- End of inner exception stack trace ---
   at AGS.Editor.BusyDialog.Show(String message, ProcessingHandler handler, Object parameter)
   at AGS.Editor.Components.RoomsComponent.SaveRoomButDoNotShowAnyErrors(Room room, CompileMessages errors, String pleaseWaitText)
   at AGS.Editor.Components.RoomsComponent.RecompileAnyRoomsWhereTheScriptHasChanged(CompileMessages errors, Boolean rebuildAll)
   at AGS.Editor.Components.RoomsComponent.AGSEditor_PreCompileGame(PreCompileGameEventArgs evArgs)
   at AGS.Editor.AGSEditor.PreCompileGameHandler.Invoke(PreCompileGameEventArgs evArgs)
   at AGS.Editor.AGSEditor.CompileGame(Boolean forceRebuild, Boolean createMiniExeForDebug)
   at AGS.Editor.Components.BuildCommandsComponent.CompileGame(Boolean forceRebuild)
   at AGS.Editor.Components.BuildCommandsComponent.CommandClick(String controlID)
   at AGS.Editor.ToolBarManager.ToolbarEventHandler(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.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 AGS.Editor.ToolStripExtended.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)
[close]

Gurok

#221
I'm looking into this. At least it's not a stack pointer problem :/

EDIT: Found the problem, reproduced it, sufficiently embarrassed. I have a pull request on the Git repository that fixes this.
[img]http://7d4iqnx.gif;rWRLUuw.gi

Terrorcell

Quote from: Gurok on Mon 04/05/2015 23:18:39
I'm looking into this. At least it's not a stack pointer problem :/

EDIT: Found the problem, reproduced it, sufficiently embarrassed. I have a pull request on the Git repository that fixes this.
One step closer to the final build :tongue:

proximity

When i go fullscreen with my test game, mouse cursor moves weird. Is this a known issue ?

Game resolution : 1920*1080
Dekstop resolution : 1920*1080
Proximity Entertainment

xil

Quote from: proximity on Sun 17/05/2015 17:49:31
When i go fullscreen with my test game, mouse cursor moves weird. Is this a known issue ?

Game resolution : 1920*1080
Dekstop resolution : 1920*1080

Unfortunately so. It does only tend to be with certain mice and certain drivers though (essentially the types of mice that tend to fall into the 'gaming' category e.g. high DPI).
Calico Reverie - Independent Game Development, Pixel Art & Other Stuff
Games: Mi - Starlit Grave - IAMJASON - Aractaur - blind to siberia - Wrong Channel - Memoriae - Point Of No Return

proximity

Quote from: xil on Sun 17/05/2015 23:36:30
Quote from: proximity on Sun 17/05/2015 17:49:31
When i go fullscreen with my test game, mouse cursor moves weird. Is this a known issue ?

Game resolution : 1920*1080
Dekstop resolution : 1920*1080

Unfortunately so. It does only tend to be with certain mice and certain drivers though (essentially the types of mice that tend to fall into the 'gaming' category e.g. high DPI).

So you're saying some of the players will get smooth movement, others will get this jump effect with the cursor. This is bad.
Proximity Entertainment

xil

Quote from: proximity on Mon 18/05/2015 02:17:04
Quote from: xil on Sun 17/05/2015 23:36:30
Quote from: proximity on Sun 17/05/2015 17:49:31
When i go fullscreen with my test game, mouse cursor moves weird. Is this a known issue ?

Game resolution : 1920*1080
Dekstop resolution : 1920*1080

Unfortunately so. It does only tend to be with certain mice and certain drivers though (essentially the types of mice that tend to fall into the 'gaming' category e.g. high DPI).

So you're saying some of the players will get smooth movement, others will get this jump effect with the cursor. This is bad.

Well "jump effect" makes me wonder if we are experiencing the same thing. The current issue with certain mice/driver setups is to do with the acceleration. Some people with the affected devices may not even notice an issue because generally speaking adventure games do not require twitch reactions. If you move an affected device smoothly then the pointer will react smoothly, if you move an affected device very quickly then that's when a player might have issues (it may be similar to what you refer to as the mouse "jumping").

The problem is being worked on currently so hopefully it can be resolved. There has been test builds over the last few months which reduce the issue but don't fix it, so perhaps one of those solutions will be integrated if the issue is too difficult or impossible to solve completely.
Calico Reverie - Independent Game Development, Pixel Art & Other Stuff
Games: Mi - Starlit Grave - IAMJASON - Aractaur - blind to siberia - Wrong Channel - Memoriae - Point Of No Return

proximity

#227
No, we're not experiencing the same thing. It's not about cursor's movement speeed or sensitivity. When i move the cursor in fullscreen test, cursor does not always go to the location where i pointed to. It's jumping to 20-30, maybe more pixels away from the point. So i feel like i don't have full control of the cursor. When i test it in windowed mode, there is no problem with the movement. I can explain that "jump" effect like this.

Note : After writing this post, i tested it again with very slow moves. Result is the same. There is no difference between slow moves and fast moves. By the way, my mouse is Logitech M235 Wireless Nano device. Should i test it with another mouse ?
Proximity Entertainment

xil

Unfortunately it does seem that the Logitech mice and drivers are the worst affected. I can go from my Razer Naga to a cheap non branded mouse and have the movement go from barely usable to perfect by simply switching mice. Switching mice does seem to be the only way for people using affected Logitech devices to play in fullscreen for the time being.

Hopefully it will be something that can be sorted for the next major version.

Calico Reverie - Independent Game Development, Pixel Art & Other Stuff
Games: Mi - Starlit Grave - IAMJASON - Aractaur - blind to siberia - Wrong Channel - Memoriae - Point Of No Return

proximity

 I found a cheap and wired mouse and tested it again. Result is still the same :( I think this is related to fullscreen rendering of the engine. May be AGS does not handle high resolutions very well.
Proximity Entertainment

xil

Quote from: proximity on Mon 18/05/2015 18:21:45
I found a cheap and wired mouse and tested it again. Result is still the same :( I think this is related to fullscreen rendering of the engine. May be AGS does not handle high resolutions very well.

Damn, that's not good :-\ I'll have a look myself later on in a high res test. At least we can pass some more data to the dev working on it which might allow him to debug the problem further.
Calico Reverie - Independent Game Development, Pixel Art & Other Stuff
Games: Mi - Starlit Grave - IAMJASON - Aractaur - blind to siberia - Wrong Channel - Memoriae - Point Of No Return

AGD2

Great to see all these improvements finally rolled into one. Nice job, CW. And thanks again to Gurok for getting that Papagayo support implemented. That'll be a real time-saver!

I've started testing the Mage's Initiation source code in this latest alpha. And I seem to encounter Illegal exception crashes whenever ResetRoom() is called. I'm always calling it in a room other than the one that I'm trying to reset - typically in the room_Load function. Here's an example of the crash message I'll receive:

Spoiler

---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occurred in ACWIN.EXE at EIP = 0x0042BE65 ; program pointer is +1004, ACI version 3.4.0.4, gtags (15249,387)

AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and post the details on the AGS Technical Forum.

in "room2.asc", line 243
[close]

Also, regarding removal of the confirmation prompt when closing all other tabs, can I make a request for that to be reimplemented (or at least optional in the settings)? Many's the time I've had numerous important tabs open (sometimes 30+) when I accidentally mis-clicked "close all tabs". That confirmation prompt saved my skin and prevented me from losing my place during complex coding sessions. Since 'closing all other tabs' doesn't seem to be an action the user will be performing very frequently, I think the usefulness of the safeguard outweighs the minor hindrance of having to click an extra dialog button from time to time.

CTxCB

I've got an improvement that I'd LOVE to see added: When right clicking on a GUI in the Project Explorer, have a "Duplicate GUI" option. This would copy everything from the selected GUI and create a new GUI with a standard name (E.g: gGui1) from it.

Armageddon

I'm curious, why doesn't this version of AGS include the character scaling fix from the Draconian version of AGS? I like that feature in the Draconian version but I also want custom resolution sizes from this version. :P

Terrorcell

Quote from: CTCB on Sat 30/05/2015 00:35:30
I've got an improvement that I'd LOVE to see added: When right clicking on a GUI in the Project Explorer, have a "Duplicate GUI" option. This would copy everything from the selected GUI and create a new GUI with a standard name (E.g: gGui1) from it.
Considering all the contents of each GUI are public to each script, the duplication would have to account for buttons, etc., with the same names.
I agree, it would be a nice feature.

Crimson Wizard

Quote from: Armageddon on Sun 31/05/2015 05:25:41
I'm curious, why doesn't this version of AGS include the character scaling fix from the Draconian version of AGS?
Not only that, I believe.
May someone make a list of things that were not copied from Draconian yet?

proximity

Hi, Crimson. I can't get a screenshot of the game when i press the PrtScr button on my keyboard. I just get black screen. Is this a known issue ?

Game resolution : 1920*1080 full screen
Proximity Entertainment

Armageddon

Quote from: Crimson Wizard on Sun 31/05/2015 11:07:36
Quote from: Armageddon on Sun 31/05/2015 05:25:41
I'm curious, why doesn't this version of AGS include the character scaling fix from the Draconian version of AGS?
Not only that, I believe.
May someone make a list of things that were not copied from Draconian yet?
I think it's just the character scaling and the gamma adjustment, unless anyone cares about the DirectDraw pixel shaders, you shouldn't use DirectDraw anyways.

What are the chances of fixing the character scaling in this engine branch though/how soon? I know the Draconian version is open source too.

AGD2

Keep in mind that the character scaling fix is also meant to be optional, for the reasons previously discussed in the following thread:

http://www.adventuregamestudio.co.uk/forums/index.php?topic=47966.msg636472949#msg636472949

Armageddon

Quote from: SnarkyLike Scavenger says, this is a hideous bug that should be fixed ASAP, and I find the decision to deliberately inflict it on your game deeply disturbing. Plus, relying on players not changing the filter settings?! Madness!

I don't think we should all suffer just because your one game uses the bug in a strange way. Most people would prefer to have it fixed.

SMF spam blocked by CleanTalk