My personal list of problems with AGS 4

Started by Monsieur OUXX, Yesterday at 21:16:43

Previous topic - Next topic

Monsieur OUXX

I upgraded my game to AGS 4.00.00.18-alpha22.
I'm still using the AGS3 compiler, not the AGS4 compiler.

Here are the problems I'm experiencing so far :

- After about let's say, 5 to 10 "rebuild all" which all end up with errors found in the script, I get an Exception in the editor. I haven't screenshot it; my focus is not on that right now. But it happened every time (I would close the editor, open it again, run "rebuild all" 5 to 10 times, and get the same exception).

- The Editor is an old .Net app. As a consequence, when running on high DPI screens (let's say 1280x800 or more), by default its UI doesn't get scaled up and appears pixely and slightly blurry. In order to fix that, we can enable "Change high DPI settings" in the Compatibility tab of Windows, and then tick "Override high DPI scaling behaviour". This works great (and it makes AGS look like a modern app), except for two things :
1) all the icons (run, save, properties, etc.) are tiny. They would need to be scaled up at least 4 times.
2) The "courrier new" font appears weirdly thin in the Code editor. So thin that at first I thought it was all grayed out. I made it work by using the first random open-source font replacement I came across (I went to dafont.com and picked "NK57 Monospace Sc Sb".

- I've had one room (out of a hundred) that couldn't get converted from AGS 3.6.1 to AGS 4. It wasn't a big deal, I just deleted it. I can provide it if asked. Note that this room was created a LONG time ago, maybe in AGS 3.2, and went through AGS 3.4 and AGS 3.6.

Apart from that it's all good so far. Impressively stable.

I will continue adding items as I find them.
 

Crimson Wizard

#1
So, you mention exceptions, but do not post them (you can use ctrl+c / ctrl+v to paste the error message), you mention a broken room but neither tell what the failure was, nor post the room for us to test.

What are we supposed to do in this situation? Are you planning to add more items same way? Which outcome do you expect?

Quote from: Monsieur OUXX on Yesterday at 21:16:432) The "courrier new" font appears weirdly thin in the Code editor. So thin that at first I thought it was all grayed out. I made it work by using the first random open-source font replacement I came across (I went to dafont.com and picked "NK57 Monospace Sc Sb".

Have you tried changing the script font's size/style in the Editor Preferences?


Monsieur OUXX

#2
Quote from: Crimson Wizard on Yesterday at 21:35:20You did not give any details

Like I said, when that happened I was focused on something else. But after I was done, I still thought it was worth reporting "on principle", if only to raise the issue.

So anyways, it happened again just now, and this time I was ready to troubleshoot. Here is the exception that happens at build :

Code: ags
Error: External component has thrown an exception.
Version: AGS 4.00.00.18

System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception. ---> System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception.
   at ccCompileText(SByte* , SByte* )
   at AGS.Native.AGS3ScriptCompiler.CompileScript(String scriptName, String[] scriptTexts, ScriptCompilerOptions options, CompileMessages messages)
   at AGS.Editor.AGSEditor.CompileScript(IScriptCompiler compiler, Script script, List`1 headers, CompileMessages messages)
   at AGS.Editor.AGSEditor.CompileScript(Script script, List`1 headers, CompileMessages messages)
   at AGS.Editor.Components.RoomsComponent.SaveRoomOnThread(IWorkProgress progress, Object parameter)
   at AGS.Editor.BusyDialog.RunHandlerOnThread()
   at AGS.Editor.BusyDialog.Show(String message, ProcessingHandler handler, Object parameter, Int32 timeoutMs)
   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.TestGame(Boolean withDebugger)
   at AGS.Editor.Components.BuildCommandsComponent.CommandClick(String controlID)
   at AGS.Editor.GUIController._mainForm_OnMenuClick(String menuItemID)
   at AGS.Editor.MainMenuManager.MenuEventHandler(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs 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.ToolStripMenuItem.ProcessCmdKey(Message& m, Keys keyData)
   at System.Windows.Forms.ToolStripManager.ProcessShortcut(Message& m, Keys shortcut)
   at System.Windows.Forms.ToolStripManager.ProcessCmdKey(Message& m, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Form.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Form.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
   at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
   at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)

Quote from: Crimson Wizard on Yesterday at 21:35:20Font size of courrier new
Yes. The issue is really the thinness, not the size. I guess that in "low res", the font appeared slightly beefier because of the rogue extra pixels added by the font rasterization and the high contrast trick (blue pixels on the left, red pixels on the right).  But now in "real" hi-res it's really too thin for good readability.

But then again maybe the issue would not be there without the special DPI scaling setting for compatibility; I have no way of telling because I don't know how this kind of .Net GUI issues is fixed on developer side, i.e. if the devs need to change some UI-related setting when they build the .Net app (and then it will be built in a new way that looks hi-res but still pretty out of the box), OR if what I'm seeing represents what the app will really look like in high-res.


Quote from: Crimson Wizard on Yesterday at 21:35:20Please provide the broken room
Let me zip that up and I will send it to you in private.
 

Crimson Wizard

The SEHException in "AGS3ScriptCompiler.CompileScript" is likely from the memory leak that is occuring when compiling rooms, causing out of memory eventually. This is fixed in the repository, and the fix will be included in the next update.

Monsieur OUXX

Quote from: Crimson Wizard on Yesterday at 22:54:32memory leak
Yes, I believe I've seen an "overflow" error at some point, even though it does not appear in that specific call stack. That's great news.
 

Monsieur OUXX

#5
In case it went unnoticed : The AGS 4 compiler is now stricter on "enum versus int" when it comes to declaring attributes (and their dedicated setter/getter).
For me it's a non-issue, I'm just reporting it. If it's by design just ignore it.

Code snippet (actually from the Thumbleweed module or one of its dependencies) :
Code: ags

// The struct that holds the dynamic array 
struct MyStruct {
  import static attribute int SomeArray[]; // Declared as int
}

// The array setter
void seti_SomeArray(static MyStruct, eSomeEnum index,  int value)  //the index is an enum instead of an int
{
   ...
}

The new compiler complains that "index" should be an int. It is (obviously) solved it by changing the type to int.

=========

Also, not directly the same issue: The author of the module originally made the setters return a boolean, like this :

Code: ags
bool seti_xxx(...) {  // Returns bool instead of void
{
   ...
}
The new compiler wants void as return type. In this case it doesn't matter because the method wasn't returning anything (no "return" statement at all). No idea if it was a bug or by design (again: I personally never use those setters).

I solved it by changing the return type to void.
 

Crimson Wizard

Regarding the faulty "room 2" from your project.

First of all, Editor does not display a full error message, only the top-level message "Failed to load room", but not detailed message. That has to be fixed.

Checking the real reason under debugger, this is related to the "room messages", which are no longer supported, and cannot be loaded.

I suppose that in this particular case AGS 4 could skip these and continue, with a warning. But it just stops now.
The workaround is to open this room in 3.6.x and remove room messages.

Monsieur OUXX

Quote from: Crimson Wizard on Yesterday at 22:54:32I suppose that in this particular case AGS 4 could skip these and continue, with a warning.

Whatever works!
 

Crimson Wizard

#8
Quote from: Monsieur OUXX on Yesterday at 23:34:03In case it went unnoticed : The AGS 4 compiler is now stricter on "enum versus int" when it comes to declaring attributes (and their dedicated setter/getter).
For me it's a non-issue, I'm just reporting it. If it's by design just ignore it.

Indeed, the new compiler is more strict. This is by design and intentional.

In regards to the attribute's index: having an enum there is mostly useless as you will not be able to tip using enum to your module users just with a syntax, as the index type is only visible in the getter/setter implementation, and not in declaration.

You can still pass enum when accessing this property though.

EDIT: I suppose, we might plan a syntax feature where an indexed attribute would require enum instead of an integer.


Quote from: Monsieur OUXX on Yesterday at 23:34:03Also, not directly the same issue: The author of the module originally made the setters return a boolean

That's of course a mistake by the module author(s), the setters should not return anything, because they are meant to set and not get.

Monsieur OUXX

A real issue with the editor :

When the game crashes (because of any kind of script error, like "array out of bounds" or even an AbortGame(""); added on purpose) then the Editor stops, highlights the line of the error, and displays a popup window with the error message (as it always has).

But in the AGS 4 editor, the popup disappears instantly. I can see it flash but it closes itself before I have the time to read the message.


EDIT: if it's a known issue don't bother replying. I mean it CW, don't waste your time. I'm just reporting everything I find.
 

Crimson Wizard

Quote from: Monsieur OUXX on Today at 00:18:29But in the AGS 4 editor, the popup disappears instantly. I can see it flash but it closes itself before I have the time to read the message.

I cannot reproduce this problem.

How many monitors do you have on your system? A while ago we have had a report that this window may move to another monitor.

Monsieur OUXX

#11
Quote from: Crimson Wizard on Today at 00:22:55How many monitors do you have on your system? A while ago we have had a report that this window may move to another monitor.
Usually yes, weird issues like this happen on multi-monitor setups. But today I'm purely on my laptop, with nothing else plugged in.

EDIT: I will try without the "DPI" thing activated.

EDIT 2 : I've reset all the settings to default (I changed the font, like I said before) but the issue is still there. I've recorded a video : https://www.mediafire.com/file/r4o3f4jitnx68cx/ags_troubleshooting.mp4/file
(WARNING: It will remain online only 3 days)

EDIT 3: My laptop is known for having a very high resolution combined with a very wide screen (3840 x 2160). Could it be that the coordinates of the popup window are so crazy that the system decides to close it? It's just a shot in the dark, because like I said I do see it flash briefly.

 

Monsieur OUXX

Another issue :
1) Do "rebuild all files"
2) I get all sorts of warnings about one of the rooms. OK why not.
3) I open the room to try and fix the problems -> As soon as I open the room, the contents of the "output" panel get cleared (all the warnings disappear).
4) I press F5 -> It does not regenerate the warnings
5) I run "rebuild all files" -> It does regenerate the warnings, but... closes the room.

