AGS 3.4.1 - RC 3 (new release candidate)

Started by Crimson Wizard, Sun 09/04/2017 22:02:10

Previous topic - Next topic

Crimson Wizard

#20
I've met a curious bug in 3.4.0 today, which is not happening in 3.4.1. I've never heard about such problem before; either it is too rare, or nobody reported.

The situation was that there is a room with a wall, which is also walkbehind, and there is a painting on that wall, which is an object with baseline = walkbehind's baseline + 1.
This painting is visible all time, because its baseline is higher than the one of the wall's, but when certain other unrelated object gets its visibility changed the painting suddenly drops through the walkbehind and appears behind it (although baseline is supposed to stay the same, it is never changed in scripts).

Setting baseline to (walkbehind's baseline + 5) fixed this, but why was it happening at first place? I was breaking my head, until I checked same game with 3.4.1 and the bug was not recurring there.

Then I remembered that for 3.4.1 I changed the code that was sorting room elements by their Z order, from C-style sorting (using qsort) to C++ STL sorting (using std::sort). Can that be that some ancient bug was fixed along this change?

Crimson Wizard

#21
AGS 3.4.1 Beta 4
http://www.adventuregamestudio.co.uk/releases/betas/AGS-3.4.1-Beta4/AGS-3.4.1-beta-4.zip
(also updated first post)

Changes since Beta 3:

Common features:
- Removed limit on the script names of Inventory Items, GUI and GUI Controls, as well as GUI event function names.

BTW, something I forgot to mention prior, Dialog script names are also not limited to like 20 letters since previous Beta.

Editor:
- Made Editor correctly detect modern versions of MS Windows for display on About dialog and when sending anonymous statistics.
- New application icon to comply with 3.4.0 splash screen.
- Fixed #ifver and #ifnver not working properly if version number had only one component (major version).

Script API:
- DynamicSprite.CreateFromFile and SaveToFile now support path tokens and comply to the new file path rules (no writing files to the game's installation directory).

Engine
- Added OpenGL renderer to Windows version.
- Implemented separate config option for game's shared data path, to keep it distinct from user-defined saves path. (You can set it up separately in the Default Setup page in your game project)
- Fixed Game.TranslationFilename returning "default" instead of empty string if no translation is set.
- Support Right Alt for Alt+Enter (switch fullscreen/windowed) and  Alt+Ctrl (lock/unlock mouse in window) combinations.
- Fixed screen not getting repainted in software (DirectDraw 5) mode when switching from fullscreen to windowed (or vice versa).
- Fixed FLIC playback. (Was broken after update to Allegro 4.4)

WinSetup:
- Fixed display mode selection was missing certain items.

NicolaGs

I tested the resolution fix in WinSetup... and it seems OK ! Thanks...

But I noticed another problem... To be able to test the previous issue, I had to fix errors in my script (e.g : change "default" to "" for Game.TranslationFilename).
But to detect them, I had to use the latest stable Editor version with the latest beta ACWin.exe...

If using editor + acwin 3.4.1.4 : I only get a generic error message, without the error line number (the error says about this : object reference not defined by an object instance).
If using editor 3.4.0.16 + acwin 3.4.1.4 : I get a more detailed error message, with the error line number (the error says : null pointer referenced).

So, the 3.4.1.4 Editor is less verbose and it's very difficult to find the error source...


My first game : I Want Out!

Crimson Wizard

Quote from: NicolaGs on Mon 22/05/2017 17:00:51
If using editor + acwin 3.4.1.4 : I only get a generic error message, without the error line number (the error says about this : object reference not defined by an object instance).
If using editor 3.4.0.16 + acwin 3.4.1.4 : I get a more detailed error message, with the error line number (the error says : null pointer referenced).

Do you mean compilation errors or runtime errors you get during debugging?
Can you give an example of script line that you were dealing with?

NicolaGs

Quote from: Crimson Wizard on Mon 22/05/2017 17:35:07
Do you mean compilation errors or runtime errors you get during debugging?
Can you give an example of script line that you were dealing with?

I'm embarassed because I can't find the source of the error message I get in the beta version.
The 3.4.0.16 editor gives me errors... but I don't know for sure if it's the same errors the errors that cause the beta not to run the game...

In order to troubleshoot this, I can't do better than proceeding chronologically. So it will be a long post, sorry :-D

1) my project runs fine with version 3.4.0.16
2) I tried 3.4.1.4 editor : compiling and running both failed, with getting a "generic" error message, without any more informations.
3) I tried 3.4.0.16 editor alongside acwin 3.4.1.4 : compiling and running work ; I got a "documented" error only when the faulty line was reached (null pointer referenced, with line number).
My code was :
Global script :
Code: ags
GUI *gStart_Screen;
export gStart_Screen;
...
function game_start() 
{
	if (Game.TranslationFilename == "default")
	{
		gStart_Screen = gStart_Screen_FR;
	}
}


