Summary: | Rekonq crashes without network connection. | ||
---|---|---|---|
Product: | [Unmaintained] rekonq | Reporter: | Andrius Štikonas <andrius> |
Component: | general | Assignee: | Andrea Diamantini <adjam7> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | fuggum, pano_90, rohan |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | New crash information added by DrKonqi |
Description
Andrius Štikonas
2010-09-05 12:30:17 UTC
Created attachment 51976 [details]
New crash information added by DrKonqi
rekonq (0.6.0) on KDE Platform 4.5.1 (KDE 4.5.1) using Qt 4.7.0
- What I was doing when the application crashed:
attempted to use rekonq to view man pages without a network connection. i typed ma in the location box and get seg fault. happens every time.
-- Backtrace (Reduced):
#7 0x00007fbd76dc09f9 in KJob::kill (this=0x175a0d0, verbosity=KJob::Quietly) at ../../kdecore/jobs/kjob.cpp:106
#8 0x00007fbd7a9d42a0 in OpenSearchManager::requestSuggestion (this=0x19afdd0, searchText=...) at /build/buildd/rekonq-0.6.0/src/search/opensearchmanager.cpp:156
#9 0x00007fbd7a9c0579 in UrlResolver::computeSuggestions (this=0x1a19c10) at /build/buildd/rekonq-0.6.0/src/urlbar/urlresolver.cpp:398
#10 0x00007fbd7a9bdd59 in CompletionWidget::suggestUrls (this=0x1644240, text=...) at /build/buildd/rekonq-0.6.0/src/urlbar/completionwidget.cpp:384
#11 0x00007fbd7a9ba6dd in UrlBar::suggest (this=0x163a030) at /build/buildd/rekonq-0.6.0/src/urlbar/urlbar.cpp:503
consider this as a feature request. please enable the man: capabilities that were available in konqueror to rekonq. while it kinda-sorta works, the capability is quite different, in that the default search engine is preferred over local man pages, and you must type the entire man page name before rekonq will display the man page. it does however, show previously used entries, but this is far from konqueror's superior man page viewer. cheers Working on a fix, will post updates as soon as possible I can confirm this too here commit 2868f5d0d2f1a773a49f4d8d2b980214dcd0931d Author: Andrea Diamantini <adjam7@gmail.com> Date: Sun Oct 3 10:38:33 2010 +0200 Fix OpenSearchManager behavior to work in every case (also the disconnected ones) I hope this fix bug #250263 Applied in rekonq 0.6.1 and in master CCBUG:250263 diff --git a/src/opensearch/opensearchmanager.cpp b/src/opensearch/opensearchmanager.cpp index 8e02495..d0d47f6 100644 --- a/src/opensearch/opensearchmanager.cpp +++ b/src/opensearch/opensearchmanager.cpp @@ -59,9 +59,6 @@ OpenSearchManager::~OpenSearchManager() { qDeleteAll(m_enginesMap.values()); m_enginesMap.clear(); - - if(m_currentJob) - m_currentJob->kill(); } @@ -113,22 +110,13 @@ void OpenSearchManager::addOpenSearchEngine(const KUrl &url, const QString &titl { Q_UNUSED(title); - if (m_currentJob) - { - disconnect(m_currentJob); - m_currentJob->kill(); - delete m_currentJob; - } - - m_jobData.clear(); - if (m_state != IDLE) { - // TODO: cancel job + idleJob(); } - m_state = REQ_DESCRIPTION; m_currentJob = KIO::get(url, KIO::NoReload, KIO::HideProgressInfo); + m_state = REQ_DESCRIPTION; connect(m_currentJob, SIGNAL(data(KIO::Job *, const QByteArray &)), this, SLOT(dataReceived(KIO::Job *, const QByteArray &))); connect(m_currentJob, SIGNAL(result(KJob *)), this, SLOT(jobFinished(KJob *))); } @@ -141,23 +129,20 @@ void OpenSearchManager::requestSuggestion(const QString &searchText) if (m_state != IDLE) { - // TODO: cancel job + // NOTE: + // changing OpenSearchManager behavior + // using idleJob here lets opensearchmanager to start another search, while + // if we want in any case lets it finish its previous job we can just return here. + idleJob(); } - m_state = REQ_SUGGESTION; - + _typedText = searchText; KUrl url = m_activeEngine->suggestionsUrl(searchText); kDebug() << "Requesting for suggestions: " << url.url(); - if (m_currentJob) - { - disconnect(m_currentJob); - m_currentJob->kill(); - } - m_jobData.clear(); - m_currentJob = KIO::get(url, KIO::NoReload, KIO::HideProgressInfo); + m_state = REQ_SUGGESTION; connect(m_currentJob, SIGNAL(data(KIO::Job *, const QByteArray &)), this, SLOT(dataReceived(KIO::Job *, const QByteArray &))); connect(m_currentJob, SIGNAL(result(KJob *)), this, SLOT(jobFinished(KJob *))); } @@ -173,15 +158,19 @@ void OpenSearchManager::dataReceived(KIO::Job *job, const QByteArray &data) void OpenSearchManager::jobFinished(KJob *job) { if (job->error()) + { + emit suggestionReceived(_typedText, QStringList()); + m_state = IDLE; return; // just silently return - + } + if (m_state == REQ_SUGGESTION) { const QStringList suggestionsList = m_activeEngine->parseSuggestion(m_jobData); kDebug() << "Received suggestions in "<< _typedText << " from " << m_activeEngine->name() << ": " << suggestionsList; - m_currentJob = NULL; emit suggestionReceived(_typedText, suggestionsList); + idleJob(); return; } @@ -206,6 +195,8 @@ void OpenSearchManager::jobFinished(KJob *job) { kFatal() << "Error while adding new open search engine"; } + + idleJob(); } } @@ -232,3 +223,16 @@ QString OpenSearchManager::trimmedEngineName(const QString &engineName) const return trimmed; } + + +void OpenSearchManager::idleJob() +{ + if (m_currentJob) + { + disconnect(m_currentJob); + m_currentJob->kill(); + } + + m_jobData.clear(); + m_state = IDLE; +} diff --git a/src/opensearch/opensearchmanager.h b/src/opensearch/opensearchmanager.h index 224ada0..fd4b382 100644 --- a/src/opensearch/opensearchmanager.h +++ b/src/opensearch/opensearchmanager.h @@ -97,7 +97,9 @@ signals: private: QString trimmedEngineName(const QString &engineName) const; - + + void idleJob(); + // QString substitutueSearchText(const QString &searchText, const QString &requestURL) const; QByteArray m_jobData; QMap<QString, OpenSearchEngine*> m_enginesMap; It works for me now. works for me now, also. rekonq_0.6.0-0ubuntu2_amd64.deb\ thanx :) cheers |