YACReader / yacreader

This repo contains the code of YACReader's desktop version.
https://www.yacreader.com
GNU General Public License v3.0
960 stars 94 forks source link

Library: lots of runtime warnings in Debug mode #55

Open vedgy opened 5 years ago

vedgy commented 5 years ago

Simply start and exit YACReaderLibrary built in Debug mode in Qt Creator and examine the Application Output tab to reproduce.

Some of the warnings repeat many times on different lines. I pasted only unique errors below:

QLayout::addChildLayout: layout "" already has a parent 
qrc:/qml/FlowView.qml:35: ReferenceError: backgroundImage is not defined 
qrc:/qml/FlowView.qml:86: ReferenceError: comicsList is not defined 
qrc:/qml/ComicInfoView.qml:54: ReferenceError: comicInfo is not defined 
qrc:/qml/ComicInfoView.qml:145: ReferenceError: comic is not defined 
QObject::connect: No such signal LibraryCreator::failedUpdatingDB(QString) in ../../yacreader/YACReaderLibrary/library_window.cpp:999 
QSqlDatabasePrivate::removeDatabase: connection '/home/igor/Constant/comics/.yacreaderlibrary/library.ydb7fffedf38d40' is still in use, all queries will cease to work. 
QSqlDatabasePrivate::removeDatabase: connection '/home/igor/Constant/comics/.yacreaderlibrary7fffedf38d40' is still in use, all queries will cease to work. 
QSqlDatabasePrivate::addDatabase: duplicate connection name '/home/igor/Constant/comics/.yacreaderlibrary7fffedf38d40', old connection removed. 
qrc:/qml/FlowView.qml:76:5: QML ListView: Binding loop detected for property "model"
selmf commented 4 years ago

I finally had the time to take a deeper look at this and I have identified two root causes.

We used to have a bug in the server code which ate all regular debug messages via a global message handler, which I suspect is responsible for masking those errors when @luisangelsm wrote the code.

I am working on fixing the database stuff, but it won't be pretty.

For the qml code, I am not sure what to do. The offical solution is to define the references before loading the source, but that isn't how @luisangelsm designed those views. I currently see no easy fix, but I'll keep digging.