On 3/2/20 10:43 AM, IOhannes m zmölnig wrote:
On 3/1/20 10:51 PM, IOhannes m zmölnig wrote:
On 2/26/20 2:28 PM, IOhannes m zmoelnig wrote:
class_new() *might* return a NULL-pointer (and it will, if the precision doesn't match), so you have to check for that before you access any class members.
TL;DR there was a bug in Pd that created a few false positives in my original list.
since all flext externals are crashing, i thought i had a look at those specifically. it turns out, that flext has it's own use for NULL-classes, as it internally uses them to create a persistent (and invisible) "flext buffer helper" object.
with mismatched float-sizes, this results in calling `pd_new(NULL)` - something that never happens in the ordinary flow, where pd_new() only gets called in the newmethod of an objectclass. Pd itself doesn't call the newmethod of objectclasses with mismatched float-size, so this is usually not a problem.
however, it's easy enough to fix. pd_new() already does a NULL-ptr check, but only prints an error and happily proceeds to access it's members, leading to the inevitable crash. doing an early exit in this case, reduces the list of crashing externals to the following eleven (11) packages: - creb - cyclone - hcs - moonlib - nilwind - ossia - pddp - pdlua - pof - unauthorized - Gem (crash fixed upstream, but no release yet) - py (this is a false-positive, as it also crashes if the float-sizes do match) - context (the crash is triggered by the embedded cyclone)
even though, we can fix pd_new() to accept NULL-classes, flext should probably handle this explicitly and not attempt to create the "flext buffer helper" object if the class-pointer is invalid.
gfadsmr IOhannes