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

Crash when using "Delete all rulers" #236

Closed
klayoutmatthias opened this issue Mar 10, 2019 · 1 comment
Closed

Crash when using "Delete all rulers" #236

klayoutmatthias opened this issue Mar 10, 2019 · 1 comment
Assignees
Labels

Comments

@klayoutmatthias
Copy link
Collaborator

@klayoutmatthias klayoutmatthias commented Mar 10, 2019

Some random crashes have been observed when using Ctrl+K (delete all rulers).

Apparently this happens when rulers are selected and/or moved while Ctrl+K is used. But it's hard to reproduce.

Here is some hint from valgrind:

==11571== Invalid read of size 4
==11571==    at 0x64662C0: ant::Object::outline() const (antObject.h:559)
==11571==    by 0x647EBEF: ant::draw_ruler(ant::Object const&, db::complex_trans<double, double, double> const&, bool, lay::CanvasPlane*, lay::Renderer&) (antService.cc:630)
==11571==    by 0x647F5AB: ant::View::render(lay::Viewport const&, lay::ViewObjectCanvas&) (antService.cc:707)
==11571==    by 0x12715BF5: lay::ViewObjectWidget::do_render(lay::Viewport const&, lay::ViewObjectCanvas&, bool) (layViewObject.cc:903)
==11571==    by 0x125F7890: lay::LayoutCanvas::paintEvent(QPaintEvent*) (layLayoutCanvas.cc:610)
==11571==    by 0xDF9E037: QWidget::event(QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.9.5)
==11571==    by 0x125F9C34: lay::LayoutCanvas::event(QEvent*) (layLayoutCanvas.cc:997)
==11571==    by 0xDF5F82B: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.9.5)
==11571==    by 0xDF670F3: QApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.9.5)
==11571==    by 0x5AA0D7F: lay::GuiApplication::notify(QObject*, QEvent*) (layApplication.cc:1318)
==11571==    by 0xCD9B9A7: QCoreApplication::notifyInternal2(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.9.5)
==11571==    by 0xDF97189: QWidgetPrivate::sendPaintEvent(QRegion const&) (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.9.5)
==11571==  Address 0x32e58894 is 148 bytes inside a block of size 224 free'd
==11571==    at 0x4C3123B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==11571==    by 0x5BFA9D9: ant::Object::~Object() (antObject.h:48)
==11571==    by 0x649346E: db::user_object<double>::set_ptr(db::user_object_base<double>*) (dbUserObject.h:304)
==11571==    by 0x648ECDC: db::user_object<double>::~user_object() (dbUserObject.h:227)
==11571==    by 0x64A4122: tl::reuse_vector<db::user_object<double> >::erase(tl::reuse_vector_iterator<db::user_object<double> > const&, tl::reuse_vector_iterator<db::user_object<double> > const&) (tlReuseVector.h:794)
==11571==    by 0x64A16AC: db::box_tree<db::box<double, double>, db::user_object<double>, db::box_convert<db::user_object<double>, true>, 100ul, 100ul>::erase(tl::reuse_vector_iterator<db::user_object<double> >, tl::reuse_vector_iterator<db::user_object<double> >) (dbBoxTree.h:834)
==11571==    by 0x649CE50: void db::box_tree<db::box<double, double>, db::user_object<double>, db::box_convert<db::user_object<double>, true>, 100ul, 100ul>::erase_positions<__gnu_cxx::__normal_iterator<tl::reuse_vector_const_iterator<db::user_object<double> >*, std::vector<tl::reuse_vector_const_iterator<db::user_object<double> >, std::allocator<tl::reuse_vector_const_iterator<db::user_object<double> > > > > >(__gnu_cxx::__normal_iterator<tl::reuse_vector_const_iterator<db::user_object<double> >*, std::vector<tl::reuse_vector_const_iterator<db::user_object<double> >, std::allocator<tl::reuse_vector_const_iterator<db::user_object<double> > > > >, __gnu_cxx::__normal_iterator<tl::reuse_vector_const_iterator<db::user_object<double> >*, std::vector<tl::reuse_vector_const_iterator<db::user_object<double> >, std::allocator<tl::reuse_vector_const_iterator<db::user_object<double> > > > >) (dbBoxTree.h:864)
==11571==    by 0x6494EF1: void db::layer<db::user_object<double>, db::stable_layer_tag>::erase_positions<__gnu_cxx::__normal_iterator<tl::reuse_vector_const_iterator<db::user_object<double> >*, std::vector<tl::reuse_vector_const_iterator<db::user_object<double> >, std::allocator<tl::reuse_vector_const_iterator<db::user_object<double> > > > > >(__gnu_cxx::__normal_iterator<tl::reuse_vector_const_iterator<db::user_object<double> >*, std::vector<tl::reuse_vector_const_iterator<db::user_object<double> >, std::allocator<tl::reuse_vector_const_iterator<db::user_object<double> > > > >, __gnu_cxx::__normal_iterator<tl::reuse_vector_const_iterator<db::user_object<double> >*, std::vector<tl::reuse_vector_const_iterator<db::user_object<double> >, std::allocator<tl::reuse_vector_const_iterator<db::user_object<double> > > > >) (dbLayer.h:276)
==11571==    by 0x6490801: void lay::AnnotationShapes::erase_positions<__gnu_cxx::__normal_iterator<tl::reuse_vector_const_iterator<db::user_object<double> >*, std::vector<tl::reuse_vector_const_iterator<db::user_object<double> >, std::allocator<tl::reuse_vector_const_iterator<db::user_object<double> > > > > >(__gnu_cxx::__normal_iterator<tl::reuse_vector_const_iterator<db::user_object<double> >*, std::vector<tl::reuse_vector_const_iterator<db::user_object<double> >, std::allocator<tl::reuse_vector_const_iterator<db::user_object<double> > > > >, __gnu_cxx::__normal_iterator<tl::reuse_vector_const_iterator<db::user_object<double> >*, std::vector<tl::reuse_vector_const_iterator<db::user_object<double> >, std::allocator<tl::reuse_vector_const_iterator<db::user_object<double> > > > >) (layAnnotationShapes.h:199)
==11571==    by 0x6485421: ant::Service::reduce_rulers(int) (antService.cc:1588)
==11571==    by 0x6480D2D: ant::Service::clear_rulers() (antService.cc:888)
==11571==    by 0x648846B: ant::Service::menu_activated(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (antService.cc:2131)
==11571==  Block was alloc'd at
==11571==    at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==11571==    by 0x646397A: ant::Object::clone() const (antObject.cc:223)
==11571==    by 0x124783A3: db::user_object<double>::user_object(db::user_object<double> const&) (dbUserObject.h:205)
==11571==    by 0x12477AD0: tl::reuse_vector<db::user_object<double> >::insert(db::user_object<double> const&) (tlReuseVector.h:737)
==11571==    by 0x12475230: db::box_tree<db::box<double, double>, db::user_object<double>, db::box_convert<db::user_object<double>, true>, 100ul, 100ul>::insert(db::user_object<double> const&) (dbBoxTree.h:752)
==11571==    by 0x12473513: db::layer<db::user_object<double>, db::stable_layer_tag>::insert(db::user_object<double> const&) (dbLayer.h:207)
==11571==    by 0x12470F4C: lay::AnnotationShapes::insert(db::user_object<double> const&) (layAnnotationShapes.cc:126)
==11571==    by 0x6480F46: ant::Service::insert_ruler(ant::Object const&, bool) (antService.cc:926)
==11571==    by 0x6484C05: ant::Service::mouse_click_event(db::point<double> const&, unsigned int, bool) (antService.cc:1482)
==11571==    by 0x1271534F: lay::ViewObjectWidget::mouseReleaseEvent(QMouseEvent*) (layViewObject.cc:793)
==11571==    by 0xDF9E037: QWidget::event(QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.9.5)
==11571==    by 0x125F9C34: lay::LayoutCanvas::event(QEvent*) (layLayoutCanvas.cc:997)
@klayoutmatthias
Copy link
Collaborator Author

@klayoutmatthias klayoutmatthias commented Mar 13, 2019

PR #237 may fix this issue

Loading

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

Successfully merging a pull request may close this issue.

None yet
1 participant