Bug 289458

Summary: [patch] Kile segfaults on exiting during closing projects
Product: [Applications] kile Reporter: Eugene Shalygin <eugene.shalygin+bugzilla.kde>
Component: generalAssignee: Michel Ludwig <michel.ludwig>
Status: RESOLVED FIXED    
Severity: crash    
Priority: NOR    
Version: trunk-kde4   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: fix for Manager::projectCloseAll()

Description Eugene Shalygin 2011-12-20 21:00:54 UTC
Created attachment 66957 [details]
fix for Manager::projectCloseAll()

Version:           trunk-kde4 (using Devel) 
OS:                Linux

If more than 2 projects are opened in Kile then during closing it crashes.

Maybe this has started after upgrading Qt to 4.8, but I'm not sure. 

The problem is caused by removing items from collection during itearation in Manager::projectCloseAll() (iteration) and Manager::projectClose(const Kurl&) (removing).


Reproducible: Always

Steps to Reproduce:
1. Open 3 or more projects in Kile
2. Exit Kile

Actual Results:  
Kile crashes

Expected Results:  
Kile exits normally

Trivial patch is attached
Comment 1 Michel Ludwig 2011-12-20 21:22:20 UTC
Thanks for the patch! I've committed it now

http://commits.kde.org/kile/fd907d27dbced726d794bf24b887041eea9fbcab

(unfortunately with the wrong bug number)

As I cannot reproduce the crash here, please close this bug if it is fixed for you now.
Comment 2 Eugene Shalygin 2011-12-20 21:27:41 UTC
Thanks! I have chacked it before submission with local builds and it works.