Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 02/21/26 19:15
Camera always moves upwards?
by clonman. 02/21/26 09:29
Zorro version 3.0 prerelease!
by TipmyPip. 02/20/26 13:22
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 6,962 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
possible Bug in file_save (A7.82.3) #305193
01/13/10 14:40
01/13/10 14:40
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline OP
Serious User
pegamode  Offline OP
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
Could it be that there is a bug in file_save in A7.82.3.

Since we updated to the new version sometimes the engine crashes while saving the file. The file is written correctly and can be loaded without any problem, but the engine crashes right after the command. The next command isn't executed anymore (just a diag-command). The crash occurs sporadically.

We use the following code:

[code]
var result = file_save(savename, savegame, sizeof(SAVEGAME));
if (result == NULL) {
error("filesave error");
}
[code]

There's no "filesave error" ... just a "crash in <functionname>".

Best regards,
Pegamode.

Re: possible Bug in file_save (A7.82.3) [Re: pegamode] #305208
01/13/10 15:50
01/13/10 15:50
Joined: Jul 2000
Posts: 28,074
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,074
Frankfurt
The most likely reason of a file_save crash is a wrong buffer size. Can you check?

Re: possible Bug in file_save (A7.82.3) [Re: jcl] #305230
01/13/10 17:46
01/13/10 17:46
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline OP
Serious User
pegamode  Offline OP
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
Ok ... I'll try to check this out.

Re: possible Bug in file_save (A7.82.3) [Re: pegamode] #305238
01/13/10 18:42
01/13/10 18:42
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline OP
Serious User
pegamode  Offline OP
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
Maybe a stupid question, but how can I check this?

Here's some explanations to the code above:

SAVEGAME is a struct and savegame an object of this struct type.
I initialize savegame with:

SAVEGAME* savegame = (SAVEGAME*)(malloc(sizeof(SAVEGAME)));

Then I set all values for savegame and the call:

file_save(savename, savegame, sizeof(SAVEGAME));

I logged out:

sizeof(savegame) and sizeof(SAVEGAME)

but

sizeof(savegame) always returns 4 (just the size of the pointer)
sizeof(SAVEGAME) always returns 231368 (that's what I expected)

So how could I check if savegame exceeds the size of SAVEGAME?

Regards,
Pegamode.




Last edited by pegamode; 01/13/10 19:33.
Re: possible Bug in file_save (A7.82.3) [Re: pegamode] #305320
01/14/10 08:16
01/14/10 08:16
Joined: Jul 2000
Posts: 28,074
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,074
Frankfurt
sizeof(SAVEGAME) is correct.

Are you sure that the crash really happens in file_save, and not somewhere else? We can't fix file_save because it is just calling a Windows API function.



Re: possible Bug in file_save (A7.82.3) [Re: jcl] #305327
01/14/10 08:34
01/14/10 08:34
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline OP
Serious User
pegamode  Offline OP
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
I'm quite sure.

This is the code I use:

Code:
ediag(fctName, LEVEL_INFO, _str("saving savegame."));
	
	var result = file_save(savename, savegame, sizeof(SAVEGAME));					
	if (result == NULL) {
		error("filesave error");
	}
	
	ediag(fctName, LEVEL_INFO, _str("saved savegame."));



ediag is an extension to diag.
In my logfile I see the following:

[17:14:21] INFO [function save_game(STRING* savename)]: saving savegame.
Error E1513: Crash in save_game

"saved savegame." isn't logged out.

So the error should either be in file_save or in the ediag after the file_save.
ediag is used hundreds of times in the whole project without any problems, so it would make me wonder if there's a problem with this one, but I'll change it to a "normal" diag to check it out.

The error occurs seldom and sporadically so it's not that easy to reproduce. Even if I load the savegame that was saved when the error occured and then save again directly after loading, the error doesn't occur. So it could time some time to reproduce it (hopefully I'll get it soon).

Any other idea what it could be?

Regards,
Pegamode.

Re: possible Bug in file_save (A7.82.3) [Re: pegamode] #305328
01/14/10 08:37
01/14/10 08:37
Joined: Jul 2000
Posts: 28,074
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,074
Frankfurt
No - can you send the project to Support then? I think this is the only way to find out.

Re: possible Bug in file_save (A7.82.3) [Re: jcl] #305330
01/14/10 08:48
01/14/10 08:48
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline OP
Serious User
pegamode  Offline OP
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
Hmm ... the project has a file size of about 700mb. Even packed with a high compression it'll still be quite big.

Currently I'm building a demo version of it for the AUM retro contest. The demo seems to be about 150mb (packed) and uses quite the same code as the "normal" project just without some rooms, models and lod models.

Is there a ftp server or something where I could upload 150mb project data for the support? Does it cost me anything when the support takes a look? I'm not owning A7 pro, I'm using A7 commercial.

Regards,
Pegamode.


Re: possible Bug in file_save (A7.82.3) [Re: pegamode] #305335
01/14/10 09:25
01/14/10 09:25
Joined: Jul 2000
Posts: 28,074
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,074
Frankfurt
No, looking into such problems is free.

You can upload it here:

ftp.coniserver.net, user: anonymous, pass: anonymous

but we appreciate an as small version as possible. Just big enough so that it contains all elements that could cause the bug.

Re: possible Bug in file_save (A7.82.3) [Re: jcl] #305339
01/14/10 09:46
01/14/10 09:46
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline OP
Serious User
pegamode  Offline OP
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
Ok. I'll build a version as small as possible and upload it as soon as possible.

Do I have to write an email with an error description to someone when I have uploaded the project? Or just do a post here?

Page 1 of 3 1 2 3

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1