Pointer and dynamic array are not the same, even though dynamic array is built on top of pointer (to a structure). When you pass a dynamic array variable, you're passing pointer TO THE STRUCTURE, NOT THE DATA. To correctly do it, you have to pass pointer to the first data, which is @lib[0] in your case.
-- View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-SEGFAULT-difference-between-pointer-and-dynarray-tp4028296p4028297.html Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com. -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus