Hi all again,

I have a particle system built in a DLL library, and my engine calls procedures to add a new particle system in tot eh world and set the propertise, the basic structure of my particle systems are:

Code:
TParticleSystem = Class
//
end;

TParticleSystemList = Class(TList)
// List of TParticleSystem
end;

TParticleSystems = Class(TList)
//
  particleSystems: TknParticleSystemList;
end;
I call a function in the library to create a new particle system (TParticleSystems.Add) which in the library does:
[pascal]
function TParticleSystemList.Add: Integer;
var
nItem: TParticleSystem;
begin
nItem := TParticleSystem.Create;
Result := inherited Add(nItem);
end;
[/pascal]
this works fine, but if i want to add a particle system to the TParticleSystemList (similar function as above) i get an access violation at address 0000000000!
The violation occurs when i try to add the item to the list
[pascal]
Result := inherited Add(nItem);
[/pascal]

I have tried everything, i tried changing from using a Tlist to using a dynamic array, but i get another access violation when i try to change the length of the array.

I then tried to change my particle system library structure, so that it only controls 1 particle system, but i get another access violation but at the beginning when i try to add the particle system.

I'v even tried using pointers and using new() and getmem() but i get the same results.