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

Segmentation fault at startup (pgmodeler/pgmodeler) #283

Closed
rkhaotix opened this issue Jul 31, 2013 · 6 comments
Closed

Segmentation fault at startup (pgmodeler/pgmodeler) #283

rkhaotix opened this issue Jul 31, 2013 · 6 comments
Labels

Comments

@rkhaotix
Copy link
Member

Platform:

  • Distribution: Arch Linux x86_64
  • Kernel: 3.10.2
  • Qt: 5.1.0
    Tested both 0.5.2 and 0.6.0-alpha from the downloads section, and builds from source produces the error too.
(gdb) backtrace
#0 0x00007ffff5df27f3 in QWidget::~QWidget() () from /usr/lib/libQt5Widgets.so.5
#1 0x00007ffff6ae3404 in SwapObjectsIdsWidget::~SwapObjectsIdsWidget() () from libpgmodeler_ui.so.1
#2 0x00007ffff527cd6c in QObjectPrivate::deleteChildren() () from /usr/lib/libQt5Core.so.5
#3 0x00007ffff5df29a8 in QWidget::~QWidget() () from /usr/lib/libQt5Widgets.so.5
#4 0x00007ffff5f42309 in QStackedWidget::~QStackedWidget() () from /usr/lib/libQt5Widgets.so.5
#5 0x00007ffff527cd6c in QObjectPrivate::deleteChildren() () from /usr/lib/libQt5Core.so.5
#6 0x00007ffff5df29a8 in QWidget::~QWidget() () from /usr/lib/libQt5Widgets.so.5
#7 0x00007ffff6ad42b3 in SwapObjectsIdsWidget::SwapObjectsIdsWidget(QWidget*, QFlags<Qt::WindowType>) () from libpgmodeler_ui.so.1
#8 0x00007ffff6ab6c21 in ModelValidationWidget::ModelValidationWidget(QWidget*) () from libpgmodeler_ui.so.1
#9 0x00007ffff698f8c2 in MainWindow::MainWindow(QWidget*, QFlags<Qt::WindowType>) () from libpgmodeler_ui.so.1
#10 0x0000000000405387 in main ()
@johanneslochmann
Copy link

mmh... seems to delete the parent form in baseobjectwidget.cpp:102

I'm not familiar enough with the codebase (yet) to decide why this should be done.

@rkhaotix
Copy link
Member Author

rkhaotix commented Sep 2, 2013

Seems it was a bug on Qt 5.1.0. pgModeler is running fine on Qt 5.1.1 and nothing was changed....

@johanneslochmann
Copy link

scratches head just compiled with Qt 5.1.1 and still have the crash. Wired.

#0 0x00007ffff6b7e444 in QWidget::~QWidget() () from /home/jolo/usr/qt5/5.1.1/gcc_64/lib/libQt5Widgets.so.5
#1 0x00007ffff6b7e859 in QWidget::~QWidget() () from /home/jolo/usr/qt5/5.1.1/gcc_64/lib/libQt5Widgets.so.5
#2 0x00007ffff7430037 in BaseObjectWidget::~BaseObjectWidget (this=0x13c0000, __in_chrg=) at src/baseobjectwidget.cpp:110
#3 0x00007ffff74300c8 in BaseObjectWidget::~BaseObjectWidget (this=0x13c0000, __in_chrg=) at src/baseobjectwidget.cpp:111
#4 0x00007ffff5fa725a in QObjectPrivate::deleteChildren() () from /home/jolo/usr/qt5/5.1.1/gcc_64/lib/libQt5Core.so.5
#5 0x00007ffff6b7e5f0 in QWidget::~QWidget() () from /home/jolo/usr/qt5/5.1.1/gcc_64/lib/libQt5Widgets.so.5
#6 0x00007ffff6cda139 in QStackedWidget::~QStackedWidget() () from /home/jolo/usr/qt5/5.1.1/gcc_64/lib/libQt5Widgets.so.5
#7 0x00007ffff5fa725a in QObjectPrivate::deleteChildren() () from /home/jolo/usr/qt5/5.1.1/gcc_64/lib/libQt5Core.so.5
#8 0x00007ffff6b7e5f0 in QWidget::~QWidget() () from /home/jolo/usr/qt5/5.1.1/gcc_64/lib/libQt5Widgets.so.5
#9 0x00007ffff769c87a in BaseForm::~BaseForm (this=0x13e27e0, __in_chrg=) at moc/../src/baseform.h:33
#10 0x00007ffff769c8b6 in BaseForm::~BaseForm (this=0x13e27e0, __in_chrg=) at moc/../src/baseform.h:33
#11 0x00007ffff742fe6b in BaseObjectWidget::BaseObjectWidget (this=0x13c0000, parent=0x7fffffffc570, obj_type=OBJ_PERMISSION) at src/baseobjectwidget.cpp:102
#12 0x00007ffff74a4de2 in PermissionWidget::PermissionWidget (this=0x13c0000, parent=0x7fffffffc570) at src/permissionwidget.cpp:21
#13 0x00007ffff73c6255 in MainWindow::MainWindow (this=0x7fffffffc570, parent=0x0, flags=...) at src/mainwindow.cpp:138
#14 0x0000000000406825 in main (argc=1, argv=0x7fffffffcaa8) at src/main.cpp:138

@rkhaotix
Copy link
Member Author

rkhaotix commented Sep 2, 2013

This is very strange.... :/

What's the Window Manager, Distro and GCC version you're using?

@rkhaotix
Copy link
Member Author

rkhaotix commented Sep 2, 2013

Hah! Just found the cause! :)

The objects are being destroyed at startup because pgModeler couldn't find some of it's conf files and try to raise an exception but the crash occurs here... I'll change the way pgModeler raises errors on constructors.

As a workaround make sure that the values of PGMODELER_??? environment vars (http://www.pgmodeler.com.br/wiki/doku.php?id=installation) are correclty set.

@johanneslochmann
Copy link

thanks for having a look!

From the comment in pgmodeler.var:

"Specify here the full path to the pgmodeler's root directory"

... i set the PGMODELER_ROOT to the root source dir, i.e. the git repositories root. But indeed, i guess it should be set to the build subdirectory. At least this fixes the crash and gets rid of the dialog informing me that pgmodeler is unable to load plugins.

Maybe the comment should include a hint that PGMODELER_ROOT should point to the "build" subdirectory...

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