Skip to content

SIGSEGV in MainWindow::executeWrapper on clean install #122

@bearsh

Description

@bearsh

Hi I get a SIGSEGV on a clean install (no ~/.password-store) in MainWindow::executeWrapper while calling autoclearTimer->stop();. autoclearTimer is not initialized and not null either. Here's the backtrace:

0   QObject::thread() const         0x7ffff705d9f8  
1   QObject::killTimer(int)         0x7ffff706302a  
2   QTimer::stop()          0x7ffff706bbe1  
3   MainWindow::executeWrapper  mainwindow.cpp  647 0x41ad60    
4   MainWindow::listKeys    mainwindow.cpp  1202    0x420931    
5   MainWindow::getSecretKeys   mainwindow.cpp  1376    0x4228f4    
6   ConfigDialog::wizard    configdialog.cpp    497 0x42f8e8    
7   MainWindow::config  mainwindow.cpp  403 0x417541    
8   MainWindow::checkConfig mainwindow.cpp  290 0x4154f9    
9   MainWindow::MainWindow  mainwindow.cpp  45  0x4118be    
10  main    main.cpp    44  0x41065d    

following patch fixes the issue:

diff --git a/mainwindow.cpp b/mainwindow.cpp
index 2955501..8205209 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -42,6 +42,7 @@ MainWindow::MainWindow(QWidget *parent)
   ui->statusBar->showMessage(tr("Welcome to QtPass %1").arg(VERSION), 2000);
   freshStart = true;
   startupPhase = true;
+  autoclearTimer = NULL;
   if (!checkConfig()) {
     // no working config
     QApplication::quit();
@@ -49,7 +50,6 @@ MainWindow::MainWindow(QWidget *parent)
   ui->copyPasswordButton->setEnabled(false);
   setClippedPassword("");
   QtPass = NULL;
-  autoclearTimer = NULL;
   QTimer::singleShot(10, this, SLOT(focusInput()));
 }

it only seems to happen when there's no ~/.password-store...
(sorry for being to lazy to create a pull request...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions