CNMAT / CNMAT-odot

Multi-paradigm Dynamic Programming
Other
115 stars 11 forks source link

bizarro o.compose save state bug #349

Closed ramagottfried closed 3 years ago

ramagottfried commented 7 years ago

I'm not sure how this happened exactly but doing a bunch to debugging with an unrelated object I have been working, caused o.compose to somehow save a larger bundle in than it displays (see test patch below).

Probably this has to do with Max restoring the patch after crashing, which is unsurprising that the patch could get corrupted, but it's something to be aware of, and possibly fix:


----------begin_max5_patcher----------
2671.3oc6az0chpq8Y8WAKdVsrS3qb9abe7LypKqRm5brROJN216rl+6WRBP
ALIjfJBVlkEkjcR1Ymc1eO+d5D6mheO5fs0eY82VSl76oSlvZh1vjr2mX+5x
2Wsc4AFX1wKVu4vaaW9g8LduIQumv54gCe75Swaev4gcKeMJskuY+ie7M6Ye
a2m8j7waY8rO93a05by5rA8.TqmCIKe9YVm0538zFAveQkF+HsQeb019uosQ
PUa6E5fCp03p3sw6ozCmEyrx+CV78J.s63q7eeHERTUT83SY+F9jN7bbb8cT
IvJHJusL4EEvkQeRmrGda41njjHE.KkjUFHJ4CUiRUteJkDvH4.PIq9Ax6mR
hccj2uVT6Jjziu9X56ORIUThOHERJDLVm8LpvqVHKbn0+ZQvVXhkmqERAgIa
vai18ijW3rNDWWTSvmr40HJkeeR5XbV3n2.Veb+xjMw6XiwGGHcPOuY6VJPJ
Nz2G+OQOj7xlU+ytnCLtSYDezmrmOsbuTZARS1STN6Y5j0H6IpD6I6WO3n.1
2YDFoc+g5tEcyub+zi2Pe48aHKJRaVTzorndKvHjEJbQHjxoNObgePnUnG8U
rOqu.G5KAreOGbW.DZSz2XP4y+M33SeiveKHH8EEz25L6n.7BjTdWjLlcfj9
u.sFUEN9vvTjT5vZfmGYDO+n7iKp7iQF89DiNH0tKPkcWPI6tDI2FZPVMHxH
LPfQXf.QwfHivzxr.PtQXfdFgAZZDFXhQXfNFgAMXDFzjQXPCFgAMXDFXpQX
f1BQgyQHJXnPTvTgnPaDhBMIDELRHJnmQXflFgAlXDFXfQXfZiv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vEnYFH0mIvXTP
qDzYRgG3ZLQ3rRplqomp8+LsWUHwEQz5441biHTqko5lce8jPL65bgXinVVo
Z75eGTynm0cH9kNtecFlqmLGoFm11HBe9T7tI8+mMdhtpx.ZKRA8PjxPSH5N
DyPSO75JDq+GTuKhBgqbT875NQVWsZ.H6a1RkG.NVvrjjq+N+X7JDUJAGqtg
8kix9PB+uUaxyIjTt7RiiUOGgnahgEcSLotb1+zW++F3nr+QY+ix9Gk8OJ6e
T1+nr+QY+ix9Gk8OJ6evJ6W+rYA8fzpBW6zpBW2zpBW6zpBW6zpB29zpB27z
pBcbZUgASZUgKeEqHM+kWNr5bxs5be37RtJLTStJLXStJLPStJLPRtJzGStJ
zGStJzWStJzWStJb2mbU3dJHKvW1fr.2aAYA9JDjE3KYPVfgQPVf69.rOJ6e
T1+nr+QY+ix9Gzx9s99zISl7moSoOr99roSr2tYWzAaq+x5uslL42ztseaYx
pWnsSadRVqSrODeb+pHNn1wO8y4PnMaNmw6eczgjM6VlrIdWYfrEutKe6seE
s+PFvr0v90k+LdO80fYrW2ri+Jl859nesIGdWVKK2u5kMIQqRNtmgW1u66Zy
GZ75n86Ntg1JLktx+Y5+GUTB8lC
-----------end_max5_patcher-----------
maccallum commented 7 years ago

Yeah, if you copy the o.compose and paste it into a text editor, you’ll see that saved_bundle_length is 7768 bytes and saved_bundle_data is huge. The fix for this would be to regenerate the text from the bundle, but there’s a reason it’s done this way that I can’t recall. Ilya may remember…

On Oct 23, 2017, at 6:54 PM, rama gottfried notifications@github.com wrote:

I'm not sure how this happened exactly but doing a bunch to debugging with an unrelated object I have been working, caused o.compose to somehow save a larger bundle in than it displays (see test patch below).

Probably this has to do with Max restoring the patch after crashing, which is unsurprising that the patch could get corrupted, but it's something to be aware of, and possibly fix:

----------begin_max5_patcher---------- 2671.3oc6az0chpq8Y8WAKdVsrS3qb9abe7LypKqRm5brROJN216rl+6WRBP ALIjfJBVlkEkjcR1Ymc1eO+d5D6mheO5fs0eY82VSl76oSlv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StJb2mbU3dJHKvW1fr.2aAYA9JDjE3KYPVfgQPVf69.rOJ6e T1+nr+QY+ix9Gzx9s99zISl7moSoOr99roSr2tYWzAaq+x5uslL42ztseaYx pWnsSadRVqSrODeb+pHNn1wO8y4PnMaNmw6eczgjM6VlrIdWYfrEutKe6seE s+PFvr0v90k+LdO80fYrW2ri+Jl859nesIGdWVKK2u5kMIQqRNtmgW1u66Zy GZ75n86Ntg1JLktx+Y5+GUTB8lC -----------end_max5_patcher----------- — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/CNMAT/CNMAT-odot/issues/349, or mute the thread https://github.com/notifications/unsubscribe-auth/ABjjdaytYNRBg1MudcAy_WRuzMGUWfMqks5svMTVgaJpZM4QDKeo.

maccallum commented 3 years ago

Fixed. When a bundle is found saved in a patcher, we now call doFullPacket.