Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instacrash when fittransform-ing in fluid.umap~ #367

Open
rconstanzo opened this issue Jul 3, 2023 · 4 comments
Open

Instacrash when fittransform-ing in fluid.umap~ #367

rconstanzo opened this issue Jul 3, 2023 · 4 comments

Comments

@rconstanzo
Copy link

I remember this being an issue a while back but it being fixed (hence the fluid.umap~: Number of Neighbours is larger than dataset error message now when trying to fittransform something that has fewer dimensions than @numneighbours) but there appears to have been an oversight when coding it as it gives a nice instacrash when fittransform-ing a dataset with the same amount of dimensions as @numneighbours.

Screenshot 2023-07-03 at 11 12 04 AM
patch.zip

I imagine this means that a > needs to get changed to a >= when running the size check.

Also including three crash reports, two of which point to a gnarly UMAP error but the third one is different (no flucoma mention at all), so including it in case it's indicative of something else happening at the same time.

crash reports.zip

@lewardo
Copy link
Member

lewardo commented Aug 2, 2023

I've managed to reproduce the bug, and got the stacktrace to a segfault in UMAP.hpp:373 in fluid::algorithm::UMAP::makeGraph, in the *nearestIds[pos] when discardFirst is set to true, the pos index goes out of bound on the last iteration of the for loop, possibly the boundary checks of the nearestIds doesnt check for overflow

@rconstanzo
Copy link
Author

I don't know if something was changed with this in the update(s) since this, but this is much more prone to crashing now.

Between this issue and #331 it seemed like having not only the same number of dimensions as @neighbours will instacrash Max, also having less will prompt an instacrash. What's odd is that it appears to only happen with a smaller dataset. I haven't programmatically narrowed things down to see where this starts happening, but here's a patch that shouldn't crash, but certainly does.

At the moment I'm coding something based around small-ish datasets (~10-20 entries) and it's basically a dice roll every time I do it whether Max crashes or not based on this bug.

Screenshot 2024-05-18 at 8 29 08 PM

<pre><code>
----------begin_max5_patcher----------
1410.3ocuXssbaaCD8YouBV9rLGrKt2m7+QmNdnjPrYpDoFRpTmlI4auG.H4
HWeUJrNyDISvEXOmytXW.8s4yJW1ceXnr32K9ihYy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zIqHr0x5kw7kTxELCRqyFAlOlwGQqCvPhjRGxUQrl
yKWbOjCAFrm.QGrbj.6mvJI7tGkM3LrA7G6aMLT2LZSkMSENyUQFp+RX8Mnv
BppcS83XeCZHjOR2oEVRUHOoVNNiR315Ue8j1suPs5m9xs0618nR4G.0GXiK
Ho+e04xN4ct1Csu+BaPmOhgV7FMm3W7fFKdMtp9f5R2CbEdzIjOuVzXKP7KC
8qHCOuDvWxYt1hK5Tea3I77RXHZGmNRoJQNoXRORoeJYW5FOmM8DoLXz4IQO
dRomcJo2mZP0y51gO00uMeC1WXW6altJ0YNSSKakS3cf9zl8Mqq1iR4+n3Z.
p0M3xeC3XrCEbw0aB08s80XOKZaVbcCJLTOldIN8Uw0PKV2LLhWpSStMzb6c
K612OTnuv54xzED046UMw6voIW2hmJeHL9iWMM4suEoSkuOrZ5I8kP43oG12
bjKwmN1+5mA3yko9T8LoOeye8zVcizu29WoYm9YY9O+XWIHGG+w5x.35pi9N
WHEGI6ALrNLL1zl1RbhMT1lmU4eu9w9A4G46wO7T3I983oovQwrgOHN8vp75
9xNIt583I0T3I5CJ2K9iC8lNhmBG8tRHdhixEKvkb9Rne3f0IefxketKUTzu
H8XSa9wzkjJ6Ceo4n84Qp6Q8vQTLbeeBWk2axG4tba25PeKp1FK5MOectxTo
3VTHaXWclHoJ1y+97+EvLUbUO
-----------end_max5_patcher-----------
</code></pre>

Max version 8.6.2
OSX 14.4.1
FluCoMa version 1.0.7

@rconstanzo
Copy link
Author

rconstanzo commented May 18, 2024

Ok, narrowed it down.

Max will crash if you have a fluid.dataset~ with where size == @neighbours in fluid.umap~ OR if size =< 6.

For some reason if your fluid.dataset~ size is 6 or less, it will crash when trying to fittransform.

Screenshot 2024-05-18 at 8 43 27 PM

<pre><code>
----------begin_max5_patcher----------
1857.3ocyZssiapCE84Y9J7Ao91zHrMPf9TOeGsUQNAmD2xMYalNSqZ+1OFa
HAH.Cg.4LRiHC1F7Zu12rM6e+3CVaSegJr.eB7EvCO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Ho.6UpaYJVWGL
T.ft1fOq3hPlPp5zU+vIT1giaUgUE.2oY.gMIpbMGh5r56CmlyeQP6b10JMl
uDE1srlxrmU8Ob3x0rruBfWUldmUL0o.86t4o9YXj1INK4kgWmbeKRw8bxxK
n9wNQX6QLSH3bLSiQjlkYB4OhopIC27.WV1YtnFu6Zpsuso1cL7avbPu3wNS
vaclfigN8mAYphXVd2.n6cyO.NJ9Ct9hoxD9pUMxVLKspM1V0E6k0Da+0Ca6
ZgUut99pA1G+yi+2N4Wiu
-----------end_max5_patcher-----------
</code></pre>

@rconstanzo
Copy link
Author

Haven't tested all the permutations of this, but the <6d thing also instacrashes pd (0.53):
Screenshot 2024-05-20 at 5 08 07 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants