mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-25 04:38:23 +00:00
fixed crash in mtpFileLoader delayed destroy, finishing breakpad at the very end, 0.9.29 dev
This commit is contained in:
parent
ebfeeb6872
commit
cde264e5a1
@ -344,23 +344,6 @@ void Application::closeApplication() {
|
|||||||
if (_updateThread) _updateThread->quit();
|
if (_updateThread) _updateThread->quit();
|
||||||
_updateThread = 0;
|
_updateThread = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DEBUG_LOG(("Telegram finished, result: %1").arg("unknown"));
|
|
||||||
|
|
||||||
#ifndef TDESKTOP_DISABLE_AUTOUPDATE
|
|
||||||
if (cRestartingUpdate()) {
|
|
||||||
DEBUG_LOG(("Application Info: executing updater to install update.."));
|
|
||||||
psExecUpdater();
|
|
||||||
} else
|
|
||||||
#endif
|
|
||||||
if (cRestarting()) {
|
|
||||||
DEBUG_LOG(("Application Info: executing Telegram, because of restart.."));
|
|
||||||
psExecTelegram();
|
|
||||||
}
|
|
||||||
|
|
||||||
SignalHandlers::finish();
|
|
||||||
PlatformSpecific::finish();
|
|
||||||
Logs::finish();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TDESKTOP_DISABLE_AUTOUPDATE
|
#ifndef TDESKTOP_DISABLE_AUTOUPDATE
|
||||||
@ -1067,7 +1050,7 @@ AppClass::~AppClass() {
|
|||||||
App::deinitMedia();
|
App::deinitMedia();
|
||||||
deinitImageLinkManager();
|
deinitImageLinkManager();
|
||||||
|
|
||||||
MTP::stop();
|
MTP::finish();
|
||||||
|
|
||||||
AppObject = 0;
|
AppObject = 0;
|
||||||
deleteAndMark(_uploader);
|
deleteAndMark(_uploader);
|
||||||
|
@ -43,6 +43,26 @@ int main(int argc, char *argv[]) {
|
|||||||
//int a_argc = a_cnt + 1;
|
//int a_argc = a_cnt + 1;
|
||||||
//char *a_argv[a_cnt + 1] = { argv[0], args[0].data() };
|
//char *a_argv[a_cnt + 1] = { argv[0], args[0].data() };
|
||||||
|
|
||||||
Application app(argc, argv);
|
int result = 0;
|
||||||
return app.exec();
|
{
|
||||||
|
Application app(argc, argv);
|
||||||
|
result = app.exec();
|
||||||
|
}
|
||||||
|
|
||||||
|
DEBUG_LOG(("Telegram finished, result: %1").arg(result));
|
||||||
|
|
||||||
|
#ifndef TDESKTOP_DISABLE_AUTOUPDATE
|
||||||
|
if (cRestartingUpdate()) {
|
||||||
|
DEBUG_LOG(("Application Info: executing updater to install update.."));
|
||||||
|
psExecUpdater();
|
||||||
|
} else
|
||||||
|
#endif
|
||||||
|
if (cRestarting()) {
|
||||||
|
DEBUG_LOG(("Application Info: executing Telegram, because of restart.."));
|
||||||
|
psExecTelegram();
|
||||||
|
}
|
||||||
|
|
||||||
|
SignalHandlers::finish();
|
||||||
|
PlatformSpecific::finish();
|
||||||
|
Logs::finish();
|
||||||
}
|
}
|
||||||
|
@ -758,6 +758,8 @@ namespace MTP {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cancel(mtpRequestId requestId) {
|
void cancel(mtpRequestId requestId) {
|
||||||
|
if (!_started) return;
|
||||||
|
|
||||||
mtpMsgId msgId = 0;
|
mtpMsgId msgId = 0;
|
||||||
requestsDelays.remove(requestId);
|
requestsDelays.remove(requestId);
|
||||||
{
|
{
|
||||||
@ -831,7 +833,7 @@ namespace MTP {
|
|||||||
return MTP::RequestConnecting;
|
return MTP::RequestConnecting;
|
||||||
}
|
}
|
||||||
|
|
||||||
void stop() {
|
void finish() {
|
||||||
for (Sessions::iterator i = sessions.begin(), e = sessions.end(); i != e; ++i) {
|
for (Sessions::iterator i = sessions.begin(), e = sessions.end(); i != e; ++i) {
|
||||||
i.value()->kill();
|
i.value()->kill();
|
||||||
delete i.value();
|
delete i.value();
|
||||||
|
@ -132,9 +132,7 @@ namespace MTP {
|
|||||||
};
|
};
|
||||||
int32 state(mtpRequestId req); // < 0 means waiting for such count of ms
|
int32 state(mtpRequestId req); // < 0 means waiting for such count of ms
|
||||||
|
|
||||||
void defOnError(const RPCError &err);
|
void finish();
|
||||||
|
|
||||||
void stop();
|
|
||||||
|
|
||||||
void authed(int32 uid);
|
void authed(int32 uid);
|
||||||
int32 authedId();
|
int32 authedId();
|
||||||
|
@ -527,7 +527,7 @@ void mtpFileLoader::cancelRequests() {
|
|||||||
_queue->queries -= _requests.size();
|
_queue->queries -= _requests.size();
|
||||||
_requests.clear();
|
_requests.clear();
|
||||||
|
|
||||||
if (!_queue->queries) {
|
if (!_queue->queries && App::app()) {
|
||||||
App::app()->killDownloadSessionsStart(_dc);
|
App::app()->killDownloadSessionsStart(_dc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1393,6 +1393,12 @@ void DocumentData::recountIsImage() {
|
|||||||
|
|
||||||
DocumentData::~DocumentData() {
|
DocumentData::~DocumentData() {
|
||||||
delete _additional;
|
delete _additional;
|
||||||
|
|
||||||
|
if (loading()) {
|
||||||
|
_loader->deleteLater();
|
||||||
|
_loader->stop();
|
||||||
|
_loader = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
WebPageData::WebPageData(const WebPageId &id, WebPageType type, const QString &url, const QString &displayUrl, const QString &siteName, const QString &title, const QString &description, PhotoData *photo, DocumentData *doc, int32 duration, const QString &author, int32 pendingTill) : id(id)
|
WebPageData::WebPageData(const WebPageId &id, WebPageType type, const QString &url, const QString &displayUrl, const QString &siteName, const QString &title, const QString &description, PhotoData *photo, DocumentData *doc, int32 duration, const QString &author, int32 pendingTill) : id(id)
|
||||||
|
Loading…
Reference in New Issue
Block a user