ccrma / chuck

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

ChuGin object->create() API does not call preconstructors for DLL-defined types #370

Open AndrewAday opened 11 months ago

AndrewAday commented 11 months ago
    Chuck_DL_Api::Type type = API->object->get_type(API, SHRED, "CglUpdate");
    Chuck_DL_Api::Object obj = API->object->create(API, SHRED, type);
    RETURN->v_object = (Chuck_Object *)obj;

CglUpdate CK_DLL_CTOR is not called. See https://github.com/ccrma/chuck/blob/2d8ce621bc0b75365d524d4682c8edc3dedf980c/src/core/chuck_instr.cpp#L3769 call_pre_constructor needs to be called, as well as pre-constructors up the inheritance hierarchy.

Encountered working on CGL.nextFrame(), but we have a workaround for now

nshaheed commented 11 months ago

duplicate of #350