Subj : Re: Mixing up parameters in setProperty callback To : Sterling Bates From : Brendan Eich Date : Mon Dec 15 2003 10:39 am Sterling Bates wrote: > It now works since I call JS_Shutdown() once all runtimes have been freed. Glad you figured this one out -- it's the first time I've heard of such an API usage error leading to the symptom you saw. The reason that symptom bites is because without the JS_ShutDown call, the deflated string cache holds onto char[] strings decimated from JS strings due to calls to JS_GetStringBytes, an ancient API that "cannot fail" and that takes no cx parameter, associating each such chopped-down-to-8-bit-char string copy with the 16-bit-char JSString GC-thing whence it was chopped. If you destroy all runtimes, and then make a new one, chances are the GC will reclaim memory freed to the malloc heap, and a new string will be allocated that happens to have the same address as a string allocated from a now-dead runtime. If the deflated string cache still has some bytes associated with that address, whatever their char[] content, they will be returned for the new JSString as if they were its chopped-down characters. Just curious: why do you have more than one runtime? Why do you destroy all runtimes and then create a new one? /be .