Bug 283852

Summary: Find/Replace in Files tollvew -> change creteria causes crash
Product: [Developer tools] kdevplatform Reporter: Sergey Vidyuk <sir.vestnik>
Component: grepviewAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: 1.3.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Crash backtrace

Description Sergey Vidyuk 2011-10-12 10:34:55 UTC
Created attachment 64453 [details]
Crash backtrace

Version:           git master (using KDE 4.7.1) 
OS:                Linux

GrepOutputView constructor doesn't initialize m_plugin pointer and GrepOutputView::setPlugin() method is not called before first search operation (It's called in the GrepDialog::performAction() method).

Change criteria action calls GrepOutputView::showDialog which tries to call m_plugin->showDialog(true) however m_plugin member points to uninitialized memory and kdevelop crashes.

I don't feel myself familiar enough with the kdevelop code to fix this.

Reproducible: Always

Steps to Reproduce:
Start KDevelop and open Find in Files toolview without running any search.
Click on the change creteria button

Actual Results:  
Kdevelop crashes

Expected Results:  
Find in files dialog should be opened
Comment 1 Milian Wolff 2011-10-12 13:29:27 UTC
Git commit 9f6b1bb9e724055987c378cb41c218fd9f45a00f by Milian Wolff.
Committed on 12/10/2011 at 15:28.
Pushed by mwolff into branch 'master'.

always set plugin for grepoutputview properly

BUG: 283852

M  +0    -1    plugins/grepview/grepdialog.cpp
M  +11   -8    plugins/grepview/grepoutputview.cpp
M  +5    -4    plugins/grepview/grepoutputview.h
M  +1    -1    plugins/grepview/grepviewplugin.cpp

http://commits.kde.org/kdevplatform/9f6b1bb9e724055987c378cb41c218fd9f45a00f