contour-terminal / contour

Modern C++ Terminal Emulator
http://contour-terminal.org/
Apache License 2.0
2.39k stars 101 forks source link

assert in TextRenderer::GlyphMetrics #245

Open dankamongmen opened 3 years ago

dankamongmen commented 3 years ago

What steps did you take and what happened: I was running notcurses-demo from the tip of master on contour, likewise from the tip of master. It (contour) regularly blows up in the mojibake demo. I've got backtraces and even a video for you.

What did you expect to happen: Peace on earth and good will towards men, or at least fewer SIGABRTs

Anything else you would like to add: Happy to test.

Environment:

https://user-images.githubusercontent.com/143473/123020895-0c085480-d3a1-11eb-8d41-44cdfe4c2472.mp4

i'll get you actual text in a minute

christianparpart commented 3 years ago

Oh wow. I'd love to get that happening on my machine so I can repo+fix it. I'll digg into that. Many thanks! (3 beer already, I think I'll get you drunk with that :) )

christianparpart commented 3 years ago

Anything else you would like to add: Happy to test.

Hey @dankamongmen I'm currently trying to repro that. But even inside valgrind I cannot get anything breaking (so far). Would you mind giving me some more hint? (I'm also on your master branch). I keep it running until the end and hope it'll happen, but we'll see :)

dankamongmen commented 3 years ago

ja i shall be doing this, it is gut/goot

dankamongmen commented 3 years ago

this is not the same issue, but it doesn't look good:

==2131378== Warning: noted but unhandled ioctl 0x5441 with no size/direction hints.
==2131378==    This could cause spurious value errors to appear.
==2131378==    See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper.
==2131378== Warning: unimplemented fcntl command: 1033
==2131378== Syscall param writev(vector[...]) points to uninitialised byte(s)
==2131378==    at 0x636DDDD: __writev (writev.c:26)
==2131378==    by 0x636DDDD: writev (writev.c:24)
==2131378==    by 0x660CFB8: ??? (in /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0)
==2131378==    by 0x660D790: ??? (in /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0)
==2131378==    by 0x660E2DB: xcb_flush (in /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0)
==2131378==    by 0x98ACD05: ??? (in /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5.15.2)
==2131378==    by 0x4DCE110: QWindowPrivate::applyCursor() (in /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.15.2)
==2131378==    by 0x4DD25E6: QWindowPrivate::setCursor(QCursor const*) (in /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.15.2)
==2131378==    by 0x5A54290: ??? (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.2)
==2131378==    by 0x5A2ADFC: ??? (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.2)
==2131378==    by 0x5A7C6F3: ??? (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.2)
==2131378==    by 0x5A803C1: ??? (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.2)
==2131378==    by 0x5A2515E: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.2)
==2131378==  Address 0x925f8be is 4,590 bytes inside a block of size 21,168 alloc'd
==2131378==    at 0x483AB65: calloc (vg_replace_malloc.c:760)
==2131378==    by 0x660C980: xcb_connect_to_fd (in /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0)
==2131378==    by 0x661116A: xcb_connect_to_display_with_auth_info (in /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0)
==2131378==    by 0x6500131: _XConnectXCB (in /usr/lib/x86_64-linux-gnu/libX11.so.6.4.0)
==2131378==    by 0x64F0964: XOpenDisplay (in /usr/lib/x86_64-linux-gnu/libX11.so.6.4.0)
==2131378==    by 0x98B3156: QXcbBasicConnection::QXcbBasicConnection(char const*) (in /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5.15.2)
==2131378==    by 0x988F1C1: QXcbConnection::QXcbConnection(QXcbNativeInterface*, bool, unsigned int, char const*) (in /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5.15.2)
==2131378==    by 0x9892112: QXcbIntegration::QXcbIntegration(QStringList const&, int&, char**) (in /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5.15.2)
==2131378==    by 0x488E46E: ??? (in /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so)
==2131378==    by 0x4DBC8FB: QGuiApplicationPrivate::createPlatformIntegration() (in /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.15.2)
==2131378==    by 0x4DBDD4F: QGuiApplicationPrivate::createEventDispatcher() (in /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.15.2)
==2131378==    by 0x55FFA55: QCoreApplicationPrivate::init() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.2)
==2131378== 

