Delexandra Algomorph — Now in Beta — FM Algorithm Module

I would be concerned about that mystery crash. In my experience crashes that get fixed by magic don’t stay fixed.

1 Like

It looks like none of the member variable in your Module are initialized. morph[], for example. Is it initialized somewhere that I’m missing? I guess maybe it is since this builds without warnings. You might try running it under address sanitizer to see if there is any monkey business going on with memory.

btw, very cool using dot language for this!

I’m going to do another build on Azure and see if the results persist in their build. If it does, maybe I can figure out how to reproduce their build configuration locally in order to better debug the issue. Thanks for the tip about address sanitizer; I’ll take a look with that.

When I first started researching to see how I might be able to implement this, I spent some time working with the gtools from the nauty/Traces project in an attempt to have all the relevant graphs generated and rendered to dot language for me. Eventually I realized it wasn’t too difficult skip nauty and instead just generate the dot language myself for exactly the set of graphs I was interested in.

GraphViz and nauty/Traces are some cool projects, and it’s been fun to learn about it all for the first time while making this.

btw, asan is not easy to use at all, unless you have a mac. It’s trivial to use in xcode. afaik it’s impossible to use in windows. I run ubuntu in a VM and do my asan testing in there. .

1 Like

Are you building in your development environment without optimization switches? This might be the cause for different behavior of the Azure build which is usually fully optimized…

I think his makefile had the standard options, although I didn’t inspect in great detail. hmmm. I just tried running and immediately crashed.

crashed on exit this time. memory corruption?

Thread 1 received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffc1adb91b3 in ntdll!RtlIsNonEmptyDirectoryReparsePointAllowed ()
   from C:\windows\SYSTEM32\ntdll.dll
(gdb) bt
#0  0x00007ffc1adb91b3 in ntdll!RtlIsNonEmptyDirectoryReparsePointAllowed ()
   from C:\windows\SYSTEM32\ntdll.dll
#1  0x00007ffc1adc15e2 in ntdll!RtlpNtMakeTemporaryKey ()
   from C:\windows\SYSTEM32\ntdll.dll
#2  0x00007ffc1adc18ea in ntdll!RtlpNtMakeTemporaryKey ()
   from C:\windows\SYSTEM32\ntdll.dll
#3  0x00007ffc1adca8a9 in ntdll!RtlpNtMakeTemporaryKey ()
   from C:\windows\SYSTEM32\ntdll.dll
#4  0x00007ffc1ad0253a in ntdll!RtlGetCurrentServiceSessionId ()
   from C:\windows\SYSTEM32\ntdll.dll
#5  0x00007ffc1ad00790 in ntdll!RtlGetCurrentServiceSessionId ()
   from C:\windows\SYSTEM32\ntdll.dll
#6  0x00007ffc1acffb91 in ntdll!RtlFreeHeap ()
   from C:\windows\SYSTEM32\ntdll.dll
#7  0x00007ffc1adc53c9 in ntdll!RtlpNtMakeTemporaryKey ()
   from C:\windows\SYSTEM32\ntdll.dll
#8  0x00007ffc1ad75670 in ntdll!memset () from C:\windows\SYSTEM32\ntdll.dll
#9  0x00007ffc1ad00790 in ntdll!RtlGetCurrentServiceSessionId ()
   from C:\windows\SYSTEM32\ntdll.dll
#10 0x00007ffc1acffb91 in ntdll!RtlFreeHeap ()
   from C:\windows\SYSTEM32\ntdll.dll
#11 0x00007ffc1a8c9cfc in msvcrt!free () from C:\windows\System32\msvcrt.dll
#12 0x00000000004a25e3 in rack::engine::Module::~Module (this=0x1f5784c0,
    __in_chrg=<optimized out>) at src/engine/Module.cpp:15
#13 0x00000003a6ba66d8 in Algomorph4::~Algomorph4 (this=0x1f5784c0,
    __in_chrg=<optimized out>) at src/Algomorph.cpp:5
#14 Algomorph4::~Algomorph4 (this=0x1f5784c0, __in_chrg=<optimized out>)

1 Like

crashed trying to insert a copy from an empty rack, although nothing interesting on the stack:

Thread 1 received signal SIGSEGV, Segmentation fault.
nvgluDeleteFramebuffer (fb=0x3f80000000000000)
    at dep/include/nanovg_gl_utils.h:137
