ccrma / chuck

ChucK Music Programming Language
http://chuck.stanford.edu/
GNU General Public License v2.0
799 stars 127 forks source link

seg fault on some global objects upon cleanup #435

Closed gewang closed 5 months ago

gewang commented 5 months ago

general template:

global Object foo;
<<< Machine.refcount(foo) >>>;
// possible crash at this point

global GPlane foo; (crashes; refcount 1) GPlane foo; (recount 1) NOTE: has additional refcounting

global GGen foo; (crashes; refcount 1) GGen foo; (recount 1) NOTE: has additional refcounting

global FileTexture foo; (crashes; refcount 1) FileTexture foo; (recount 1) NOTE: has additional refcounting

global Geometry foo; (crashes; refcount 1) Geometry foo; (recount 1) NOTE: has additional refcounting

global UI_Button foo; (refcount 1) UI_Button foo; (recount 1)

global OscIn foo; (crashes; refcount 1) OscIn foo; (refcount 2)

global OscOut foo; (refcount 1) OscOut foo; (refcount 1)

global Event foo; (refcount 1) Event foo; (refcount 1)

gewang commented 5 months ago

possible cause: global objects are not checking for default ctors (newly added as 1.5.2.0) possible fix pushed a0d1786e6401b707cfe06230dc8833236b43535a unit test (for OscIn) fe922d91035c9fc888e00e0ddd2166b3ef5eb177