Forums > Javascript

removing dictionary from system with javascript

October 14, 2013 | 12:17 pm

Hi

I am struggling at the moment with a nasty bug in max that crashes it under certain circumstances when attempting to query dictionaries with javascript. I filled in a bugreport, but my description of it is rather meager, just a crash report that hints to a buggy hastable lookup function.

Thread 0 Crashed:: Java: AWT-AppKit Dispatch queue: com.apple.main-thread
0 libsystem_c.dylib 0x91957448 pthread_mutex_lock + 18
1 com.cycling74.Max 0x00061ea4 linklist_findfirst_hashkey + 42
2 com.cycling74.Max 0x000c24a4 hashtab_lookupentry + 81
3 com.cycling74.Max 0x000c26f8 hashtab_lookup + 52
4 com.cycling74.Max 0x000f9b1f dictionary_appendatom_flags + 63
5 com.cycling74.Max 0x000f9a44 dictionary_appendatomarray + 89
6 com.cycling74.Max 0x000f99e5 dictionary_appendatoms + 65
7 com.cycling74.Max 0x002c26ad dictobj_set + 731
8 com.cycling74.Max 0x002c2957 dictwrap_set + 45
9 com.cycling74.Max 0x000c8ccd object_method_typedfun + 101
10 com.cycling74.js 0x03fb96c9 jsmaxwrap_FunCall + 602
11 ??? 0x2fcef51d 0 + 802092317
12 libmozjs185.dylib 0x04158b16 _ZL27CheckStackAndEnterMethodJITP9JSContextP12JSStackFramePv + 214

and alternatively:

Thread 0 Crashed:: Java: AWT-AppKit Dispatch queue: com.apple.main-thread
0 com.cycling74.Max 0x000c248a hashtab_lookupentry + 55
1 com.cycling74.Max 0x000c26f8 hashtab_lookup + 52
2 com.cycling74.Max 0x000f9b1f dictionary_appendatom_flags + 63
3 com.cycling74.Max 0x000f9a44 dictionary_appendatomarray + 89
4 com.cycling74.Max 0x000f99e5 dictionary_appendatoms + 65
5 com.cycling74.Max 0x002c26ad dictobj_set + 731
6 com.cycling74.Max 0x002c2957 dictwrap_set + 45
7 com.cycling74.Max 0x000c8ccd object_method_typedfun + 101
8 com.cycling74.js 0x0d4db6c9 jsmaxwrap_FunCall + 602
9 ??? 0x2ba07e6d 0 + 731938413
10 libmozjs185.dylib 0x0d67ab16 _ZL27CheckStackAndEnterMethodJITP9JSContextP12JSStackFramePv + 214

it looks as if it happens only after a dictionary (which is not removed from the system unless max quits) is reused again by a new patch. so I would like to find a way to remove the used dictionary completely by the javascript object that is holding the "authorship" over it. clear() does a nice job clearing it, but it doesnt remove it entirely from the system.

and it gets tricky since other javascript objects which "readonly" from the dictionary hold an instance of it aswell, and my test showed its actually a snapshot at the moment the dict-object is created. so I could clear() the dictionary by the "author" but there might still be a copy of it in another script.

so all in all I am puzzled and I hope for some guidance…


Viewing 1 post (of 1 total)