Room script :
Code: ags
function room_Load()
{
	gStart_Screen.Visible = true;
	acMusic_start = aMenu.Play();
}

The error pointed to line 3 : gStart_Screen.Visible = true; of course, since Game.TranslationFilename == "default" was impossible. Error fixed.

4) Still with 3.4.0.16 editor + 3.4.1.4 acwin, the game compiles and F5 runs OK... and then, a new error ("Null pointer referenced"). Here is the code:

This is the first room (welcome screen):
Code: ags
AudioChannel *acMusic_start;


function room_Load()
{
	gStart_Screen.Visible = true;
	acMusic_start = aMenu.Play();
}


function room_Leave()
{
	FadeOut(3);
	
	int Volume_fading_speed = 1;
	
	while (acMusic_start.Volume > 0) <- THIS LINE CAUSES THE ERROR
	{
		if (acMusic_start.Volume - Volume_fading_speed >= 0  )
		{
			acMusic_start.Volume = acMusic_start.Volume - Volume_fading_speed;
		}
		else
		{
			acMusic_start.Volume = 0;
		}
		Wait(1);
	}
	if (acMusic_start.IsPlaying != true)
	{
		acMusic_start.Stop();
	}
	

	gStart_Screen.Visible = false;
}

The error is at line 17.


At this point, I'm lost:  the compiled game (step 4) runs fine (the affected script creates a music fade out) while when run inside the editor with F5, it causes the error...


5) Trying 3.4.1.4 editor and acwin : game does not compile, does not run / generic error message



To know more about the error with the beta version, I must fix this new error but I do not find its cause (since acMusic_start was defined at the top of the script and did not cause any problem prior in the script - but there are many chances the error is my fault).

My first game : I Want Out!

Crimson Wizard

#25
One thing I can tell at this point, you cannot use 3.4.1 acwin.exe with 3.4.0 Editor, because 3.4.1 engine cannot find audio files in debug mode without additional parameters passed from 3.4.1 Editor. This was probably the reason you were getting null pointer errors with acMusic_start, since no music played and channel pointer remained unassigned.

Quote from: NicolaGs on Mon 22/05/2017 18:37:05
5) Trying 3.4.1.4 editor and acwin : game does not compile, does not run / generic error message

What is this "generic error message"?

NicolaGs

#26
Quote from: NicolaGs on Mon 22/05/2017 17:00:51
the error says about this : object reference not defined by an object instance
The message appears in french (OS language...). It's a rough translation... (tbh, the sentence in french is not entirely intellegible...)

Quote from: Crimson WizardThis was probably the reason you were getting null pointer errors with acMusic_start
So, for the moment, I'm stuck, as I cannot know the origin of the error...
My first game : I Want Out!

Crimson Wizard

There is too little information. Can you just copy whole error message, or post screenshot whatever is easier for you?

NicolaGs

#28
Quote from: Crimson Wizard on Mon 22/05/2017 20:57:30
There is too little information
Yes, I know... that's the problem : I don't know where to start !
Here's a screen cap (be prepared to be disappointed) :



I've got nothing more than that. When I hit F5, when I "Build EXE", when I "Rebuild all files"...
By double clicking on the error in the message list, it doesn't do anything.


I re-tested beta 3 :
- this behaviour does not happens.
- There is still the issue with the "acMusic_start"... But : when I first "Rebuild all files", it works fine...

edit : I'll try to investigate further by disabling this audiochanel reference when I'll have time... It's very possible there's a flaw in my script.
edit 2 : I deleted all reference to audiochanel. It's the same.
edit 3 : My translation of the message may be wrong. I try again : "The object reference is not defined/referenced for one object". I'll search all those references...
My first game : I Want Out!

Crimson Wizard

#29
This is not script error, this is program error, which occurs during creation of game files. Therefore there is no line number.
This kinds of errors are not very informative in AGS Editor.

Is it possible for you to send me the failing game project? That would be fastest way to find out what's wrong.
Alternatively, I will change the way such error messages are printed to see more details.

Crimson Wizard

#30
I fixed couple of errors, please try this build:
http://www.mediafire.com/file/b64dl48vvvqk3kl/AGSEditor_3.4.1.4--fix.zip

E: Reuploaded beta version.

NicolaGs

Yes, it works, now !

