Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (SBGuy), 652 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 9 1 2 3 4 5 6 7 8 9
Re: Crash! With a view entity [Re: Superku] #438594
03/18/14 11:19
03/18/14 11:19
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
We got your models, but they seem to be fine - no crash, file header and validation ok. Maybe the problem has a different reason, unrelated to the model? Crashes can also happen when a piece of code overwrites internal memory.

Re: Crash! With a view entity [Re: jcl] #438628
03/19/14 03:48
03/19/14 03:48
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
That's weird to say the least. I've reduced the code and the project now to an absolute minimum, please download it here (not only jcl but some other readers as well, please): http://www.superku.de/mdl_crash.zip

It crashes on both my desktop (newest A8 version) and my laptop computer (8.30.5), all files have been replaced by new ones (even the level which only consists of one "position"/ camera and one object) and the codes has been checked multiple times for mistakes.

However, what makes the problem even weirder, the crash disappears as soon as you change literally anything in the main function code (that includes commenting "video_mode" or removing the lines after "return").

Click to reveal..
Code:
void main()
{
	fps_max = 60;
	video_mode = 9;
	d3d_antialias = 9;
	collision_mode = 0;
	vec_set(sky_color,COLOR_BLACK);
	level_load("test.wmb");
	ent_highlight = ent_for_name("highlight2");
	ent_highlight.emask |= ENABLE_PUSH;
	camera.x = tiles_dim_x/2*64;
	camera.y = tiles_dim_y/2*64;
	camera.z = 1487;
	camera.tilt = -90;
	camera.arc = 40;
	on_esc = exit_game;
	
	temp.z = 2;
	for(i = 0; i < tiles_dim_x; i++)
	{
		for(j = 0; j < tiles_dim_y; j++)
		{
			temp.x = 32+64*i;
			temp.y = 32+64*j;
			you = ent_create("tile3.mdl",temp,NULL);
			your.skill10 = i;
			your.skill11 = j;
			ent_tiles[i*tiles_dim_y+j] = you;
		}
	}
	for(i = 0; i < tiles_dim_x; i++)
	{
		for(j = 0; j < tiles_dim_y; j++)
		{
			if(j < tiles_dim_y-1)
			{
				k = floor(random(tile_max_colors));
				you = ent_tiles[i*tiles_dim_y+j];
				your.skill3 = k;
				you = ent_tiles[i*tiles_dim_y+j+1];
				your.skill1 = k;
			}
			if(i < tiles_dim_x-1)
			{
				k = floor(random(tile_max_colors));
				you = ent_tiles[i*tiles_dim_y+j];
				your.skill2 = k;
				you = ent_tiles[(i+1)*tiles_dim_y+j];
				//if(you == NULL) error("AAA"); // <- hier
				your.skill4 = k;
			}
		}
	}
	return;
	mouse_mode = 4;
	mouse_range = 3000;
	while(1)
	{
		for(i = 0; i < tiles_dim_x; i++)
		{
			for(j = 0; j < tiles_dim_y; j++)
			{
				you = ent_tiles[i*tiles_dim_y+j];
				if(you == ent_tile_selected) your.z += (48-your.z)*0.25*time_step;
				else your.z += (2-your.z)*0.5*time_step;
				your.skill41 = floatv(your.skill1);	
				your.skill42 = floatv(your.skill2);
				your.skill43 = floatv(your.skill3);
				your.skill44 = floatv(your.skill4);
			}
		}
		wait(1);
	}
}



EDIT: Array dimension should not be a problem, too:

ENTITY* ent_tiles[64];
var tiles_dim_x = 8;
var tiles_dim_y = 8;

Even when you change the dimensions to let's say 4 and keep the array dimension at 64 it still crashes.

Last edited by Superku; 03/19/14 03:51.

"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: Crash! With a view entity [Re: Superku] #438631
03/19/14 07:35
03/19/14 07:35
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
Thanks for the new project - that one indeed produces an error message. It has apparently nothing to do with your code and how you change it - the model just crashes randomly. We'll look into it.

Re: Crash! With a view entity [Re: jcl] #438633
03/19/14 07:52
03/19/14 07:52
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Thanks, I'm interested to now what causes the error!


"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: Crash! With a view entity [Re: Superku] #438641
03/19/14 11:39
03/19/14 11:39
Joined: Feb 2012
Posts: 371
Dico Offline
Senior Member
Dico  Offline
Senior Member

Joined: Feb 2012
Posts: 371
i think the problem is in (wait) when i add it befor the for loop evrything work great in this exemple .

Re: Crash! With a view entity [Re: Dico] #438642
03/19/14 11:42
03/19/14 11:42
Joined: Feb 2012
Posts: 371
Dico Offline
Senior Member
Dico  Offline
Senior Member

Joined: Feb 2012
Posts: 371
you need to wait one frame after level loading

Re: Crash! With a view entity [Re: Dico] #438644
03/19/14 12:27
03/19/14 12:27
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline
Serious User
Rackscha  Offline
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
Originally Posted By: Dico
you need to wait one frame after level loading


which is an odd design


MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: Crash! With a view entity [Re: Dico] #438645
03/19/14 12:37
03/19/14 12:37
Joined: Jul 2002
Posts: 3,208
Germany
Error014 Offline OP
Expert
Error014  Offline OP
Expert

Joined: Jul 2002
Posts: 3,208
Germany
Originally Posted By: Dico
i think the problem is in (wait) when i add it befor the for loop evrything work great in this exemple .


That's the thing, man. Remember what Superku said?

Originally Posted By: Superku
the crash disappears as soon as you change literally anything in the main function code



Almost any change stops the thing from crashing, it's a very erratic and random behaviour. So it's difficult to say that you found the cause when you find a change that stops this crash - as a completely different, unrelated change does so, too.




jcl, thanks for investigating and all your help. I'm hopeful that we find out what causes these strange errors.

Just an aside, would you still consider this?

Quote:

I think it'd be great if, at least in the development version, the point of loading and creating objects would be indicating somehow - maybe with a ; or a _ or whatever. This would have saved me some time.


It sounds as this would be something relatively easy to add, but it allow us to narrow things down if we get a crash at that point.

Thank you!


Perhaps this post will get me points for originality at least.

Check out Dungeon Deities! It's amazing and will make you happy, successful and almost certainly more attractive! It might be true!
Re: Crash! With a view entity [Re: Error014] #438646
03/19/14 12:55
03/19/14 12:55
Joined: Feb 2012
Posts: 371
Dico Offline
Senior Member
Dico  Offline
Senior Member

Joined: Feb 2012
Posts: 371
ah yes you're right

Last edited by Dico; 03/19/14 13:02.
Re: Crash! With a view entity [Re: Dico] #438647
03/19/14 15:13
03/19/14 15:13
Joined: Oct 2004
Posts: 900
Lgh
rojart Offline
User
rojart  Offline
User

Joined: Oct 2004
Posts: 900
Lgh
Tested and i got the same error message, like Superku mentioned Error E1198 TILE3.MDL: Bad file format.

However i think the problem is the second Texture "Skin2" without Texture checked.

If you just try to check the Texture the issue will gone.


Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P
Page 3 of 9 1 2 3 4 5 6 7 8 9

Moderated by  jcl, Nems, Spirit, 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