momentarylapse / tsunami

A simple but powerful audio editor
GNU General Public License v3.0
77 stars 6 forks source link

Crash on adding any synth. #4

Closed KottV closed 3 years ago

KottV commented 3 years ago

Hi!

I've tried to play some midi, but tsunami crashes: Add midi track Open track prefs Select the synth -> replace->choose any not Dummy

openSUSE TW, gtk 3.24.27 here is the backtrace:


Thread 1 "tsunami" received signal SIGSEGV, Segmentation fault.
gtk_css_gadget_set_state (state=GTK_STATE_FLAG_DIR_LTR, gadget=0x0) at gtkcssgadget.c:413
Downloading source file /usr/src/debug/gtk3-3.24.27-1.1.x86_64/gtk/gtkcssgadget.c...
413       gtk_css_node_set_state (priv->node, state);
(gdb) bt
#0  gtk_css_gadget_set_state (state=GTK_STATE_FLAG_DIR_LTR, gadget=0x0) at gtkcssgadget.c:413
#1  gtk_switch_state_flags_changed (widget=0x266c880 [GtkSwitch], previous_state_flags=(GTK_STATE_FLAG_BACKDROP | GTK_STATE_FLAG_DIR_LTR)) at gtkswitch.c:633
#2  0x00007ffff715590c in g_cclosure_marshal_VOID__UINTv (closure=<optimized out>, return_value=<optimized out>, instance=<optimized out>, args=<optimized out>, marshal_data=<optimized out>, n_params=<optimized out>, param_types=0xc178a0) at ../gobject/gmarshal.c:704
#3  0x00007ffff71532ee in _g_closure_invoke_va (closure=closure@entry=0xc19730, return_value=return_value@entry=0x0, instance=instance@entry=0x266c880, args=args@entry=0x7fffffffccf0, n_params=1, param_types=0xc178a0) at ../gobject/gclosure.c:873
#4  0x00007ffff716bac9 in g_signal_emit_valist (instance=0x266c880, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7fffffffccf0) at ../gobject/gsignal.c:3404
#5  0x00007ffff716c03f in g_signal_emit (instance=instance@entry=0x266c880, signal_id=<optimized out>, detail=detail@entry=0) at ../gobject/gsignal.c:3551
#6  0x00007ffff7af418b in gtk_widget_propagate_state (widget=0x266c880 [GtkSwitch], data=0x7fffffffce4c) at gtkwidget.c:12932
#7  0x00007ffff7af4577 in gtk_widget_update_state_flags (widget=0x266c880 [GtkSwitch], flags_to_set=<optimized out>, flags_to_unset=<optimized out>) at gtkwidget.c:8872
#8  0x00007ffff7aea023 in gtk_widget_unparent (widget=0x266c880 [GtkSwitch]) at gtkwidget.c:4703
#9  0x00007ffff7959930 in gtk_grid_remove (container=0x23792b0 [GtkGrid], child=<optimized out>) at gtkgrid.c:509
#10 0x00007ffff715664d in g_cclosure_marshal_VOID__OBJECTv (closure=0xc3b760, return_value=<optimized out>, instance=<optimized out>, args=<optimized out>, marshal_data=<optimized out>, n_params=<optimized out>, param_types=0xc3b790) at ../gobject/gmarshal.c:1910
#11 0x00007ffff71532ee in _g_closure_invoke_va (closure=closure@entry=0xc3b760, return_value=return_value@entry=0x0, instance=instance@entry=0x23792b0, args=args@entry=0x7fffffffd130, n_params=1, param_types=0xc3b790) at ../gobject/gclosure.c:873
#12 0x00007ffff716bac9 in g_signal_emit_valist (instance=0x23792b0, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7fffffffd130) at ../gobject/gsignal.c:3404
#13 0x00007ffff716c03f in g_signal_emit (instance=instance@entry=0x23792b0, signal_id=<optimized out>, detail=detail@entry=0) at ../gobject/gsignal.c:3551
#14 0x00007ffff78c511d in gtk_container_remove (container=0x23792b0 [GtkGrid], widget=0x266c880 [GtkSwitch]) at gtkcontainer.c:1906
#15 0x00007ffff7af3534 in gtk_widget_dispose (object=0x266c880 [GtkSwitch]) at gtkwidget.c:12151
#16 0x00007ffff715972e in g_object_run_dispose (object=0x266c880 [GtkSwitch]) at ../gobject/gobject.c:1226
#17 0x00007ffff7ae35e9 in gtk_widget_destroy (widget=<optimized out>) at gtkwidget.c:4776
#18 0x00000000004b0ac9 in hui::Control::~Control() (this=0x2597b60, __in_chrg=<optimized out>) at lib/hui/Controls/Control.cpp:102
#19 0x00000000004b3e99 in hui::ControlCheckBox::~ControlCheckBox() (this=0x2597b60, __in_chrg=<optimized out>) at lib/hui/Controls/ControlCheckBox.h:17
#20 hui::ControlCheckBox::~ControlCheckBox() (this=0x2597b60, __in_chrg=<optimized out>) at lib/hui/Controls/ControlCheckBox.h:17
#21 0x00000000004b0afa in hui::Control::~Control() (this=0x25f0740, __in_chrg=<optimized out>) at lib/hui/Controls/Control.cpp:95
#22 0x00000000004b77d9 in hui::ControlGrid::~ControlGrid() (this=0x25f0740, __in_chrg=<optimized out>) at lib/hui/Controls/ControlGrid.h:16
#23 hui::ControlGrid::~ControlGrid() (this=0x25f0740, __in_chrg=<optimized out>) at lib/hui/Controls/ControlGrid.h:16
#24 0x00000000004b0afa in hui::Control::~Control() (this=0x246f580, __in_chrg=<optimized out>) at lib/hui/Controls/Control.cpp:95
#25 0x00000000004b77d9 in hui::ControlGrid::~ControlGrid() (this=0x246f580, __in_chrg=<optimized out>) at lib/hui/Controls/ControlGrid.h:16
#26 hui::ControlGrid::~ControlGrid() (this=0x246f580, __in_chrg=<optimized out>) at lib/hui/Controls/ControlGrid.h:16
#27 0x00000000004cf0d0 in hui::Panel::_ClearPanel_() (this=this@entry=0x2675c40) at lib/hui/Panel.cpp:74
#28 0x00000000004cf13c in hui::Panel::~Panel() (this=0x2675c40, __in_chrg=<optimized out>) at lib/hui/Panel.cpp:35
#29 0x0000000000682212 in ModulePanel::~ModulePanel() (this=0x2675c40, __in_chrg=<optimized out>) at View/Helper/ModulePanel.cpp:95
#30 0x00000000006b5382 in TrackConsole::load_data() (this=0x142dc00) at View/SideBar/TrackConsole.cpp:91
#31 0x0000000000637867 in std::function<void ()>::operator()() const (this=0x2597e60) at /usr/include/c++/10/bits/std_function.h:622
#32 ObservableData::notify_send() (this=0x2313a78) at Stuff/Observable.cpp:171
#33 0x000000000046f866 in Observable<VirtualBase>::notify(string const&) const (message=<optimized out>, this=<optimized out>) at Action/Track/Synthesizer/../../../Data/../Stuff/Observable.h:79
#34 ActionTrackSetSynthesizer::execute(Data*) (this=0x26e6fe0, d=<optimized out>) at Action/Track/Synthesizer/ActionTrackSetSynthesizer.cpp:26
#35 0x0000000000471a2d in ActionManager::execute(Action*) (this=0xa48070, a=0x26e6fe0) at Action/ActionManager.cpp:90
#36 0x000000000049339f in Track::set_synthesizer(Synthesizer*) (this=0x2313a70, _synth=0x2691800) at Data/Track.cpp:253
#37 0x00000000006b4069 in operator() (__closure=0x23d11b0) at View/SideBar/TrackConsole.cpp:35
#38 std::__invoke_impl<void, create_synth_panel(Track*, Session*, hui::Window*)::<lambda()>&> (__f=...) at /usr/include/c++/10/bits/invoke.h:60
#39 std::__invoke_r<void, create_synth_panel(Track*, Session*, hui::Window*)::<lambda()>&> (__fn=...) at /usr/include/c++/10/bits/invoke.h:153
#40 std::_Function_handler<void(), create_synth_panel(Track*, Session*, hui::Window*)::<lambda()> >::_M_invoke(const std::_Any_data &) (__functor=<optimized out>) at /usr/include/c++/10/bits/std_function.h:291
#41 0x00000000004c1666 in std::function<void ()>::operator()() const (this=0x26f21a0) at /usr/include/c++/10/bits/std_function.h:248
#42 hui::GtkRunLaterFunction(void*) (data=data@entry=0x26f21a0) at lib/hui/Callback.cpp:90
#43 0x00007ffff7061abd in g_timeout_dispatch (source=source@entry=0x2246c10, callback=0x4c1650 <hui::GtkRunLaterFunction(void*)>, user_data=0x26f21a0) at ../glib/gmain.c:4877
#44 0x00007ffff7060f57 in g_main_dispatch (context=0x8b2230) at ../glib/gmain.c:3325
#45 g_main_context_dispatch (context=0x8b2230) at ../glib/gmain.c:4043
#46 0x00007ffff70612d8 in g_main_context_iterate (context=0x8b2230, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4119
#47 0x00007ffff70615cb in g_main_loop_run (loop=loop@entry=0xa20a80) at ../glib/gmain.c:4317
#48 0x00007ffff799b08d in gtk_main () at gtkmain.c:1329
#49 0x00000000004c0432 in hui::Application::run() (this=this@entry=0x807240) at lib/hui/Application.cpp:150
#50 0x00000000006d6958 in hui_main(Array<string> const&) (arg=...) at Tsunami.cpp:298
#51 0x0000000000456bc1 in main(int, char**) (NumArgs=<optimized out>, Args=<optimized out>) at lib/hui/hui.cpp:126```
momentarylapse commented 3 years ago

Hi and thanks a lot for trying out the program and the feedback! from the trace, I suspect the problem is with me using a gtk component the wrong way. Have been trying to find that bug for some time now.... For now, there is a cheap fix: find the file config.txt (if you installed it, it will use ~/.tsunami/config.txt, otherwise in your repository's main folder). Edit the file and add the line hui.prevent-checkbox-switch = true please keep me updated if that helps

KottV commented 3 years ago

Yes, it worked. Thanks, should I close the issue or better keep it?

KottV commented 3 years ago

ohhh, then it crashed when I've tried to record the midi form my keys

momentarylapse commented 3 years ago

Thanks again! I just fixed it (devel branch) Yes, that was a stupid bug sneaking in when I recently overhauled the recording system and was too lazy to check if midi recording still works...

Should work now. But I just noticed that since a recent update, recorded notes don't really show their duration in the GUI anymore. Might also fix that soon. (I'll also keep the issue open until the gtk bug is properly killed)

KottV commented 3 years ago

Ok)

it sounds now)

momentarylapse commented 3 years ago

I fixed the gtk issue a while ago (devel branch) and didn't encounter any related crashes since then. The hui.prevent-checkbox-switch = true line in the config.txt file can now be removed (imho: switches look better in some places).