Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 16,643 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
engine_gettaskinfo problem #445593
09/16/14 12:55
09/16/14 12:55
Joined: Nov 2012
Posts: 62
Istanbul
T
Talemon Offline OP
Junior Member
Talemon  Offline OP
Junior Member
T

Joined: Nov 2012
Posts: 62
Istanbul
Hello, I need a quick help from you. I'm trying to track down a bug, which crashes the game ONLY on Win8+ machines. I've tracked until a wait(1) statement and I'm trying to use engine_gettaskinfo to list what function will get called next but on this occasion, its output is a bit strange.

One of the function names is either (null) or some garbled data 4-5 characters long. When this happens, the list is printed twice as if the control variable is reset. And if it's not "(null)", it crashes the program.

Is there a length limit on function names for the engine(A8)? What can cause such an issue with an engine function?

I'm using this code to print out the function names:

Code:
char* l_tmp = sys_malloc(sizeof(char) * 100);
ENTITY* l_me = NULL;
var i = 0;
diag("\nRUNNING FUNCTIONS");
while(engine_gettaskinfo(i, &l_tmp, &l_me) != NULL)
{
	diag("\n");
	diag(l_tmp);
	i++;
}
sys_free(l_tmp);


Re: engine_gettaskinfo problem [Re: Talemon] #445598
09/16/14 16:40
09/16/14 16:40
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
Diag takes a string parameter so use
Code:
diag(_str(l_tmp));



Also why not just do
Code:
char l_tmp[100];


Much shorter if you dont need the data outside of the stack tongue

Re: engine_gettaskinfo problem [Re: Ch40zzC0d3r] #445603
09/17/14 08:06
09/17/14 08:06
Joined: Nov 2012
Posts: 62
Istanbul
T
Talemon Offline OP
Junior Member
Talemon  Offline OP
Junior Member
T

Joined: Nov 2012
Posts: 62
Istanbul
Thanks, I'll try that.
Because then you have to write something like this:
diag(&(l_tmp[0]));

Re: engine_gettaskinfo problem [Re: Talemon] #445618
09/17/14 14:43
09/17/14 14:43
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
&l_tmp[0] is the same as l_tmp


Moderated by  old_bill, Tobias 

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