it came when i SIGKILLed a running notcurses-demo

dankamongmen commented 3 years ago

a bunch of this at contour exit


==2131378== Warning: invalid file descriptor -1 in syscall write()
==2131378== Warning: invalid file descriptor -1 in syscall write()
==2131378== Warning: invalid file descriptor -1 in syscall write()
==2131378== Warning: invalid file descriptor -1 in syscall write()
==2131378== Warning: invalid file descriptor -1 in syscall write()
==2131378== Warning: invalid file descriptor -1 in syscall write()
==2131378== Warning: invalid file descriptor -1 in syscall write()
dankamongmen commented 3 years ago

Ewige Blumenkraft und ewige Schlangenkraf

Starting program: /usr/local/bin/contour 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff2a1f700 (LWP 2141266)]
[New Thread 0x7ffff0e34700 (LWP 2141267)]
[New Thread 0x7fffebfff700 (LWP 2141268)]
[Detaching after fork from child process 2141269]
[New Thread 0x7fffeb7fe700 (LWP 2141270)]
[New Thread 0x7fffea1da700 (LWP 2141365)]
contour: ../src/terminal_renderer/Atlas.h:345: std::optional<std::tuple<std::reference_wrapper<const terminal::renderer::atlas::TextureInfo>, std::reference_wrapper<const Metadata> > > terminal::renderer::atlas::MetadataTextureAtlas<Key, Metadata>::insert(const Key&, crispy::Size, crispy::Size, terminal::renderer::atlas::Buffer&&, int, Metadata) [with Key = text::glyph_key; Metadata = terminal::renderer::TextRenderer::GlyphMetrics; terminal::renderer::atlas::Buffer = std::vector<unsigned char>]: Assertion `allocations_.find(_id) == allocations_.end()' failed.

Thread 1 "contour" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50  ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
=> 0x00007ffff640ece1 <__GI_raise+321>: 48 8b 84 24 08 01 00 00 mov    rax,QWORD PTR [rsp+0x108]
   0x00007ffff640ece9 <__GI_raise+329>: 64 48 2b 04 25 28 00 00 00  sub    rax,QWORD PTR fs:0x28
   0x00007ffff640ecf2 <__GI_raise+338>: 75 20   jne    0x7ffff640ed14 <__GI_raise+372>
   0x00007ffff640ecf4 <__GI_raise+340>: 44 89 c0    mov    eax,r8d
   0x00007ffff640ecf7 <__GI_raise+343>: 48 81 c4 18 01 00 00    add    rsp,0x118
   0x00007ffff640ecfe <__GI_raise+350>: c3  ret    
   0x00007ffff640ecff <__GI_raise+351>: 90  nop
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff63f8537 in __GI_abort () at abort.c:79
#2  0x00007ffff63f840f in __assert_fail_base (fmt=0x7ffff6561128 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55555579f4e8 "allocations_.find(_id) == allocations_.end()", file=0x55555579f4c0 "../src/terminal_renderer/Atlas.h", line=345, function=<optimized out>) at assert.c:92
#3  0x00007ffff6407662 in __GI___assert_fail (assertion=0x55555579f4e8 "allocations_.find(_id) == allocations_.end()", file=0x55555579f4c0 "../src/terminal_renderer/Atlas.h", line=345, function=0x55555579f2f8 "std::optional<std::tuple<std::reference_wrapper<const terminal::renderer::atlas::TextureInfo>, std::reference_wrapper<const Metadata> > > terminal::renderer::atlas::MetadataTextureAtlas<Key, Metadata>"...) at assert.c:101
#4  0x000055555571ff82 in terminal::renderer::atlas::MetadataTextureAtlas<text::glyph_key, terminal::renderer::TextRenderer::GlyphMetrics>::insert(text::glyph_key const&, crispy::Size, crispy::Size, std::vector<unsigned char, std::allocator<unsigned char> >&&, int, terminal::renderer::TextRenderer::GlyphMetrics) (this=0x55555645ea70, _id=..., _bitmapSize=..., _targetSize=..., _data=..., _user=1, _metadata=...) at ../src/terminal_renderer/Atlas.h:345
#5  0x000055555571b943 in terminal::renderer::TextRenderer::getTextureInfo(text::glyph_key const&) (this=0x555555ca6010, _id=...) at ../src/terminal_renderer/TextRenderer.cpp:357
#6  0x000055555571aac5 in terminal::renderer::TextRenderer::renderRun(crispy::Point, crispy::span<text::glyph_position const>, terminal::RGBColor) (this=0x555555ca6010, _pos=..., _glyphPositions=..., _color=...) at ../src/terminal_renderer/TextRenderer.cpp:174
#7  0x000055555572cfee in std::__invoke_impl<void, void (terminal::renderer::TextRenderer::*&)(crispy::Point, crispy::span<text::glyph_position const>, terminal::RGBColor), terminal::renderer::TextRenderer*&, crispy::Point, crispy::span<text::glyph_position const>, terminal::RGBColor>(std::__invoke_memfun_deref, void (terminal::renderer::TextRenderer::*&)(crispy::Point, crispy::span<text::glyph_position const>, terminal::RGBColor), terminal::renderer::TextRenderer*&, crispy::Point&&, crispy::span<text::glyph_position const>&&, terminal::RGBColor&&) (__f=@0x555555b6acf0: (void (terminal::renderer::TextRenderer::*)(class terminal::renderer::TextRenderer * const, struct crispy::Point, class crispy::span<text::glyph_position const>, struct terminal::RGBColor)) 0x55555571aa38 <terminal::renderer::TextRenderer::renderRun(crispy::Point, crispy::span<text::glyph_position const>, terminal::RGBColor)>, __t=@0x555555b6ad00: 0x555555ca6010) at /usr/include/c++/10/bits/invoke.h:73
#8  0x000055555572c57b in std::__invoke<void (terminal::renderer::TextRenderer::*&)(crispy::Point, crispy::span<text::glyph_position const>, terminal::RGBColor), terminal::renderer::TextRenderer*&, crispy::Point, crispy::span<text::glyph_position const>, terminal::RGBColor>(void (terminal::renderer::TextRenderer::*&)(crispy::Point, crispy::span<text::glyph_position const>, terminal::RGBColor), terminal::renderer::TextRenderer*&, crispy::Point&&, crispy::span<text::glyph_position const>&&, terminal::RGBColor&&) (__fn=@0x555555b6acf0: (void (terminal::renderer::TextRenderer::*)(class terminal::renderer::TextRenderer * const, struct crispy::Point, class crispy::span<text::glyph_position const>, struct terminal::RGBColor)) 0x55555571aa38 <terminal::renderer::TextRenderer::renderRun(crispy::Point, crispy::span<text::glyph_position const>, terminal::RGBColor)>) at /usr/include/c++/10/bits/invoke.h:95
#9  0x000055555572b536 in std::_Bind<void (terminal::renderer::TextRenderer::*(terminal::renderer::TextRenderer*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(crispy::Point, crispy::span<text::glyph_position const>, terminal::RGBColor)>::__call<void, crispy::Point&&, crispy::span<text::glyph_position const>&&, terminal::RGBColor&&, 0ul, 1ul, 2ul, 3ul>(std::tuple<crispy::Point&&, crispy::span<text::glyph_position const>&&, terminal::RGBColor&&>&&, std::_Index_tuple<0ul, 1ul, 2ul, 3ul>) (this=0x555555b6acf0, __args=...) at /usr/include/c++/10/functional:416
#10 0x000055555572a08b in std::_Bind<void (terminal::renderer::TextRenderer::*(terminal::renderer::TextRenderer*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(crispy::Point, crispy::span<text::glyph_position const>, terminal::RGBColor)>::operator()<crispy::Point, crispy::span<text::glyph_position const>, terminal::RGBColor, void>(crispy::Point&&, crispy::span<text::glyph_position const>&&, terminal::RGBColor&&) (this=0x555555b6acf0) at /usr/include/c++/10/functional:499
#11 0x0000555555728837 in std::__invoke_impl<void, std::_Bind<void (terminal::renderer::TextRenderer::*(terminal::renderer::TextRenderer*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(crispy::Point, crispy::span<text::glyph_position const>, terminal::RGBColor)>&, crispy::Point, crispy::span<text::glyph_position const>, terminal::RGBColor>(std::__invoke_other, std::_Bind<void (terminal::renderer::TextRenderer::*(terminal::renderer::TextRenderer*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(crispy::Point, crispy::span<text::glyph_position const>, terminal::RGBColor)>&, crispy::Point&&, crispy::span<text::glyph_position const>&&, terminal::RGBColor&&) (__f=...) at /usr/include/c++/10/bits/invoke.h:60
#12 0x00005555557265ca in std::__invoke_r<void, std::_Bind<void (terminal::renderer::TextRenderer::*(terminal::renderer::TextRenderer*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(crispy::Point, crispy::span<text::glyph_position const>, terminal::RGBColor)>&, crispy::Point, crispy::span<text::glyph_position const>, terminal::RGBColor>(std::_Bind<void (terminal::renderer::TextRenderer::*(terminal::renderer::TextRenderer*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(crispy::Point, crispy::span<text::glyph_position const>, terminal::RGBColor)>&, crispy::Point&&, crispy::span<text::glyph_position const>&&, terminal::RGBColor&&) (__fn=...) at /usr/include/c++/10/bits/invoke.h:110
#13 0x00005555557240bc in std::_Function_handler<void (crispy::Point, crispy::span<text::glyph_position const>, terminal::RGBColor), std::_Bind<void (terminal::renderer::TextRenderer::*(terminal::renderer::TextRenderer*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(crispy::Point, crispy::span<text::glyph_position const>, terminal::RGBColor)> >::_M_invoke(std::_Any_data const&, crispy::Point&&, crispy::span<text::glyph_position const>&&, terminal::RGBColor&&) (__functor=..., __args#0=..., __args#1=..., __args#2=...) at /usr/include/c++/10/bits/std_function.h:291
#14 0x0000555555720736 in std::function<void (crispy::Point, crispy::span<text::glyph_position const>, terminal::RGBColor)>::operator()(crispy::Point, crispy::span<text::glyph_position const>, terminal::RGBColor) const (this=0x555555cbd8b0, __args#0=..., __args#1=..., __args#2=...) at /usr/include/c++/10/bits/std_function.h:622
#15 0x000055555571c3e0 in terminal::renderer::ComplexTextShaper::endSequence() (this=0x555555cbd890) at ../src/terminal_renderer/TextRenderer.cpp:507
#16 0x000055555571c1cf in terminal::renderer::ComplexTextShaper::appendCell(crispy::span<char32_t const>, terminal::renderer::TextStyle, terminal::RGBColor) (this=0x555555cbd890, _codepoints=..., _style=terminal::renderer::TextStyle::Regular, _color=...) at ../src/terminal_renderer/TextRenderer.cpp:468
#17 0x000055555571a996 in terminal::renderer::TextRenderer::renderCell(terminal::RenderCell const&) (this=0x555555ca6010, _cell=...) at ../src/terminal_renderer/TextRenderer.cpp:149
#18 0x000055555571850e in terminal::renderer::Renderer::renderCells(std::vector<terminal::RenderCell, std::allocator<terminal::RenderCell> > const&) (this=0x555555ca5d50, _renderableCells=std::vector of length 3866, capacity 4096 = {...}) at ../src/terminal_renderer/Renderer.cpp:258
#19 0x000055555571823d in terminal::renderer::Renderer::render(terminal::Terminal&, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, bool) (this=0x555555ca5d50, _terminal=..., _now=..., _pressure=false) at ../src/terminal_renderer/Renderer.cpp:208
#20 0x00005555556e5cfe in terminal::view::TerminalView::render(std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&, bool) (this=0x555555ca4ec0, _now=..., _pressure=false) at ../src/terminal_view/TerminalView.cpp:187
#21 0x000055555560d6e9 in contour::TerminalWidget::paintGL() (this=0x555555b4d800) at ../src/contour/TerminalWidget.cpp:647
#22 0x00007ffff6a85c5d in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x00007ffff6a67fae in QWidget::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#24 0x000055555560f7f0 in contour::TerminalWidget::event(QEvent*) (this=0x555555b4d800, _event=0x7fffffffc4b0) at ../src/contour/TerminalWidget.cpp:995
#25 0x00007ffff6a2815f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#26 0x00007ffff7228fca in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#27 0x00007ffff6a60116 in QWidgetPrivate::sendPaintEvent(QRegion const&) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#28 0x00007ffff6a38ba8 in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#29 0x00007ffff6a686d7 in QWidget::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#30 0x000055555562a79f in contour::TerminalWindow::event(QEvent*) (this=0x555555a87400, _event=0x7fffd8008ca0) at ../src/contour/TerminalWindow.cpp:269
#31 0x00007ffff6a2815f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#32 0x00007ffff7228fca in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#33 0x00007ffff722ba01 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#34 0x00007ffff7280e93 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#35 0x00007ffff5f05e6b in g_main_dispatch (context=0x7fffec005000) at ../../../glib/gmain.c:3325
#36 g_main_context_dispatch (context=0x7fffec005000) at ../../../glib/gmain.c:4043
#37 0x00007ffff5f06118 in g_main_context_iterate (context=context@entry=0x7fffec005000, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../glib/gmain.c:4119
#38 0x00007ffff5f061cf in g_main_context_iteration (context=0x7fffec005000, may_block=1) at ../../../glib/gmain.c:4184
#39 0x00007ffff728051f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#40 0x00007ffff722798b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#41 0x00007ffff722fc00 in QCoreApplication::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#42 0x0000555555600a0b in contour::terminalGUI(int, char const**, crispy::cli::FlagStore const&) (argc=1, argv=0x7fffffffdf38, _flags=...) at ../src/contour/ContourGuiApp.cpp:188
#43 0x0000555555600dce in contour::ContourGuiApp::terminalGuiAction() (this=0x7fffffffdc90) at ../src/contour/ContourGuiApp.cpp:199
#44 0x0000555555606c7d in std::__invoke_impl<int, int (contour::ContourGuiApp::*&)(), contour::ContourGuiApp*&>(std::__invoke_memfun_deref, int (contour::ContourGuiApp::*&)(), contour::ContourGuiApp*&) (__f=@0x55555592aa00: (int (contour::ContourGuiApp::*)(class contour::ContourGuiApp * const)) 0x555555600d94 <contour::ContourGuiApp::terminalGuiAction()>, __t=@0x55555592aa10: 0x7fffffffdc90) at /usr/include/c++/10/bits/invoke.h:73
#45 0x0000555555606789 in std::__invoke<int (contour::ContourGuiApp::*&)(), contour::ContourGuiApp*&>(int (contour::ContourGuiApp::*&)(), contour::ContourGuiApp*&) (__fn=@0x55555592aa00: (int (contour::ContourGuiApp::*)(class contour::ContourGuiApp * const)) 0x555555600d94 <contour::ContourGuiApp::terminalGuiAction()>) at /usr/include/c++/10/bits/invoke.h:95
#46 0x0000555555605d60 in std::_Bind<int (contour::ContourGuiApp::*(contour::ContourGuiApp*))()>::__call<int, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) (this=0x55555592aa00, __args=...) at /usr/include/c++/10/functional:416
#47 0x000055555560584a in std::_Bind<int (contour::ContourGuiApp::*(contour::ContourGuiApp*))()>::operator()<, int>() (this=0x55555592aa00) at /usr/include/c++/10/functional:499
#48 0x0000555555604bec in std::__invoke_impl<int, std::_Bind<int (contour::ContourGuiApp::*(contour::ContourGuiApp*))()>&>(std::__invoke_other, std::_Bind<int (contour::ContourGuiApp::*(contour::ContourGuiApp*))()>&) (__f=...) at /usr/include/c++/10/bits/invoke.h:60
#49 0x0000555555603d9e in std::__invoke_r<int, std::_Bind<int (contour::ContourGuiApp::*(contour::ContourGuiApp*))()>&>(std::_Bind<int (contour::ContourGuiApp::*(contour::ContourGuiApp*))()>&) (__fn=...) at /usr/include/c++/10/bits/invoke.h:113
#50 0x0000555555602bc1 in std::_Function_handler<int (), std::_Bind<int (contour::ContourGuiApp::*(contour::ContourGuiApp*))()> >::_M_invoke(std::_Any_data const&) (__functor=...) at /usr/include/c++/10/bits/std_function.h:291
#51 0x0000555555733bca in std::function<int ()>::operator()() const (this=0x55555592aa80) at /usr/include/c++/10/bits/std_function.h:622
#52 0x00005555557312af in crispy::App::run(int, char const**) (this=0x7fffffffdc90, argc=1, argv=0x7fffffffdf38) at ../src/crispy/App.cpp:177
#53 0x00005555555ff7da in contour::ContourGuiApp::run(int, char const**) (this=0x7fffffffdc90, argc=1, argv=0x7fffffffdf38) at ../src/contour/ContourGuiApp.cpp:52
#54 0x00005555555a93ca in main(int, char const**) (argc=1, argv=0x7fffffffdf38) at ../src/contour/main.cpp:24
(gdb) 
christianparpart commented 3 years ago

I am instantly interested in your GPU identification. Maybe I'm not running into it because my GPU can reach the stars. I'll try to mimmick lower end hardwär. thanks for the input!

dankamongmen commented 3 years ago

I am instantly interested in your GPU identification. Maybe I'm not running into it because my GPU can reach the stars. I'll try to mimmick lower end hardwär. thanks for the input!

i mean, it's an RTX 2070 Super. i literally have no idea, but isn't that still pretty decent? i definitely write CUDA HPC all day long with it, and get pretty decent numbers.

dankamongmen commented 3 years ago
[schwarzgerat](0) $ nvidia-smi -a

==============NVSMI LOG==============

Timestamp                                 : Thu Jun 24 10:35:10 2021
Driver Version                            : 465.31
CUDA Version                              : 11.3

Attached GPUs                             : 1
GPU 00000000:21:00.0
    Product Name                          : NVIDIA GeForce RTX 2070 SUPER
    Product Brand                         : GeForce
    Display Mode                          : Enabled
    Display Active                        : Enabled
    Persistence Mode                      : Enabled
    MIG Mode
        Current                           : N/A
        Pending                           : N/A
    Accounting Mode                       : Disabled
    Accounting Mode Buffer Size           : 4000
    Driver Model
        Current                           : N/A
        Pending                           : N/A
    Serial Number                         : N/A
    GPU UUID                              : GPU-6d1baf9a-bb03-d688-a03c-d81a97affd83
    Minor Number                          : 0
    VBIOS Version                         : 90.04.76.00.AD
    MultiGPU Board                        : No
    Board ID                              : 0x2100
    GPU Part Number                       : N/A
    Inforom Version
        Image Version                     : G001.0000.02.04
        OEM Object                        : 1.1
        ECC Object                        : N/A
        Power Management Object           : N/A
    GPU Operation Mode
        Current                           : N/A
        Pending                           : N/A
    GPU Virtualization Mode
        Virtualization Mode               : None
        Host VGPU Mode                    : N/A
    IBMNPU
        Relaxed Ordering Mode             : N/A
    PCI
        Bus                               : 0x21
        Device                            : 0x00
        Domain                            : 0x0000
        Device Id                         : 0x1E8410DE
        Bus Id                            : 00000000:21:00.0
        Sub System Id                     : 0x30713842
        GPU Link Info
            PCIe Generation
                Max                       : 3
                Current                   : 1
            Link Width
                Max                       : 16x
                Current                   : 16x
        Bridge Chip
            Type                          : N/A
            Firmware                      : N/A
        Replays Since Reset               : 0
        Replay Number Rollovers           : 0
        Tx Throughput                     : 2000 KB/s
        Rx Throughput                     : 16000 KB/s
    Fan Speed                             : 0 %
    Performance State                     : P8
    Clocks Throttle Reasons
        Idle                              : Active
        Applications Clocks Setting       : Not Active
        SW Power Cap                      : Not Active
        HW Slowdown                       : Not Active
            HW Thermal Slowdown           : Not Active
            HW Power Brake Slowdown       : Not Active
        Sync Boost                        : Not Active
        SW Thermal Slowdown               : Not Active
        Display Clock Setting             : Not Active
    FB Memory Usage
        Total                             : 7979 MiB
        Used                              : 968 MiB
        Free                              : 7011 MiB
    BAR1 Memory Usage
        Total                             : 256 MiB
        Used                              : 13 MiB
        Free                              : 243 MiB
    Compute Mode                          : Default
    Utilization
        Gpu                               : 12 %
        Memory                            : 12 %
        Encoder                           : 0 %
        Decoder                           : 0 %
    Encoder Stats
        Active Sessions                   : 0
        Average FPS                       : 0
        Average Latency                   : 0
    FBC Stats
        Active Sessions                   : 0
        Average FPS                       : 0
        Average Latency                   : 0
    Ecc Mode
        Current                           : N/A
        Pending                           : N/A
    ECC Errors
        Volatile
            SRAM Correctable              : N/A
            SRAM Uncorrectable            : N/A
            DRAM Correctable              : N/A
            DRAM Uncorrectable            : N/A
        Aggregate
            SRAM Correctable              : N/A
            SRAM Uncorrectable            : N/A
            DRAM Correctable              : N/A
            DRAM Uncorrectable            : N/A
    Retired Pages
        Single Bit ECC                    : N/A
        Double Bit ECC                    : N/A
        Pending Page Blacklist            : N/A
    Remapped Rows                         : N/A
    Temperature
        GPU Current Temp                  : 52 C
        GPU Shutdown Temp                 : 95 C
        GPU Slowdown Temp                 : 92 C
        GPU Max Operating Temp            : 88 C
        GPU Target Temperature            : 83 C
        Memory Current Temp               : N/A
        Memory Max Operating Temp         : N/A
    Power Readings
        Power Management                  : Supported
        Power Draw                        : 23.60 W
        Power Limit                       : 215.00 W
        Default Power Limit               : 215.00 W
        Enforced Power Limit              : 215.00 W
        Min Power Limit                   : 125.00 W
        Max Power Limit                   : 240.00 W
    Clocks
        Graphics                          : 390 MHz
        SM                                : 390 MHz
        Memory                            : 405 MHz
        Video                             : 540 MHz
    Applications Clocks
        Graphics                          : N/A
        Memory                            : N/A
    Default Applications Clocks
        Graphics                          : N/A
        Memory                            : N/A
    Max Clocks
        Graphics                          : 2100 MHz
        SM                                : 2100 MHz
        Memory                            : 7001 MHz
        Video                             : 1950 MHz
    Max Customer Boost Clocks
        Graphics                          : N/A
    Clock Policy
        Auto Boost                        : N/A
        Auto Boost Default                : N/A

i'm using compiz as my WM

christianparpart commented 3 years ago

RTX 2070

I'm having a radeon RX 6900 XT. It's all relative. :-)

I'm pretty sure now it's not because of constraints. I'll keep digging tomorrow. (I'm about to enter a global GC run on my bio-mass).

(NOTE: git 96b8f89)

Yaraslaut commented 1 year ago

I can not reproduce the crash with notcurses-demo. But I see difference between notcurses-demo on gnome terminal (left in the figure) and contour. (right in the figure) Contour does not show progress dots. Contour version Contour Terminal Emulator 0.3.12-master-26d7c6ce image

dankamongmen commented 1 year ago

I can not reproduce the crash with notcurses-demo. But I see difference between notcurses-demo on gnome terminal (left in the figure) and contour. (right in the figure) Contour does not show progress dots. Contour version Contour Terminal Emulator 0.3.12-master-26d7c6ce image

does your font include braille glyphs? this sounds like a font problem.

Yaraslaut commented 1 year ago

I can not reproduce the crash with notcurses-demo. But I see difference between notcurses-demo on gnome terminal (left in the figure) and contour. (right in the figure) Contour does not show progress dots. Contour version Contour Terminal Emulator 0.3.12-master-26d7c6ce image

does your font include braille glyphs? this sounds like a font problem.

You were right this is font issue. With FreeMono glyphs exist, and apart from some weird empty spaces everything ok. image

Yaraslaut commented 1 year ago

@dankamongmen can you please check if the issue is still present on contour master ?

dankamongmen commented 1 year ago

ran into this trying to build:

-- No 3rdparty libraries found at /home/dank/src/dankamongmen/contour/_deps/sources
-- Found HarfBuzz: /usr/lib/x86_64-linux-gnu/libharfbuzz.so  
-- Found Freetype: /usr/lib/x86_64-linux-gnu/libfreetype.so (found version "2.12.1") 
CMake Error at cmake/ContourThirdParties.cmake:119 (ContourThirdParties_Embed_termbench_pro):
  Unknown CMake command "ContourThirdParties_Embed_termbench_pro".
Call Stack (most recent call first):
  CMakeLists.txt:87 (include)

i might be able to look into this later

Yaraslaut commented 1 year ago

Mu guess is that you forgot to run install-deps.sh which located in scripts folder, so ./scripts/install-deps.sh will fix this issue.

dankamongmen commented 1 year ago

indeed. i'm now running into

In file included from /usr/include/range/v3/view/all.hpp:26,
                 from /usr/include/range/v3/view/adaptor.hpp:28,
                 from /usr/include/range/v3/view/delimit.hpp:26,
                 from /usr/include/range/v3/view/iota.hpp:31,
                 from /home/dank/src/dankamongmen/contour/src/crispy/utils.h:8,
                 from /home/dank/src/dankamongmen/contour/src/crispy/CLI.h:16,
                 from /home/dank/src/dankamongmen/contour/src/crispy/App.h:16,
                 from /home/dank/src/dankamongmen/contour/src/crispy/App.cpp:14:
/usr/include/range/v3/view/ref.hpp:70:9: error: ‘CPP_auto_member’ does not name a type; did you mean ‘CPP_member’?
   70 |         CPP_auto_member
      |         ^~~~~~~~~~~~~~~
      |         CPP_member
/usr/include/range/v3/view/ref.hpp:77:9: error: ‘CPP_auto_member’ does not name a type; did you mean ‘CPP_member’?
   77 |         CPP_auto_member
      |         ^~~~~~~~~~~~~~~
      |         CPP_member
/usr/include/range/v3/view/iota.hpp:423:9: error: ‘CPP_auto_member’ does not name a type; did you mean ‘CPP_member’?
  423 |         CPP_auto_member
      |         ^~~~~~~~~~~~~~~
      |         CPP_member
/usr/include/range/v3/view/iota.hpp:429:9: error: ‘CPP_auto_member’ does not name a type; did you mean ‘CPP_member’?
  429 |         CPP_auto_member
      |         ^~~~~~~~~~~~~~~
      |         CPP_member
In file included from /home/dank/src/dankamongmen/contour/src/crispy/utils.h:9:
/usr/include/range/v3/view/transform.hpp:185:9: error: ‘CPP_auto_member’ does not name a type; did you mean ‘CPP_member’?
  185 |         CPP_auto_member
      |         ^~~~~~~~~~~~~~~
      |         CPP_member
/usr/include/range/v3/view/transform.hpp:191:9: error: ‘CPP_auto_member’ does not name a type; did you mean ‘CPP_member’?
  191 |         CPP_auto_member
      |         ^~~~~~~~~~~~~~~
      |         CPP_member

schwarzgerat $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/12/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 12.2.0-14' --with-bugurl=file:///usr/share/doc/gcc-12/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-12 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-12-bTRWOB/gcc-12-12.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-12-bTRWOB/gcc-12-12.2.0/debian/tmp-gcn/usr --enable-offload-defaulted --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 12.2.0 (Debian 12.2.0-14)

Yaraslaut commented 1 year ago

This is weird. I cannot reproduce this error on freshly installed debian with unstable repo enabled. Moreover, this is only range-v3 problem which should be fixed, since it has been a year since the last release.

whisperity commented 1 year ago

I'd try to suggest fiddling with whether you're compiling with cpp20 enabled or not. I have a hunch the problem lies somewhere over there.