On my way, I just saw another thing (why would I stop to bug you... ? (laugh)) : alt-enter sometimes restart the game (like F9 does) instead of switching between fullscreen / windowed modes.
My first game : I Want Out!

Crimson Wizard

#32
Quote from: NicolaGs on Mon 22/05/2017 23:42:35
On my way, I just saw another thing (why would I stop to bug you... ? (laugh)) : alt-enter sometimes restart the game (like F9 does) instead of switching between fullscreen / windowed modes.

LeftAlt + Enter gives same key code as F9. I thought I made it not go into scripts, but probably it still does.

Problem is that I cannot reproduce this anymore.

Mehrdad

My official site: http://www.pershaland.com/

Mehrdad

Anyone have this error too? Is it possibleI fix it ?
My official site: http://www.pershaland.com/

Crimson Wizard

This error happens when compiling the speech file. I usually test with games without speech, so I could miss it.

I will test this today, but if I won't be able to reproduce the error, then there are two options left:

1) Option 1. If you send me your FULL project, then I will be able to catch the error under debugger. This is ideal for me, but if I remember right you do not like to upload big data because your internet connection is not good enough?
2) Option 2. I can make editor to write a log of its progress during speech.vox compilation, and see at which point it breaks. Maybe that will give some hint.

Mehrdad

Hi CW

Problem solved . I had a .wav speech in Speech folder that I didn't used into the game . I removed it and works fine.  Thanks a lot  ;)
My official site: http://www.pershaland.com/

Crimson Wizard

Quote from: Mehrdad on Thu 25/05/2017 16:12:06
Problem solved . I had a .wav speech in Speech folder that I didn't used into the game . I removed it and works fine.  Thanks a lot  ;)

Wait! It is not solved!
There is clearly and error inside the Editor, and I need to find out what it is. What if it happens again to someone else?!
Can you send me that wav file just in case? How was it named at least?

arj0n

The generated acsetup.cfg in Compiled>Windows contains wrong/old content, for example the driver is set to DX5.

Reproduction scenario:
Open the project with AGS Build 3.4.0.16:
In General settings set Default graphics driver to DirectDraw 5 (default)
Save game and close editor

Backup the project
Delete folder 'Compiled'
Delete any content of the savefolder in C:\Users\<user>\Saved Games\)

Open the project with AGS Build 3.4.1.4 ** BETA VERSION **
in Default setup set Graphics driver to 'Software driver'
Save and compile game

* The file acsetup.cfg in Compiled>Windows (and Compiled>Data) shows 'driver = DX5' (this is incorrect, DX5 is not an option)
* When running winsetup.exe, the selected Driver is 'Direct3D 9'

Change Driver to OpenGL and save
* The file acsetup.cfg in the savefolder shows 'driver = OpenGL' (correct)

So the editor creates the 'old' acsetup.cfg, but the winsetup creates the correct cfg.

Content of generated acsetup.cfg in compiled/windows folder:
Code: ags

[sound]
digiid=-1
midiid=-1
digiwin=-1
midiwin=-1
digiindx=0
midiindx=0
digiwinindx=0
midiwinindx=0
[misc]
game_width=320
game_height=200
gamecolordepth=16
antialias=0
notruecolor=0
cachemax=128
user_data_dir=
shared_data_dir=
titletext=SRAM 2 - CINOMEH'S REVENGE (demo) Setup
[graphics]
driver=DX5
windowed=0
game_scale=max_round
filter=stdscale
vsync=0
render_at_screenres=0
[language]
translation=
[mouse]
auto_lock=0
speed=1


Content of acsetup.cfg in savegame folder after saving via winsetup.exe:
Code: ags

[graphics]
driver=OGL
filter=StdScale
game_scale=max_round
refresh=0
render_at_screenres=0
screen_def=explicit
screen_height=1080
screen_width=1920
vsync=0
windowed=0
[language]
translation=
[misc]
antialias=0
cachemax=131072
notruecolor=0
user_data_dir=
[mouse]
auto_lock=0
speed=1.0
[sound]
digiwinindx=0
midiwinindx=0
usespeech=1

Mehrdad

Quote from: Crimson Wizard on Thu 25/05/2017 16:43:12
Wait! It is not solved!
There is clearly and error inside the Editor, and I need to find out what it is. What if it happens again to someone else?!
Can you send me that wav file just in case? How was it named at least?

Sorry I'm late for answer
OK. Name of sound is 'EGO1.wav'  . It was in Speech folder . When I put it again I have same error and when I remove it works fine . My code is:

Code: ags
cEgo.Say("&1 nd,hv");  // I use Persian font


Where is my wrong?

My official site: http://www.pershaland.com/

SMF spam blocked by CleanTalk