[PD] Too many objects (but only in Windows)

IOhannes m zmoelnig zmoelnig at iem.at
Wed Oct 3 15:33:53 CEST 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2012-10-03 15:06, Ed Kelly wrote:
> Hi list,
> 
> I know you main devs have bigger fish to fry right now, but an
> answer to (some of) my wierdness with Gem (in case you're
> interested) -- the "unable to save file: too many objects" message,
> and related errors (files no longer loaded within the patch, Pd
> seems to lose its bearings/path) only seem to occur on Windows.
> Something gets corrupted in Pd but I don't know what.
> 

the problem is, that on w32 file-handles can be incompatible between
different c-runtime versions and each dll uses the c-runtime it has
been linked too.
this means that file handles opened by one dll (e.g.: Pd-core) might
not be closeable by another dll (e.g. Gem).

on the other side, Pd<0.43 would only provide a function to open files
(using all those search paths), but none to close them.
this means, that whenever a file is opened via the search-path feature
(and Gem uses that a lot), it is impossible to close it - effectively
leading to a file-handle leak.

now with Pd-0.43 there finally is a sys_close() function that allows
those file-handles to be closed in the proper context (that is: the pd
dll).
unfortunately this does not mean that the problem will magically go
away by upgrading to Pd-0.43 - the caller (e.g. Gem) has to use the
new function in order to have an effect.
starting with Gem-0.94, Gem should be able to handle the problem (and
even continue to work with older Pd's - at the expense of keeping the
file-handle leak with Pd<0.43)

fgamsdr
IOhannes
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlBsPr4ACgkQkX2Xpv6ydvSTqwCgzZkCKleYyUt4cbkbOd4xa2GZ
JswAniAgoi1oUnk98wTl1f0t/6zhiSY5
=tzPv
-----END PGP SIGNATURE-----

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2320 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20121003/24250951/attachment.bin>


More information about the Pd-list mailing list