geometer/FBReader — Issue #87: OPDS: fix crash after adding bad OPDS library
Author: snowwlex
Created: 2011-11-15 14:38:08+00:00
State: open

How to reproduce situation:

1. Add a new network library with url "http://service.ebooksearch.webfactional.com/ru/libru/catalog.atom"
2. Enter it, program messages "Host catalog.atom not found"
3. Exit from FBReader application
4. Run it again, enter network libraries, and app falls with backtrace:

---------------------------------------------------------------------------------------------------------------------------
Program received signal SIGSEGV, Segmentation fault.
0x08079e4a in ATOMDateConstruct::setLongSeconds_stupid (this=0x0, t=0) at ATOMConstructs.cpp:329
329	myYear = t / (12*31*24*60*60) + 2000;
(gdb) backtrace
#0 0x08079e4a in ATOMDateConstruct::setLongSeconds_stupid (this=0x0, t=0) at ATOMConstructs.cpp:329
#1 0x08140351 in BooksDB::loadNetworkLinks (this=0x84cea08, links=...) at BooksDB.cpp:553
#2 0x0807f4ad in NetworkLinkCollection::NetworkLinkCollection (this=0x85ffdd0) at NetworkLinkCollection.cpp:224
#3 0x0807deb8 in NetworkLinkCollection::Instance () at NetworkLinkCollection.cpp:56
#4 0x081277c7 in NetworkView::makeUpToDate (this=0xbfffc49c) at NetworkView.cpp:133
#5 0x08127787 in NetworkView::showDialog (this=0xbfffc49c) at NetworkView.cpp:82
#6 0x081648ae in ShowNetworkLibraryAction::run (this=0x83fd658) at SearchOnNetworkAction.cpp:46
#7 0x081b5288 in ZLApplication::Action::checkAndRun (this=0x83fd658) at ZLApplication.cpp:159
#8 0x081b544d in ZLApplication::doAction (this=0x83e0f50, actionId=...) at ZLApplication.cpp:181
#9 0x081b97b3 in ZLApplicationWindow::onMenuItemPress (this=0x83fede4, menuItem=...) at ZLApplicationWindow.cpp:163
#10 0x081ead7d in ZLQtMenuAction::run (this=0x84c8608) at ZLQtApplicationWindow.cpp:48
#11 0x081b5288 in ZLApplication::Action::checkAndRun (this=0x84c8608) at ZLApplication.cpp:159
#12 0x081ed61c in DrillDownMenuItem::run (this=0x8496420) at DrillDownMenu.cpp:141
#13 0x081ed45d in DrillDownMenu::run (this=0x84c7ac0, item=0x8496420) at DrillDownMenu.cpp:117
#14 0x0820137c in DrillDownMenu::qt_metacall (this=0x84c7ac0, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0xbfffc6b8) at DrillDownMenu.moc.cpp:72
#15 0x011bc6ba in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/libQtCore.so.4
#16 0x011cc4ff in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#17 0x0085f963 in QListWidget::itemClicked(QListWidgetItem*) () from /usr/lib/libQtGui.so.4
#18 0x008601e8 in ?? () from /usr/lib/libQtGui.so.4
#19 0x0086323c in QListWidget::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libQtGui.so.4
#20 0x08201348 in DrillDownMenu::qt_metacall (this=0x84c7ac0, _c=QMetaObject::InvokeMetaMethod, _id=84, _a=0xbfffc818) at DrillDownMenu.moc.cpp:67
#21 0x011bc6ba in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/libQtCore.so.4
#22 0x011cc4ff in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#23 0x007f7d93 in QAbstractItemView::clicked(QModelIndex const&) () from /usr/lib/libQtGui.so.4
#24 0x007f81d4 in QAbstractItemView::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libQtGui.so.4
---------------------------------------------------------------------------------------------------------------------------

Comments:
1) Deleting home directory allow to use network libraries again.
2) Program has been compiled with following target.mk:

---------------------------------------------------------------------------------------------------------------------------
TARGET_ARCH = desktop
UI_TYPE = qtwidgets
TARGET_STATUS = debug
---------------------------------------------------------------------------------------------------------------------------