SRL Archive - Bugs

Grabbing lots of interfaces crashes simba


Cstrike

2010-11-14 22:32:36

Is this a Simba problem or a SMART problem?
I figured I'd start here since I don't know exactly where to go.
The reason I posted here is because it keeps causing an access violation if you let it run for a 20+ seconds. Or even let it complete if you wish, it always ends up causing me an access violation. Why? I'm not sure.


Any ideas? Or should I move this over to the SMART forum (does Benland even check the SMART forum much anymore?)

program new;
{$i srl/srl/misc/smart.scar}
{$i srl/srl.scar}
{$i reflection/reflection.simba}

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;


with Players[0] do
begin
Name := '';
Pass := '';
Active := True;
Nick := '';
Pin := '';
end;
end;

procedure lol;
begin
Smart_Server := 157;
Smart_Members := false;
Smart_Signed := true;
Smart_SuperDetail := false;
ActivateClient;
SetupSRL;
SetupReflectionEx(true);
DeclarePlayers;
LoginPlayer;
ClearDebug;
Wait (1410+random(2770));
SetAngle(true);
MakeCompass ('n');
SetRun(true);
end;

var TIA : TIntegerArray;
i, j : Integer;
begin
lol;
TIA := GetValidInterfaces;
for i:=0 to high (TIA) do
begin
for j:=0 to 200 do
begin
writeln ('Parent = '+Tostr(TIA[i])+', Child = '+Tostr(j)+ ', String: '+GetInterfaceText(TIA[i], j));
end;
end;
end.

This has reflection in it, but I have not the slightest clue at all about the deeper workings of reflection, or if there is a memory leak. It could even be me calling it to grab data on interface children that don't exist as well.



IN ADDITION:
It also seems that if I put a huge wait at the end, it can actually offset the simba crash/access violation.

EDIT: @ Admins, if you want, move it to the appropriate forum if this is not the place. Thank you in advance :)