Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[drum-sampler] crash when moving the inpoint #28

Closed
cbsrobot opened this issue Nov 25, 2017 · 3 comments
Closed

[drum-sampler] crash when moving the inpoint #28

cbsrobot opened this issue Nov 25, 2017 · 3 comments
Labels

Comments

@cbsrobot
Copy link
Collaborator

with commit 3573ea3 the sampler crashes when using A ans Q Keys
in the debugger it looks like p2 has no values.

Process 8232 stopped
thread #1: tid = 0x26a16, 0x000000010009a648 otto`void otto::ui::vg::Canvas::plotRounded<std::__1::__wrap_iter<otto::ui::vg::Point const*> >(this=0x00007fff5fbfe4c0, first=__wrap_iter<const otto::ui::vg::Point *> @ 0x00007fff5fbfc6f0, last=__wrap_iter<const otto::ui::vg::Point *> @ 0x00007fff5fbfc6e8, max_radius=2.97855616) + 728 at canvas.hpp:435, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x101400000)
    frame #0: 0x000000010009a648 otto`void otto::ui::vg::Canvas::plotRounded<std::__1::__wrap_iter<otto::ui::vg::Point const*> >(this=0x00007fff5fbfe4c0, first=__wrap_iter<const otto::ui::vg::Point *> @ 0x00007fff5fbfc6f0, last=__wrap_iter<const otto::ui::vg::Point *> @ 0x00007fff5fbfc6e8, max_radius=2.97855616) + 728 at canvas.hpp:435
   432           moveTo(*first);
   433           for (auto [p1, p2] : util::adjacent_pairs(first, last))
   434           {
-> 435             float dx = std::abs(p2.x - p1.x);
   436             float dy = std::abs(p2.y - p1.y);
   437             float r = std::min({dx / 2.f, dy / 2.f, max_radius});
   438             vg::Point md = (p1 + p2) / 2.0;
@cbsrobot cbsrobot changed the title sampler crashes when moving the inpoint [drum-sampler] crash when moving the inpoint Nov 25, 2017
@cbsrobot cbsrobot added the bug label Nov 25, 2017
@topisani
Copy link
Member

topisani commented Dec 9, 2017

fairly certain this is fixed with 5040b5d (currenty only on the engine branch). could you try it out @cbsrobot?

@cbsrobot
Copy link
Collaborator Author

I tried 842a136 and I cannot see the waveform anymore (the pink line), but I can see the red waveform underneath.

after hitting a few times W I get following error:

* thread #1: tid = 0x6f59ac, 0x00000001000961a8 otto`void otto::ui::vg::Canvas::plotLines<std::__1::__wrap_iter<otto::ui::vg::Point const*> >(this=0x00007fff5fbfe638, first=__wrap_iter<const otto::ui::vg::Point *> @ 0x00007fff5fbfc970, last=__wrap_iter<const otto::ui::vg::Point *> @ 0x00007fff5fbfc968) + 440 at canvas.hpp:460, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x11142a000)
    frame #0: 0x00000001000961a8 otto`void otto::ui::vg::Canvas::plotLines<std::__1::__wrap_iter<otto::ui::vg::Point const*> >(this=0x00007fff5fbfe638, first=__wrap_iter<const otto::ui::vg::Point *> @ 0x00007fff5fbfc970, last=__wrap_iter<const otto::ui::vg::Point *> @ 0x00007fff5fbfc968) + 440 at canvas.hpp:460
   457 	      if (first == last) return;
   458
   459 	      moveTo(*first++);
-> 460 	      for (auto p : util::sequence(first, last)) {
   461 	        lineTo(p);
   462 	      }
   463 	    }

and here's the bt:

