View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0015029 | Scribus | Internal | public | 2017-10-25 21:49 | 2017-12-20 20:58 |
Reporter | u ltd. | Assigned To | jghali | ||
Priority | normal | Severity | tweak | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | amd64 | OS | alike debian | OS Version | 9 |
Product Version | 1.5.3 | ||||
Fixed in Version | 1.5.4.svn | ||||
Summary | 0015029: Crash caused by uninitialized variables | ||||
Description | This error occurs when executing Scribus after having changed the code in a wrong way. (What happens if you are modifying a functionality -> Nasty development obstacle) Instead the error occurs, scribus crashes when deinitializing a not-initialized object because the main initaliziation didn't work. (But you actually would expect the main initalization error as main reason.) | ||||
Additional Information | diff -C 5 old/scribus-1.5.3/scribus/scribus.cpp bug-submission/scribus/scribus.cpp *** old/scribus-1.5.3/scribus/scribus.cpp 2017-05-28 11:10:25.000000000 +0200 --- bug-submission/scribus/scribus.cpp 2017-10-25 23:34:21.000000000 +0200 *************** *** 307,316 **** --- 307,318 ---- #ifdef Q_OS_MAC //commenting this out until this is resolved :https://bugreports.qt.io/browse/QTBUG-44565 //ScQApp->setAttribute(Qt::AA_DontShowIconsInMenus); //noIcon = IconManager::instance()->loadPixmap("noicon.png"); #endif + m_doc = 0; + m_tocGenerator = 0; } /* * retval 0 - ok, 1 - no fonts, ... */ *************** *** 474,485 **** { if (actionManager) delete actionManager; if (appModeHelper) delete appModeHelper; ! delete m_doc; ! delete m_tocGenerator; } void ScribusMainWindow::addScToolBar(ScToolBar *tb, QString name) { if (!scrToolBars.contains(name)) --- 476,490 ---- { if (actionManager) delete actionManager; if (appModeHelper) delete appModeHelper; ! ! if (m_doc) ! delete m_doc; ! if (m_tocGenerator) ! delete m_tocGenerator; } void ScribusMainWindow::addScToolBar(ScToolBar *tb, QString name) { if (!scrToolBars.contains(name)) | ||||
Tags | crash | ||||
Patch | Yes | ||||
|
Patch with better formatting scribus.cpp.patch (1,146 bytes)
*** old/scribus-1.5.3/scribus/scribus.cpp 2017-05-28 11:10:25.000000000 +0200 --- bug-submission/scribus/scribus.cpp 2017-10-25 23:34:21.000000000 +0200 *************** *** 307,316 **** --- 307,318 ---- #ifdef Q_OS_MAC //commenting this out until this is resolved :https://bugreports.qt.io/browse/QTBUG-44565 //ScQApp->setAttribute(Qt::AA_DontShowIconsInMenus); //noIcon = IconManager::instance()->loadPixmap("noicon.png"); #endif + m_doc = 0; + m_tocGenerator = 0; } /* * retval 0 - ok, 1 - no fonts, ... */ *************** *** 474,485 **** { if (actionManager) delete actionManager; if (appModeHelper) delete appModeHelper; ! delete m_doc; ! delete m_tocGenerator; } void ScribusMainWindow::addScToolBar(ScToolBar *tb, QString name) { if (!scrToolBars.contains(name)) --- 476,490 ---- { if (actionManager) delete actionManager; if (appModeHelper) delete appModeHelper; ! ! if (m_doc) ! delete m_doc; ! if (m_tocGenerator) ! delete m_tocGenerator; } void ScribusMainWindow::addScToolBar(ScToolBar *tb, QString name) { if (!scrToolBars.contains(name)) |
|
Applied, thanks! |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-10-25 21:49 | u ltd. | New Issue | |
2017-10-25 21:49 | u ltd. | Tag Attached: crash | |
2017-10-25 21:51 | u ltd. | File Added: scribus.cpp.patch | |
2017-10-25 21:51 | u ltd. | Note Added: 0044586 | |
2017-10-26 17:20 | jghali | Summary | Crash for the wrong reason => Crash caused by uninitialized variables |
2017-10-26 17:21 | jghali | Assigned To | => jghali |
2017-10-26 17:21 | jghali | Status | new => resolved |
2017-10-26 17:21 | jghali | Resolution | open => fixed |
2017-10-26 17:21 | jghali | Fixed in Version | => 1.5.4.svn |
2017-10-26 17:21 | jghali | Note Added: 0044595 | |
2017-12-20 20:58 | cbradney | Status | resolved => closed |