vovoid/vsxu — Issue #31: engine crash when re-initializing sequenced parameters 
Author: jaw
Created: 2011-12-17 14:53:56+00:00
State: open

To recreate:
1. create a GLSL loader with a uniform float input
2. add a sequence to this one
3. edit the GLSL code
4. save twice
5. program crashes; output from valgrind:

==2128== Invalid read of size 8
==2128== at 0x5C35F41: vsx_module_param<1, float, 4, 1>::set_internal(float, int) (vsx_param.h:222)
==2128== by 0x5C4D62D: vsx_param_sequence::execute(float) (vsx_param_sequence.cpp:180)
==2128== by 0x5C564FE: vsx_param_sequence_list::run(float, bool) (vsx_param_sequence_list.cpp:236)
==2128== by 0x5BFEE60: vsx_engine::render() (vsx_engine.cpp:765)
==2128== by 0x4A8D73: vsx_window_texture_viewer::draw_2d() (vsx_widget_preview.cpp:117)
==2128== by 0x44F4F1: vsx_widget::draw_children_2d() (vsx_widget_base.h:329)
==2128== by 0x44E050: vsx_widget::draw_2d() (vsx_widget_base.cpp:1239)
==2128== by 0x4F54DE: vsx_widget_desktop::draw_2d() (vsx_widget_desktop.cpp:409)
==2128== by 0x4F8E5D: vsxu_draw::draw() (application.cpp:177)
==2128== by 0x4F7C77: app_draw(int) (application.cpp:451)
==2128== by 0x4FAE81: main (main.cpp:318)
==2128== Address 0xada5560 is 80 bytes inside a block of size 112 free'd
==2128== at 0x4C27FF2: operator delete(void*) (vg_replace_malloc.c:387)
==2128== by 0x5C5E29D: vsx_module_param<0, float, 1, 1>::~vsx_module_param() (vsx_param.h:276)
==2128== by 0x5C5CF24: vsx_module_param_list::~vsx_module_param_list() (vsx_param.cpp:139)
==2128== by 0x5C45708: vsx_comp::re_init_in_params() (vsx_comp.cpp:167)
==2128== by 0x5BFF4F1: vsx_engine::redeclare_in_params(vsx_comp*, vsx_command_list*) (vsx_engine.cpp:839)
==2128== by 0x5C0820F: vsx_engine::process_message_queue(vsx_command_list*, vsx_command_list*, bool) (vsx_parameters.h:85)
==2128== by 0x4F8E89: vsxu_draw::draw() (application.cpp:182)
==2128== by 0x4F7C77: app_draw(int) (application.cpp:451)
==2128== by 0x4FAE81: main (main.cpp:318)
==2128==
==2128== Invalid write of size 4
==2128== at 0x5C35F55: vsx_module_param<1, float, 4, 1>::set_internal(float, int) (vsx_param.h:222)
==2128== by 0x5C4D62D: vsx_param_sequence::execute(float) (vsx_param_sequence.cpp:180)
==2128== by 0x5C564FE: vsx_param_sequence_list::run(float, bool) (vsx_param_sequence_list.cpp:236)
==2128== by 0x5BFEE60: vsx_engine::render() (vsx_engine.cpp:765)
==2128== by 0x4A8D73: vsx_window_texture_viewer::draw_2d() (vsx_widget_preview.cpp:117)
==2128== by 0x44F4F1: vsx_widget::draw_children_2d() (vsx_widget_base.h:329)
==2128== by 0x44E050: vsx_widget::draw_2d() (vsx_widget_base.cpp:1239)
==2128== by 0x4F54DE: vsx_widget_desktop::draw_2d() (vsx_widget_desktop.cpp:409)
==2128== by 0x4F8E5D: vsxu_draw::draw() (application.cpp:177)
==2128== by 0x4F7C77: app_draw(int) (application.cpp:451)
==2128== by 0x4FAE81: main (main.cpp:318)
==2128== Address 0x1e7254e0 is 0 bytes inside a block of size 4 free'd
==2128== at 0x4C27C6E: operator delete[](void*) (vg_replace_malloc.c:409)
==2128== by 0x5C5E253: vsx_module_param<0, float, 1, 1>::~vsx_module_param() (vsx_param.h:275)
==2128== by 0x5C5E291: vsx_module_param<0, float, 1, 1>::~vsx_module_param() (vsx_param.h:276)
==2128== by 0x5C5CF24: vsx_module_param_list::~vsx_module_param_list() (vsx_param.cpp:139)
==2128== by 0x5C45708: vsx_comp::re_init_in_params() (vsx_comp.cpp:167)
==2128== by 0x5BFF4F1: vsx_engine::redeclare_in_params(vsx_comp*, vsx_command_list*) (vsx_engine.cpp:839)
==2128== by 0x5C0820F: vsx_engine::process_message_queue(vsx_command_list*, vsx_command_list*, bool) (vsx_parameters.h:85)
==2128== by 0x4F8E89: vsxu_draw::draw() (application.cpp:182)
==2128== by 0x4F7C77: app_draw(int) (application.cpp:451)
==2128== by 0x4FAE81: main (main.cpp:318)