Crash with fluid.bufonsetslice~

I am able to crash Max using the latest build of the fluid~ externals.

This occurs with bufonsetslice~ in this patch. I think the issue is that the buffer I am peek~ing at the bottom of the patch doesn’t exist, but surely this shouldn’t crash the patch and would ideally do nothing.

Steps to reproduce:

  1. Put some audio into the buffer~ named ‘a’. I used a stereo file.
  2. Hit the bang at the top

----------begin_max5_patcher----------
1412.3ocwY0rbihCD9r8SgJN60ERBDvbJ6yvdbpsbIaDNZFrDERjIyL0jm8U
R7iAaHlDSx5phwoag596iVc2B860q71Kelo7.eA7UvpU+d8pUNQVAqZ9+Udm
nOeHmpbCySv9gb+271TqRydV6DW.NxzERtPqZ0wScZLi9uHsxDUm3hbl1MWv
yBkU5KkVKR+yBVs64kkKoFi8uM5Kn5COxEG2UxNnqGRDdabX.Nxu8CdC.FGt
MBECCQIMePa.jns9a.HzV+gSGqrA4MPekWFOm8DqTwkhdN2JOZQQOwq5cKV9
5aR2DEuoSDWTKxuSTI6Id68G1IkVZ.k1fnpRGt8dlD3cdZjorRQE24J0B+y5
VWx8LRPOwTEzC02r8QYq5yzTXhE8P+.6ERfu8RPr+YxvDCbLWd36rz9trmrf
I3hhRlhIzTciu2oNkkQqx06xjlf.9ubd.zPwioOqwCGUoECN2+uK4z7N.brj
mJEVmXvSBq3Vy8U.Lzgsv9fwMBAsXja1DbZnkITpLfrRsmVZePsO2YATqRsT
lOTUGVxYY5F0Ebg3BVTKKlVYI+3iux8tWZTd50lamF0tJQs1clXB8NE8ogdn
llm2rPd3z+LUvOQ0LMu9Q.xuSISPM.8Q0gRYd9.dpVySinI0Dief8Cdp9Qmg
5GLXFNunMHxq6obJ+HSoGJSSOpFJQo+YMo2ST09l0v6zrSE4FTTmvRZYDudX
7bBu9Ka6m3af7WKA3vjfZPFHquldo.w8kOVZvQREh5oYhzgatLu3T4FgXRSx
QDlfSHQIlDfgws4Fw9QXRX.xlWH4bxw1o7OqW29iMKOucRokJ5oB0KSPdnkl
7T7iBapk6h8RFg8hh9rIOtHS9Bf9O4lUZpI3O36f+RlUvWNW0KHbl+v9moSg
ax5c0y6Q5FpcjPV7GBq6no9T2SzxthSUXTnuODFmLAoGLIo6OIoCeMReOUbb
9bV+dfH0jVPRqPCogc08w8K665hPd5DSLLArCXhT1y856XQH3ZHNICGERrLb
BbBFN7cDV6eqE59N9iz1sXrInCaZNxwewMBiBVV96buJ4bwTkmbdqU+3DqRV
UdnMToIoI.Nv2LEc0bQWmaesiEAyccya0GBpm6a5CvOPevN2jY3C3OPe.OSd
.MoOzHrsceOaOco6p6ecGUqK46qz0gN82+xapOKSS+6o4McQ0sLbj1vVe14b
eWSQ2w1G0f8.9HabDG+F14HZpcN5RbdQMm4VuAGuEGGiC8I9gIj.BAtADdQ4
lkgC9UNPIK0ivBvwYAzaiEbUdeM3C8itB+AAIaCMW9nP7wRYUAfLFnC++CzH
nEzIX62KMnq9EGff.+wfL4M.Y7sh1uindbH5yJpufw99K.ks60gu9Ha10Cxp
5RonQHqjQIK7R+RkFK.AG4VUPHtV.BemLhIgs1jVdDn015nweJMog0l8zVuI
6dcvbWuKsAsRNyfhDzVDF66GGDDf8SPX6hC26Px98RFSruJKiUd4lZFvPnkn
tP2FRtIcPhfaM3lD5mDiig9AHC3saJDEfhfIAQvfv.hoq533OhEIY4U7zsFZ
QJTFPYYkW.OT2kAfBdvzboknZILvCor8lkNFkHvCYYZyMYZ13nB.QwfGzOVx
TOJySA9agF8lAZ6OX7TRvkr.7aMjaLFN7igh6h4FgDh+bC1BRbuAFy9KsWBI
iBW2DLb6B0n+xVSa3fqaKF1umzI5Gkbtezqn44ZHxLrisOu61PvvYXI3RXIm
6BukkBGLnS7zlBb0kUfQawWVVIH55xtls+dc8mqGXmcjko0Gig+8CwaRljOM
xjLXPcfDdeQL1YEcKSmrDwlIygNCWBKELGKAuxR0ITt3bsrF4hyy5hyx55yw
Z5yv5xyuxsY1oN2p0+Y8+A3ywm8A
-----------end_max5_patcher-----------

