Skip to content

Commit

Permalink
add global objects default ctor check and call; fix crash in cleaning…
Browse files Browse the repository at this point in the history
… up certain global objects
  • Loading branch information
gewang committed Mar 15, 2024
1 parent ffa7f1c commit a0d1786
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions VERSIONS
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ ChucK VERSIONS log
- (fixed) error reporting for =^ =v --> --< operators
- (fixed) all oscillators Osc( freq, phase ) constructors; previously the phase
was not set correctly
- (fixed) crash in cleaning up certain global objects (specifically those
with default constructors), including OscIn, and ChuGL classes
GGen, Geometry, FileTexture
- (developer) added internal/audio-thread-callable setters for global
int / float arrays


1.5.2.1 (December 2023) ChuGL (alpha) => standard distribution
Expand Down
7 changes: 6 additions & 1 deletion src/core/chuck_instr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4077,11 +4077,16 @@ void call_all_parent_pre_constructors( Chuck_VM * vm, Chuck_VM_Shred * shred,
{
call_all_parent_pre_constructors( vm, shred, type->parent, stack_offset );
}
// now, call my ctor
// next, call my pre-ctor
if( type->has_pre_ctor )
{
call_pre_constructor( vm, shred, type->info->pre_ctor, stack_offset );
}
// next, call my default ctor | 1.5.2.2 (ge)
if( type->ctor_default && type->ctor_default->code )
{
call_pre_constructor( vm, shred, type->ctor_default->code, stack_offset );
}
}


Expand Down

0 comments on commit a0d1786

Please sign in to comment.