Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Imhotep), 567 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: Random Crashes under Windows 10 [Re: Kartoffel] #471354
02/28/18 18:18
02/28/18 18:18
Joined: Apr 2002
Posts: 1,246
ny
jumpman Offline
Serious User
jumpman  Offline
Serious User

Joined: Apr 2002
Posts: 1,246
ny
Can you run the game with the potentially offending loops/functions with a very small nexus? Smaller than the original nexus

Part of me thinks increasing the nexus will just be like making the barn bigger while still having the needle, (needle in the haystack analogy). So yes the potential to get poked is lower, but its still a possibility.

So because the nexus seems like a good direction, see if you can make it really low and find out what is causing the offense.

Re: Random Crashes under Windows 10 [Re: jumpman] #471369
03/01/18 13:32
03/01/18 13:32
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
My game crashes immediately when I launch or publish it with the default nexus. No other crashes currently.

I'll keep my fingers crossed that it was the reason for the crashes in your case!


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Random Crashes under Windows 10 [Re: Superku] #471465
03/05/18 15:04
03/05/18 15:04
Joined: Apr 2002
Posts: 680
Germany
Turrican Offline OP
User
Turrican  Offline OP
User

Joined: Apr 2002
Posts: 680
Germany
Just a status update: The increased nexus really seems to help. I still have to perform some more thorough testing on other machines, but so far Kartoffel and me had no more random crashes.

@jcl: Of course we've already checked all these functions related to the <P>/Pause feature (UI scripts, control scripts, sounds, graphics, entities, pointers, etc.) and we can rule out errors in these areas. Of course, we also investigated other loops running at the same time. The problem was that the crash occurred not only in connection with the pause function, but also when loading levels and playing larger sound files. I don't know if I'm telling the symptoms correctly, but for me personally this indicates a possible lack of memory.

I could imagine that at a certain point in time the reserved virtual memory was too full and therefore memory areas might have been overwritten, resulting in script malfunctions, error messages in "clean" code parts and, ultimately, crashes. This is also supported by the fact that the crashes have changed their behaviour or occurred later/less often after we excluded particularly large model files from the game's code. However, that's only a speculation due to the absence of an actual, reliable error source.

@jumpman: You might be right about that. I also think there may still be a problem in the source code and I'll make sure to analyze the whole code again. Last week I did what you suggested: Setting the Nexus very low and reducing the code until the engine ran stable. The whole thing was very tedious and time-consuming. Unfortunately, I could not detect any errors in the excluded code areas. I was able to fix some other bugs on the way though - some of these fixes definitely helped to make the version more stable, so all of this wasn't in vain.

Anway, at the moment I am very happy that the game is running without crashes, so now I'm going to invest my time into actual content polishing. I'll also give my partners green light so they can continue their work.

Thanks so far to all of you. In case the crash reoccurs, I'll let you know by posting here... Fingers crossed!

Re: Random Crashes under Windows 10 [Re: Turrican] #471466
03/05/18 16:04
03/05/18 16:04
Joined: Apr 2002
Posts: 1,246
ny
jumpman Offline
Serious User
jumpman  Offline
Serious User

Joined: Apr 2002
Posts: 1,246
ny
Excellent! I look forward to seeing this game finished and purchasing it! Please keep us updated!

Re: Random Crashes under Windows 10 [Re: jumpman] #471479
03/05/18 20:14
03/05/18 20:14
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
I can only give my standard hints here, which made me get projects to publish and runproperly more than one time:

- never trigger any level loading from an entity funtion. Either use some status handshake/polling for triggering the level change, or at least set my to null in order to decouple the function from an entity.
- never do complex things in events. No entity movement, no entity removal or creation. and - surprise - no level loading. Again, use a polling function for these things and inside the event function only set a status/or flags which is regularly evaluated by the polling function.
- take care with media instructions and videos (especially in connection with render to texture). A level change can cause real problems if media streaming is not stopped properly before level change.
- wait(1). The most hated statement and the imaginary fix for everything, yes. But in fact there are instruction like ptr_remove() (anything related spawning or deleting objects) which simply require to have the entity alive for at least one frame. I think somewhere in the manual there is (was?) a list of so called "dangerous instructions". Those should also never be called in event functions, as they can get you into extremly nasty random behavior.
- any looping entity function should have a well defined exit condition and not just a while(1). If the entity is deleted, the my pointer of the looping entity function is not guaranteed to be set to null, so the function may continue running - and it can even "switch" to a different entity this way". Always stop the entity loop(s), afterwards remove the entity.

Likely none of these are your problem, but it's the standards I always checked. With nearly every Ackcon there was some mysterious crash behavior which was solved by reviewing the code fo the issues mentioned above.

