Malformed sav file - need help for investigation

2020-06-10 Thread Ignácz , István
Greetings, I think this is not the usual topic on this list, excuse me if you find it off-topic. I'm facing a tough bug in my software and I'm looking for some help to be able to take the next steps. Our software generates sav files via tiamo's package: https://packagist.org/packages/tiamo/spss

Re: Malformed sav file - need help for investigation

2020-06-10 Thread Ben Pfaff
I'm not sure exactly what you're looking for, but PSPP has a test case that intentionally provokes this error message. I'm attaching the file it produces. I guess the ultimate goal here should be to fix tiamo's package? On Wed, Jun 10, 2020 at 9:42 AM Ignácz, István wrote: > Greetings, > > I th

Re: Malformed sav file - need help for investigation

2020-06-10 Thread Ignácz , István
Thanks, Ben for the quick response! Yes, the ultimate goal is to add a patch to the package which fixes the problem or throws an error if the user of the package (in this case me) provides invalid input. I think I'm facing the later. One significant difference between the test file and my case is

Re: Malformed sav file - need help for investigation

2020-06-10 Thread John Darrington
I presume that you are creating some web based software which writes .sav files. One option that you have, is to use PSPP's perl module instead of this tiamo package. J' On Wed, Jun 10, 2020 at 06:42:19PM +0200, Ign??cz, Istv??n wrote: Greetings, I think this is not the usual t

Re: Malformed sav file - need help for investigation

2020-06-10 Thread Alan Mead
Ben's a genius at understanding SPSS file formats, but he's not going to have any insight into tiamo's PHP code. If tiamo's code has a source file called sys-file-reader, it's probably a port of PSPP code (and that should be self-evident from examining the file; it should have a FSF copyright) and

Re: Malformed sav file - need help for investigation

2020-06-10 Thread Ignácz , István
Excuse me if my former mail was ambiguous, I meant PSPP's sys-file-reader.c and I never thought that anyone on this list should check the PHP code by any means. You shared a lot of really useful details about potential problems, it helps me a great deal to start/continue my investigation on where

Re: Malformed sav file - need help for investigation

2020-06-10 Thread Ben Pfaff
Ah. I can easily explain what the problem is. SPSS data files have a variable record for each variable. For string variables with a width greater than 8, they actually have a variable record for every 8 columns of width (rounding up). Lots of places in data files refer to variables by the index th

Re: Malformed sav file - need help for investigation

2020-06-10 Thread Ignácz , István
Wow, that explains a lot! Thanks for your detailed explanation! On Wed, 10 Jun 2020 at 20:27, Ben Pfaff wrote: > Ah. I can easily explain what the problem is. > > SPSS data files have a variable record for each variable. For string > variables with a width greater than 8, they actually have a v