[Gambas-user] writing large files crashes gambas
Benoit Minisini
gambas at ...2...
Thu Jul 17 22:19:03 CEST 2003
Le Jeudi 17 Juillet 2003 21:50, Rob a écrit :
> I have written (and am currently testing) a program that captures MPEG
> video from my USB capture device. I let it go while I went to lunch, and
> when I came back it had terminated with signal 27 (I think it was) and the
> file it had created was exactly 2GB. So I'm thinking Gambas keeps track of
> how many bytes you've written as a signed integer and that 27 is an
> overflow error. The filesystem it was getting written to supports much
> larger files, of course. I could see raising an error, but the message I
> got said something about terminating unexpectedly and reporting a bug.
>
> Next I'm going to try replacing the Open Filename For Create As Savefile
> with Exec [ "bash", "-c", "cat >" & Savefile ] For Write As Saveprocess and
> see if that's subject to the same issues (I was also operating mplayer over
> another process object and feeding it th same video so I'm guessing it's
> okay.)
>
> Rob
>
Anyway, everything related to files are stored into signed integer in Gambas,
so more than 2GB files will lead to many unexpected things, like crashes.
It is the reason why the keyword LONG is reserved. It will be a 8 bytes
integer datatype, and will be very useful to deal with files greater than 2GB
! When I have time to implement it :-)
Maybe your second solution will save you ?
Regards,
--
Benoit Minisini
mailto:gambas at ...1...
More information about the User
mailing list