In the end I had to take a screenshot of the warnings, to have both the room and the warnings side by side.
 

eri0o

#13
Quote from: Monsieur OUXX on Today at 00:28:38EDIT 2 : I've reset all the settings to default (I changed the font, like I said before) but the issue is still there. I've recorded a video : https://www.mediafire.com/file/r4o3f4jitnx68cx/ags_troubleshooting.mp4/file
(WARNING: It will remain online only 3 days)


I noticed if I use AbortGame(""); then no window shows up while AbortGame("a message"); makes the window show up. I guess a window should show up even on empty messages. Edit: it looks like this is the cause of the error message not showing when AbortGame script call is with an empty string; I don't know why the null check there but one possibility could be to cause the script call to always be non null by using some default message if no message is passed like "The game has been aborted from script" or similar.

But I watched the video and the error message that disappears says there is a null-pointer error in line 379 that is being triggered at game_start, on your DebugGui.asc. But I don't know why it is disappearing fast in your case. I tried some null pointer errors here and they still appeared.

About debugging things, a new addition to AGS 4 that may be useful to you is there is a Watch Variables pane which can show your variables when you advance them step by step in the debugger.

The mentioned multi-monitor issue is this one, but it looks like something different from the video.

Crimson Wizard

#14
Quote from: Monsieur OUXX on Today at 00:28:38EDIT 3: My laptop is known for having a very high resolution combined with a very wide screen (3840 x 2160). Could it be that the coordinates of the popup window are so crazy that the system decides to close it? It's just a shot in the dark, because like I said I do see it flash briefly.

Earlier you mentioned that you have updated your project from 3.4.0 to 3.6.2.
Do you get same issue with 3.6.2?



Output panel being cleared is a known issue and existed for many years. It's being cleared up whenever there's a new process that can theoretically produce messages.

Quote4) I press F5 -> It does not regenerate the warnings
F5 does not rebuild all rooms, only recently modified ones.
Did it not display warnings about the currently opened room which you edited?

QuoteIn the end I had to take a screenshot of the warnings, to have both the room and the warnings side by side.
You can do right-click - Copy the output messages.

In 3.x saving the room also compiled it, which displayed the warnings. But I dont remember if that's still a thing in AGS 4, where rooms are no longer stored in compiled format. OTOH, there's likely no need to close current room anymore when compiling a game, for the same reasons.

SMF spam blocked by CleanTalk