umlaeute / Gem

Graphics Environment for Multimedia (official repository)
https://gem.iem.at
Other
103 stars 30 forks source link

single-precision Gem crashes when loaded into double-precision Pd #360

Closed umlaeute closed 10 months ago

umlaeute commented 1 year ago

I was trying to be too clever...

Gem tries hard to find out it's own path, in order to find abstractions, config-files,... it does so by trying to instantiate it a "Gem" class and inspect that.

the crash with current Gem could be fixed by adding a nullptr check to Pd itself. however, since there is no way to avoid the crash with with legacy Gem, we need to fix the issue in Gem anyhow...

umlaeute commented 1 year ago

since Pd-0.54 has been released, it has been decided to use different file extensions for single and double precision externals, which means that an old (pd32) Gem won't be loaded into Pd anyhow, thus avoiding the crash in the first place.

we probably should still make the code a bit more robust...

umlaeute commented 10 months ago

unable to reproduce now (obviously you have to rename the Gem-binary so that it is recognized by double (resp. single) precision Pd, but while i get a lot of expected errors ("refusing to load 32-bit objects into double precision Pd") no crashes happen.