* thread #1: tid = 0x6f59ac, 0x00000001000961a8 otto`void otto::ui::vg::Canvas::plotLines<std::__1::__wrap_iter<otto::ui::vg::Point const*> >(this=0x00007fff5fbfe638, first=__wrap_iter<const otto::ui::vg::Point *> @ 0x00007fff5fbfc970, last=__wrap_iter<const otto::ui::vg::Point *> @ 0x00007fff5fbfc968) + 440 at canvas.hpp:460, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x11142a000)
  * frame #0: 0x00000001000961a8 otto`void otto::ui::vg::Canvas::plotLines<std::__1::__wrap_iter<otto::ui::vg::Point const*> >(this=0x00007fff5fbfe638, first=__wrap_iter<const otto::ui::vg::Point *> @ 0x00007fff5fbfc970, last=__wrap_iter<const otto::ui::vg::Point *> @ 0x00007fff5fbfc968) + 440 at canvas.hpp:460
    frame #1: 0x0000000100096309 otto`auto otto::engines::DrumSampleScreen::draw(this=0x00007fff5fbfcdb8, ctx=0x00007fff5fbfe638, f=__wrap_iter<const otto::ui::vg::Point *> @ 0x00007fff5fbfca38, l=__wrap_iter<const otto::ui::vg::Point *> @ 0x00007fff5fbfca30)::$_5::operator()() const::'lambda0'(otto::ui::vg::Canvas&, std::__1::__wrap_iter<otto::ui::vg::Point const*>, std::__1::__wrap_iter<otto::ui::vg::Point const*>)::operator()<otto::ui::vg::Canvas, std::__1::__wrap_iter<otto::ui::vg::Point const*>, std::__1::__wrap_iter<otto::ui::vg::Point const*> >(otto::ui::vg::Canvas&, std::__1::__wrap_iter<otto::ui::vg::Point const*>, std::__1::__wrap_iter<otto::ui::vg::Point const*>) const + 57 at drum-sampler.cpp:564
    frame #2: 0x00000001000962c2 otto`_ZNSt3__16invokeIZZN4otto7engines16DrumSampleScreen4drawERNS1_2ui2vg6CanvasEENK3$_5clEvEUlRT_T0_T1_E0_JS7_NS_11__wrap_iterIPKNS5_5PointEEESI_EEENS_9result_ofIFOS9_DpOT0_EE4typeESK_SN_ [inlined] _ZNSt3__18__invokeIZZN4otto7engines16DrumSampleScreen4drawERNS1_2ui2vg6CanvasEENK3$_5clEvEUlRT_T0_T1_E0_JS7_NS_11__wrap_iterIPKNS5_5PointEEESI_EEEDTclclsr3std3__1E7forwardIS9_Efp_Espclsr3std3__1E7forwardIT0_Efp0_EEEOS9_DpOSJ_(__f=0x00007fff5fbfcdb8, __args=0x00007fff5fbfe638, __args=0x00007fff5fbfcb88, __args=0x00007fff5fbfcb70) + 178 at type_traits:4323
    frame #3: 0x0000000100096277 otto`_ZNSt3__16invokeIZZN4otto7engines16DrumSampleScreen4drawERNS1_2ui2vg6CanvasEENK3$_5clEvEUlRT_T0_T1_E0_JS7_NS_11__wrap_iterIPKNS5_5PointEEESI_EEENS_9result_ofIFOS9_DpOT0_EE4typeESK_SN_(__f=0x00007fff5fbfcdb8, __args=0x00007fff5fbfe638, __args=0x00007fff5fbfcb88, __args=0x00007fff5fbfcb70) + 103 at functional:2361
    frame #4: 0x0000000100095ee6 otto`_ZN4otto2ui7widgets8WaveformINS_4util9dyn_arrayIfEEE10draw_rangeIZZNS_7engines16DrumSampleScreen4drawERNS0_2vg6CanvasEENK3$_5clEvEUlRT_T0_T1_E0_EEvSC_NS3_5audio7SectionIiEEOSE_(this=0x0000000100709370, ctx=0x00007fff5fbfe638, subrange=(in = 3200, out = 0), p=0x00007fff5fbfcdb8) + 1286 at waveform_widget.hpp:191
    frame #5: 0x00000001000957db otto`otto::engines::DrumSampleScreen::draw(this=0x000000010071b7f8)::$_5::operator()() const + 235 at drum-sampler.cpp:562
    frame #6: 0x00000001000956dd otto`void std::__1::__invoke_void_return_wrapper<void>::__call<otto::engines::DrumSampleScreen::draw(otto::ui::vg::Canvas&)::$_5&>(otto::engines::DrumSampleScreen::draw(otto::ui::vg::Canvas&)::$_5&&&) [inlined] decltype(__f=0x000000010071b7f8)::$_5&>(fp)(std::__1::forward<>(fp0))) std::__1::__invoke<otto::engines::DrumSampleScreen::draw(otto::ui::vg::Canvas&)::$_5&>(otto::engines::DrumSampleScreen::draw(otto::ui::vg::Canvas&)::$_5&&&) + 45 at type_traits:4323
    frame #7: 0x00000001000956cc otto`void std::__1::__invoke_void_return_wrapper<void>::__call<otto::engines::DrumSampleScreen::draw(__args=0x000000010071b7f8)::$_5&>(otto::engines::DrumSampleScreen::draw(otto::ui::vg::Canvas&)::$_5&&&) + 28 at __functional_base:349
    frame #8: 0x0000000100095559 otto`std::__1::__function::__func<otto::engines::DrumSampleScreen::draw(otto::ui::vg::Canvas&)::$_5, std::__1::allocator<otto::engines::DrumSampleScreen::draw(otto::ui::vg::Canvas&)::$_5>, void ()>::operator(this=0x000000010071b7f0)() + 41 at functional:1562
    frame #9: 0x0000000100042b4b otto`std::__1::function<void ()>::operator(this=0x00007fff5fbfd2d0)() const + 123 at functional:1924
    frame #10: 0x00000001000880fb otto`otto::ui::vg::Canvas::callAt(this=0x00007fff5fbfe638, p=(x = 22.2000008, y = 197.899994), f=0x00007fff5fbfd2d0)> const&) + 75 at canvas.hpp:384
    frame #11: 0x00000001000856e1 otto`otto::engines::DrumSampleScreen::draw(this=0x0000000100709360, ctx=0x00007fff5fbfe638) + 1825 at drum-sampler.cpp:553
    frame #12: 0x000000010007e87c otto`otto::ui::impl::draw_frame(ctx=0x00007fff5fbfe638) + 108 at mainui.cpp:58
    frame #13: 0x0000000100076388 otto`otto::ui::main_ui_loop() + 1832 at glfw-impl.cpp:744
    frame #14: 0x00000001000058e5 otto`main(argc=1, argv=0x00007fff5fbff5b0) + 725 at main.cpp:52
    frame #15: 0x00007fff9bf945ad libdyld.dylib`start + 1

@topisani
Copy link
Member

sampler has been removed - see #66

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants