Bug 1344917 - Pgadmin3 crashes immediatly at startup [regression]
Summary: Pgadmin3 crashes immediatly at startup [regression]
Keywords:
Status: CLOSED DUPLICATE of bug 1335043
Alias: None
Product: Fedora
Classification: Fedora
Component: pgadmin3
Version: 24
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Devrim Gündüz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-12 14:30 UTC by Clemens Eisserer
Modified: 2017-05-16 07:54 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-16 07:54:59 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Clemens Eisserer 2016-06-12 14:30:30 UTC
Description of problem:

When starting pgadmin3 on F24, it immediatly crashes during startup as soon as there is a single db-connection in the "Servers Group" Tree Widget in the object browser. Which is almost always the case, because using pgadmin3 without a single DB to connect to doesn't make much sence.


Version-Release number of selected component (if applicable): 1.22.1-1.fc24


How reproducible: always


Steps to Reproduce:
1. Start pgdmin3
2. if the config is fresh, configure a new db connection
3. pgadmin3 will crash, and crash again immediatly during start

Actual results:
crash


Expected results:
no crash

Additional info:

Thread 1 "pgadmin3" received signal SIGSEGV, Segmentation fault.
#0  0x0000555555759bb3 in pgConn::GetStatus() const ()
#1  0x00005555559b4060 in pluginUtilityFactory::CheckEnable(pgObject*) ()
#2  0x0000555555be26aa in menuFactoryList::CheckMenu(pgObject*, wxMenuBar*, ctlMenuToolbar*) ()
#3  0x00005555558f35df in frmMain::setDisplay(pgObject*, ctlListView*, ctlSQLBox*) ()
#4  0x00005555558f38fa in frmMain::execSelChange(wxTreeItemId, bool) ()
#5  0x00005555558f3f47 in frmMain::OnExpand(wxTreeEvent&) ()
#6  0x00007ffff604cc5c in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) ()
    at /lib64/libwx_baseu-2.8.so.0
#7  0x00007ffff604cd13 in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () at /lib64/libwx_baseu-2.8.so.0
#8  0x00007ffff604d0cb in wxEvtHandler::ProcessEvent(wxEvent&) () at /lib64/libwx_baseu-2.8.so.0
#9  0x00007ffff604d04b in wxEvtHandler::ProcessEvent(wxEvent&) () at /lib64/libwx_baseu-2.8.so.0
#10 0x00007ffff69e257c in wxWindowBase::TryParent(wxEvent&) () at /lib64/libwx_gtk2u_core-2.8.so.0
#11 0x00007ffff6a361a3 in wxGenericTreeCtrl::Expand(wxTreeItemId const&) () at /lib64/libwx_gtk2u_core-2.8.so.0
#12 0x0000555555945888 in frmMain::frmMain(wxString const&) ()
#13 0x000055555570bc64 in pgAdmin3::OnInit() ()
#14 0x00007ffff5ff43a7 in wxEntry(int&, wchar_t**) () at /lib64/libwx_baseu-2.8.so.0
#15 0x00005555556bd402 in main ()

Comment 1 Timon 2016-06-16 17:41:58 UTC
if this helps I made some tests
gcc-6.1.1-2.fc24.x86_64

pgadmin3 build with -O2 optimizations crashes
pgadmin3 build with -O1 optimizations works fine
pgadmin3 build with -O2 -fno-delete-null-pointer-checks works fine
pgadmin3 build with -O1 -fsanitize=undefined shows me at start

utils/factory.cpp:244:18: runtime error: member call on address 0x555801266280 which does not point to an object of type 'actionFactory'
0x555801266280: note: object is of type 'separatorFactory'
 00 00 00 00  78 28 35 fd 57 55 00 00  68 5b 0e 1c c5 7f 00 00  20 00 00 00 00 00 00 00  51 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'separatorFactory'
/usr/include/wx-2.8/wx/longlong.h:119:33: runtime error: left shift of negative value -1
frm/plugins.cpp:383:48: runtime error: member call on null pointer of type 'struct pgConn'
frm/frmBackupGlobals.cpp:285:21: runtime error: downcast of address 0x5558013a8ed0 which does not point to an object of type 'pgServer'
0x5558013a8ed0: note: object is of type 'pgServerCollection'
 00 00 00 00  c0 95 36 fd 57 55 00 00  d0 8c 3a 01 58 55 00 00  00 00 00 00 00 00 00 00  d8 5d 82 1e
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'pgServerCollection'
frm/frmBackupServer.cpp:260:20: runtime error: downcast of address 0x5558013a8ed0 which does not point to an object of type 'pgServer'
0x5558013a8ed0: note: object is of type 'pgServerCollection'
 00 00 00 00  c0 95 36 fd 57 55 00 00  d0 8c 3a 01 58 55 00 00  00 00 00 00 00 00 00 00  d8 5d 82 1e
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'pgServerCollection'

some info about this I found here https://gcc.gnu.org/gcc-6/changes.html
>Value range propagation now assumes that the this pointer of C++ member >functions is non-null. This eliminates common null pointer checks but also >breaks some non-conforming code-bases (such as Qt-5, Chromium, KDevelop). As a >temporary work-around -fno-delete-null-pointer-checks can be used.

Comment 2 Timon 2016-06-23 08:48:18 UTC
https://copr.fedorainfracloud.org/coprs/timon/pgadmin/
working git version of pgadmin3

Comment 3 Sascha Zantis 2016-06-26 19:15:41 UTC
Can reproduce. Timon's version works. Thanks for the workaround.

Comment 4 Emmanuel Touzery 2016-06-28 08:19:42 UTC
happens here too.

Comment 5 Joseph D. Wagner 2016-07-09 03:26:14 UTC
Please close this as a duplicate of bug 1335043.

Comment 6 Ashley Gittins 2016-07-19 10:24:14 UTC
Experienced this issue on my FC24 laptop which has been upgraded through a few releases. The packages in bug 1335043 per Joseph's post resolved the issue for me also, suggest marking this as dupe.

Comment 7 Joseph D. Wagner 2017-05-15 18:07:53 UTC
Is Devrim GÜNDÜZ on vacation? Has something happened to him? This is a duplicate of bug 1335043, which was fixed 10 months ago. Yet, this bug has never been marked a duplicate and closed. Can someone do that? Clemens Eisserer, can you do that?

Comment 8 Devrim Gündüz 2017-05-16 07:54:59 UTC

*** This bug has been marked as a duplicate of bug 1335043 ***


Note You need to log in before you can comment on or make changes to this bug.