137             if (fb->fbo != 0)
(gdb) bt
#0  nvgluDeleteFramebuffer (fb=0x3f80000000000000)
    at dep/include/nanovg_gl_utils.h:137
#1  0x00000000004aa1a1 in rack::widget::FramebufferWidget::step (
    this=0x233da340) at src/widget/FramebufferWidget.cpp:67
#2  0x00000000004ab46f in rack::widget::Widget::step (this=0x233da280)
    at src/widget/Widget.cpp:151
#3  0x00000000004ab46f in rack::widget::Widget::step (this=0x233d9320)
    at src/widget/Widget.cpp:151
#4  0x00000000004ab46f in rack::widget::Widget::step (this=0x3c26450)
    at src/widget/Widget.cpp:151
#5  0x00000000004ab46f in rack::widget::Widget::step (this=0x3ba6ee0)
    at src/widget/Widget.cpp:151
#6  0x00000000004ab46f in rack::widget::Widget::step (this=0x3ba6e20)
    at src/widget/Widget.cpp:151
#7  0x00000000004ab46f in rack::widget::Widget::step (this=0x1f63af40)
    at src/widget/Widget.cpp:151
#8  0x00000000004ab46f in rack::widget::Widget::step (
    this=this@entry=0x3bcb4e0) at src/widget/Widget.cpp:151
#9  0x00000000004a77d5 in rack::ui::ScrollWidget::step (
    this=this@entry=0x3bcb4e0) at src/ui/ScrollWidget.cpp:36
#10 0x00000000004969a9 in rack::app::RackScrollWidget::step (this=0x3bcb4e0)
    at src/app/RackScrollWidget.cpp:7```

This build seems to work! Except for the display - it’s empty in this version.

I built it from source and still seem to get segfaults on adding the module. My setup is pretty unusual in dozen of ways so it might be more useful if someone else can reproduce it, I can’t rule out it’s just on my end.

1 Like

See above, happens for me, too every time. I pasted in some stack traces from the debugger. I’m going to guess that some code is writing off the end of an array and corrupting someone else’s memory. I didn’t see anything obvious, but the code is fairly complex.

Adding onReset() on the end of the module’s constructor seems to fix the problem…

1 Like

It must have something to do with the bitset. I see now that wasn’t being properly initialized outside of module reset.

I’ve pushed this fix and the builds have been updated.

Today I’ve been working on setting up a Rack dev environment on an old MacBook that’s been sitting in a closet, mostly in order to give asan a try there. Currently I’ve got patches with Algomorph in them running concurrently on Windows 10, 7, and MacOS 10.11, and haven’t yet run into any crashed on any of the three.

I haven’t heard any complaints from about running on Linux yet, so hopefully things are looking okay there.

Thanks so much for the help everyone!

Edit: I’m now seeing an odd issue where Operator 1 can’t connect to Modulation Output 2 on all platforms. All the other connections work. Looking into it…

2 Likes

Ok, I got that one fixed. Turns out the size of one of my arrays was 1 shorter than it should have been. Funny how Windows 7 had been working fine until the Windows 10 crash was fixed, then they both started misbehaving in the same different way.

The builds have been updated once again. Everything seems to be working on Mac, Win 7, and Win 10 over here.

New builds are available, now with click filters! This applies to algorithm changes (both from button press or trigger input), operator disabling/enabling, as well as modulator connection/disconnection. This makes the trigger input much more useful, and opens the door for performative interaction with the module’s various buttons.

If this is not important to you at any given time, or for example if you are using Algomorph for CV and want to remove the slew, the click filter can be disabled from the right-click menu. This saves some CPU.

2 Likes

The routing to the Sum output was incorrect under certain conditions in the last build, sorry about that! The builds have been updated with the fix.

I got algomorph going and was wondering if this is still an actively worked on thing. I could also use a manual. but its super cool.

I sort of thought it was abandoned, but I agree it is cool looking.

i think it was only paused as the author was moving its home or something similar …

That’s a pity! It really works but I’m not clear on how it all works. They kind of dropped out of development without writing the manual. EDIT: There’s this thread, from December 2020 so there’s still stuff going on. Plus this post describes the module in detail!

1 Like