Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Trading Journey
by howardR. 04/24/24 20:04
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, howardR, EternallyCurious, 1 invisible), 770 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
small request -> max_entities not quit in development version #453453
07/27/15 11:33
07/27/15 11:33
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline OP
Serious User
Reconnoiter  Offline OP
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
Hi JCL,

Would be nice if exceeding the number of max_entities would only give an error message and not quit the game in the development version. I want to use max_entities in my map editor and most of the times I use it is in development modus (since its a bit of a continous project for me).

If it has to do with warn_level = 2, I would prefer to keep warn_level to 2 to prevent bugs sneaking in.

(I have v 8.45)

If this would delay other updates/changes/fixes than this post can be ignored. But if it is a quick fix it would be nice to have laugh .



Last edited by Reconnoiter; 07/27/15 17:26.
Re: small request -> max_entities no crash in development version [Re: Reconnoiter] #453454
07/27/15 11:38
07/27/15 11:38
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
There is no reason why exceeding max_entities should cause a crash. Maybe it's a crash in your script, from a failed ent_create and accessing a NULL pointer?

Re: small request -> max_entities no crash in development version [Re: jcl] #453459
07/27/15 13:49
07/27/15 13:49
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline OP
Serious User
Reconnoiter  Offline OP
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
Hi,

Thanks for your quick reply. I get an erro E1340 saying "not enough entities reserved (x)". As soon as I click Ok or click away the message, the game/editor crashes.

This the ent_create code I am now testing it with:
Code:
function button_create_ent(var buttonnumber, PANEL* p_panelofbutton)
{
  ...  
  you = ent_create(select_filename_str, target_pos_vec, new_selection);			
}



The action (new_selection) is not run as it should (checked it with error("test");) so that could not be it. And 'you' is not used in other global function before it is made NULL and e.g. filled with next_next again.

Setting warn_level = 0; also does not help.

But most importantly, I also get the error with a new dummy script. Maybe people could try the code beneath and check if it crashes or not when clicking 'ok':
Code:
///////////////////////////////
#include <acknex.h>
#include <default.c>

///////////////////////////////


function main()
{
  vec_set(screen_size,vector(1000,600,0));
  wait(1);
  video_window(NULL, NULL, 4+16+32+64+128, "my game");
  
  vec_set(sky_color,vector(150,90,90)); // dark blue
  vec_fill(sun_color.blue, 225); 
  d3d_antialias = 9;
  shadow_stencil = 3;
  
  max_entities = 1;
  level_load(NULL);

  ent_create(NULL, nullvector, NULL);
  ent_create(NULL, nullvector, NULL);
  
}


Last edited by Reconnoiter; 07/27/15 13:59.
Re: small request -> max_entities no crash in development version [Re: Reconnoiter] #453462
07/27/15 15:13
07/27/15 15:13
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
I get indeed no crash with your code. The error message appears and then the script terminates.

Does anyone get a crash?

Re: small request -> max_entities no crash in development version [Re: jcl] #453465
07/27/15 16:38
07/27/15 16:38
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
I don't get a crash either.

@Reconnoiter: What exactly do you mean with "crash", just a simple clean exit or some Windows crash message?

EDIT: @below: Oh I've overlooked that.

Last edited by Superku; 07/27/15 17:03.

"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: small request -> max_entities no crash in development version [Re: Reconnoiter] #453467
07/27/15 16:56
07/27/15 16:56
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline
User
Wjbender  Offline
User
W

Joined: Mar 2012
Posts: 927
cyberspace
this is what he said

Originally Posted By: Reconnoiter
Hi JCL,
Would be nice if exceeding the number of max_entities would only give an error message and not quit the game in the development version.


so most likely just used a wrong word in the title ,the question as I see was about that and not crashing


Compulsive compiler
Re: small request -> max_entities no crash in development version [Re: Wjbender] #453469
07/27/15 17:25
07/27/15 17:25
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline OP
Serious User
Reconnoiter  Offline OP
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
Quote:
@Reconnoiter: What exactly do you mean with "crash", just a simple clean exit or some Windows crash message?
, sorry crash is the wrong word, I mean a simple exit.

Quote:
The error message appears and then the script terminates.
, yeah I would like that only an error message appears but not that the script terminates (if it isn't to much asked that is). Exceeding max_entities is not game-breaking right (/creating memory errors etc.)? So I personally think terminating the script is a bit overkill.

Re: small request -> max_entities no crash in development version [Re: Reconnoiter] #453474
07/28/15 11:26
07/28/15 11:26
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
Can confirm crash:



Code:
Log of A8 Engine 8.45.4 run at Tue Jul 28 11:24:18 2015
Felix on Windows NT/2000/XP version 6.2 Build 9200
Options -nx 200 -diag uhack.c
App: C:\Program Files (x86)\GStudio8\acknex.exe in C:\Users\Felix\Desktop\

MM mixer opened
DSOUND device opened
DI interface opened
Start Window opened(c) Conitec - www.3dgamestudio.com
A8 Engine - Commercial Edition V8.45.4 - Jan 16 2014
Development version
Registered to: Felix Queissner

DI Microsoft PC-joystick driver 5 axes 10 buttons initialized
Mouse found
Joystick found
Lautsprecher (High Definition Audio-Gerät) opened
AMD Radeon R9 200 Series pure T&L device 1ff9 detected
D3D device AMD Radeon R9 200 Series 1ff9 selected.
ackAR.dll opened
acknet.dll opened
ackoal.dll opened
ackphysX.dll opened
ackwii.dll opened
Compiling UHACK.C - [Esc] to abort.......... 0.109 sec
Running UHACK.C.
2 objects
Main started at 1.205
def_startup started
D3D_Init Window: 1000x600 -> Window: 1x1000x600x32
Video memory found: 4091 MB
Main loop at 1.276
LevelInit at 1.278 0 lmaps 0 textures...ok
LevelReady at 1.280
Error E1340: Not enough entities reserved (1)
Program aborted....
Close level,DLL,objects
Free input,funcs,panels,defs,syns,views,strings,vars..ok
Free sounds,bmaps,fonts,hash,defs1,script..ok
Close dx,multimedia,D3D,engine,nexus..ok
A8 Engine - Commercial Edition V8.45.4 - Jan 16 2014
(c) Conitec - www.3dgamestudio.com
Registered to: Felix Queissner
Close window at 1.594



Visit my site: www.masterq32.de
Re: small request -> max_entities no crash in development version [Re: MasterQ32] #453475
07/28/15 12:09
07/28/15 12:09
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Ok, so no crash - just my misunderstanding due to the topic title.

I'll check if the exiting has a particular reason. Possibly it has, otherwise we'll modify the program so that it only removes the entity and continues.

Re: small request -> max_entities no crash in development version [Re: jcl] #453478
07/28/15 13:39
07/28/15 13:39
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline OP
Serious User
Reconnoiter  Offline OP
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
Thanks. If there is indeed a particular reason, I would also like to know if it is also a problem for the published version (just to be on the safe side).


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