Re: Random Crashes under Windows 10 [Re: FBL] #471556
03/09/18 14:01
03/09/18 14:01
Joined: Jul 2004
Posts: 785
Serbia
Iglarion Offline
User
Iglarion  Offline
User

Joined: Jul 2004
Posts: 785
Serbia
I finally prepared my rpg game for a big testing and i have the same problem ".exe has stopped working". It hapens randomly but only on level loading (Windows 10). I've got a headache...

Re: Random Crashes under Windows 10 [Re: Iglarion] #471574
03/10/18 10:59
03/10/18 10:59
Joined: Apr 2002
Posts: 680
Germany
Turrican Offline OP
User
Turrican  Offline OP
User

Joined: Apr 2002
Posts: 680
Germany
Oh no, that sounds bad.

Have you tried to raise the nexus as a "hotfix"? As a next step I would recommend to check which functions are still running during level_load and to make sure to close them manually if necessary. I counted up a global variable and let the loading routine wait until all functions were terminated and the variable reached zero.

Here's a code snippet, adapted from the one in this thread, which you can use to write out the currently running functions using engine_gettaskinfo:

Code:
void print_all_running_tasks(STRING* _filename)
{
 	proc_mode = PROC_LATE;
	STRING * STR_NEW_LINE = str_create("
");
	int i=0;
	char* funcname;
	ENTITY* ent;
	
	var _file=file_open_write(_filename);
	
	for(i=0;i<num_actions;i++)
	{
		engine_gettaskinfo(i,&funcname,&ent);	
		if(funcname!=NULL)
		{
			file_str_write(_file,"[ ");
			if(i<10) { file_str_write(_file,"0"); }
			if(i<100) { file_str_write(_file,"0"); }
			if(i<1000) { file_str_write(_file,"0"); }
			file_var_write(_file,i);
			file_str_write(_file,"] - ");
			file_str_write(_file,funcname);
			file_str_write(_file, STR_NEW_LINE);
		}
		else
		{
			file_str_write(_file,"funcname was NULL");
		}
	}
	file_close(_file);
	
	str_remove(STR_NEW_LINE);
}



Maybe there are also some pointers from the previous level that you should remove before switching levels? Basically you should also go through Firoball's (very helpful!) tips, maybe your problem can be solved with it.

I wonder if these Windows 10 crashes might be due to a general engine bug after all.

Re: Random Crashes under Windows 10 [Re: Turrican] #471577
03/10/18 12:44
03/10/18 12:44
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
If you publish your game through SED it will always be compiled with the default nexus. You can create a custom starter window and write
COMMAND "-nx 200";
in the window definition to launch it with the correct value.
Wait, does your game crash in test or published mode? @Iglarion
If it is the latter have you tried copying all source files (models, textures, sounds, media files, text files) over to the published folder?

EDIT: Not trying to sound like a smartass here but...
Quote:
But in fact there are instruction like ptr_remove() (anything related spawning or deleting objects) which simply require to have the entity alive for at least one frame.

This is not quite true, you can remove the entity immediately on creation (in its action or after ent_create). I do this all the time in my game based on level progress/ checkpoints.

Quote:
any looping entity function should have a well defined exit condition [...] Always stop the entity loop(s), afterwards remove the entity.

If you don't use PROC_GLOBAL (at all in your code - which IMO you really shouldn't, it's buggy in my opinion and does nasty stuff as described indirectly by Firoball) removing an entity will stop its (while(1) loop) function.

Last edited by Superku; 03/10/18 12:53.

"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Random Crashes under Windows 10 [Re: Turrican] #471579
03/10/18 12:49
03/10/18 12:49
Joined: Jul 2004
Posts: 785
Serbia
Iglarion Offline
User
Iglarion  Offline
User

Joined: Jul 2004
Posts: 785
Serbia
Yes I try raise nexus, at first I thought this help a bit, or put off the time of crashing engine, but happens again.

Today I modified my code to be able moving fast trought all levels, and after playing game in developement mode about one hour I reach crash, but now after level load: Error E2005 Can't create DirectX texture Skin1.

In past i pass trought all my textures about 20 times to be sure all is ok.
I not understand now, why i get this error message randomly beacuse, before i get this error i was in this level and everythings works fine, and after i back again i get crash? Why the first time I entered in this level I did not get a error?

@Superku
Yes I copy all my files from developement mode into published folder

Last edited by Iglarion; 03/10/18 12:52.
Re: Random Crashes under Windows 10 [Re: Iglarion] #471580
03/10/18 12:55
03/10/18 12:55
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
@Iglarion: Hmm download this tool: https://docs.microsoft.com/en-us/sysinternals/downloads/vmmap
Then play your game again until it crashes (don't close acknex or the error message!). Select the acknex process in VMMap and have a look at the Total/ Heap value.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Page 2 of 3 1 2 3

Moderated by  old_bill, Tobias 

Gamestudio download | chip programmers | 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