OS: Mojave 10.14.3
Max Version: 8.0.5

image

https://hastebin.com/ocukulabal <-- Crash Log

Update:

It seems that the crash does not occur when testing with mono files. Stereo files however cause the crash.

Hello!

3 quick things:

  • are you sure you downloaded the alpha04a - this last sorted stereo buffer issues.

  • there was many bits missing in your patch. I made it complete below.

  • you are sorting the indices for nothing in that patch: they are always sorted.

I hope this helps


----------begin_max5_patcher----------
1485.3ocyY1rjaiBD.9r8SAkN60k.zu4zrOC6wTa4Bag7PhLnRBMYxjJ4YeA
zOFYKYKOVim8PbR5Vnt6OZZZA+Z4BmshWokNfu.9JXwhesbwBiHsfEM++ENG
HutKiTZdLmsURof6rpVEu5fnRlQkFkvFo4D4tmY78aJn6j0ubnW75HeOb3J.
JHdsq5u7Z+E7uMiq9UI+YNsdPNaI78NcpYIFOPr8a+EDa4AL9YNPAsjxkDIS
v64DQqwMNQHbMBiccQq.tZGw0xOJk+Ly3BNNZA+d4R8Oq9fIjemyAi86bt6C
StuKL42MWY6IyLl3zenbwV+SReU1PuzTZwe.j+IisSkZNHFQiiQuvHsehiLI
YwFmFgtD8RyDDoypKfw3KRwODLjWv3xgCd2KjCAQs4Pdwdq8Ubv6L.XEXgef
A1AZYIYO8rHqflmQ1Qu40GdAAlPot5g+DlXGbtDMXHi9PmKA6oxbgZBs7li5
Pb2RwH+0gnHnOdEHHbpo0CgffoNqa6Vzhl.uIxW3jxxnuPKJUEOrF+BGRdtk
3EVCQiquILunvUchX7ZQ3NQEzWXsi2uSJoPAGohLUE092qAdNGeMhDZAuhYb
kZgpItksuvVd5axdftlkEAdlrHuHqpZp438YhcemlXsVSg2bJmwsKX1ScBMk
TkI2jJTSxr2L9mZs3f5S0Y+iMXN4Pcv82ELRVa34rufkH3ZmnGp0haMmttsI
17sCFySvI4CLXUpfBKinrTEjUkaIE5Yhs0IDnVkRgHquptXIilJaTmy37Snn
TjOtxB19muvX2JTJObo2sQS4lJds1Mp0kxMkjW56gRRVVyB09u9WIb1AhjJY
0SAH2NkTNQEnOWtqPjk0iS0ZdY.MIpj3czevRjOaLjcxf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hTazStCxSt+wyu6wwu2wSuyQkk+8x+S
NY5sC
-----------end_max5_patcher-----------
  1. I’m not sure - you could put a post command in the package to print version to the console ala bach package to help people who need help like me :slight_smile:. Nonetheless I’m updated now.

  2. I’m not sure what is missing? The print at the end was not necessary to cause the crash and I hadn’t even got to the point of trying to inspect the slice points when the crash occurred. Here is a side by side comparison, mine on the left, yours on the right.

  1. In the didactic example of bufonsetslice~ you sort at the end. I copied from here but perhaps if its moot it doesn’t need to be there in the help files.

Now I am on the latest update it works. Thanks @tremblap

yours iters through a buffer called slicepoints.

nice catch, I’ll remove

Originally thats what I thought was the cause of the problem, with it removed it wouldn’t crash. I said that in OP.

I don’t get any crash here… Max7 64 bit… when we have Max8 support I’ll test it.