This is a long time coming… As you can see from the git commits below, I’ve been struggling with one or more bugs for quite some time. The crashes I’m seeing all seem to point towards an invalid memory reference. The object seems to be an int based on the errors I’m seeing. The crash is much more likely when I’m running multiple instances. I suspect this may be due to shared pointers between module instances but again, I’m not 100% sure.
Background/Context Developed on MacOS, Tested mostly on MacOS (and some Win10)
This plugin is essentially an X, Y voltage output of ant coordinates for the Langton’s Ant system. It has other bells + whistles: quantisation (borrowed from JW modules - thanks!), a second “shadow” ant which has fun interactions with the first ant. There is also a step skipping and looping functionality (stateless).
Initial development: Life, ants and Brain. Just tossing an idea!
Example of some ants in action: https://www.youtube.com/watch?v=b8--aKFVYvk
Some early investigation into the bug: Segfault crash associated with Chronoblob2
Evidence of frustration and banging-head-against-wall:
Process: Rack  Path: /Applications/Rack.app/Contents/MacOS/./Rack Identifier: com.vcvrack.rack Version: 1.1.6 (1.1.6) Code Type: X86-64 (Native) Parent Process: bash  Responsible: Terminal  User ID: 501 Date/Time: 2019-12-14 09:51:48.951 +1100 OS Version: Mac OS X 10.15.1 (19B88) Report Version: 12 Anonymous UUID: C4657299-4478-42F3-57EF-465A7F04BE59 Sleep/Wake UUID: 5C002B35-5B5C-49E4-987F-A6F480B44226 Time Awake Since Boot: 9800 seconds Time Since Wake: 5600 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Application Specific Information: abort() called Rack(2739,0x1049f9dc0) malloc: *** error for object 0x1: pointer being freed was not allocated Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x00007fff6c8b449a __pthread_kill + 10 1 libsystem_pthread.dylib 0x00007fff6c9716cb pthread_kill + 384 2 libsystem_c.dylib 0x00007fff6c83ca1c abort + 120 3 com.vcvrack.rack 0x000000010427559e fatalSignalHandler(int) + 510 4 libsystem_platform.dylib 0x00007fff6c966b1d _sigtramp + 29 5 dyld 0x00000001049467fb ImageLoader::trieWalk(unsigned char const*, unsigned char const*, char const*) + 183 6 libsystem_c.dylib 0x00007fff6c83ca1c abort + 120 7 libsystem_malloc.dylib 0x00007fff6c92cd20 malloc_vreport + 548 8 libsystem_malloc.dylib 0x00007fff6c92cade malloc_report + 151 9 com.vcvrack.rack 0x000000010435b288 json_delete + 136 10 com.vcvrack.rack 0x000000010435b26f json_delete + 111 11 com.vcvrack.rack 0x00000001043532f4 hashtable_close + 84 12 com.vcvrack.rack 0x000000010435b230 json_delete + 48 13 com.vcvrack.rack 0x00000001043532f4 hashtable_close + 84 14 com.vcvrack.rack 0x000000010435b230 json_delete + 48 15 com.vcvrack.rack 0x000000010435b26f json_delete + 111 16 com.vcvrack.rack 0x00000001043532f4 hashtable_close + 84 17 com.vcvrack.rack 0x000000010435b230 json_delete + 48 18 com.vcvrack.rack 0x000000010427937f rack::PatchManager::save(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) + 367 19 com.vcvrack.rack 0x00000001042abfa9 rack::app::Scene::step() + 201 20 com.vcvrack.rack 0x000000010428d24a rack::Window::run() + 1226 21 com.vcvrack.rack 0x0000000104274efa main + 1434 22 com.vcvrack.rack 0x000000010420e034 start + 52
I’ve just made the github repo public in the hope that someone may be able to help. I would really love to be able to release this thing as a stable module.
I should be clear in saying that this is my first VCV Rack plugin and I’m not a professional dev. There could well be multiple things going wrong here. Spaghetti-code dragons most likely. So, apologies in advance for that.
If anyone might like to help and would like a code walk through, I’d be happy to jump on a screenshare/call to do so.
Cheers all, Owleyeyeye