Bug 356965

Summary: kate5 crashes on exit, unloading plugins
Product: [Applications] kate Reporter: RJVB <rjvbertin>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: greg, iiaiiappa
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: macOS   
Latest Commit: Version Fixed In: Applications 16.04

Description RJVB 2015-12-20 19:27:17 UTC
The latest (5.12.0) Kate version has developed a tendency to crash on exit, while unloading plugins:

Process:         kate [12038]
Path:            /opt/local/bin/kate5
Identifier:      kate
Version:         0
Code Type:       X86-64 (Native)
Parent Process:  tcsh [1096]
Responsible:     X11.bin [254]
User ID:         505

Date/Time:       2015-12-20 20:22:25.021 +0100
OS Version:      Mac OS X 10.9.5 (13F1134)
Report Version:  11
Anonymous UUID:  64B814D9-356F-6F85-8341-E17C1354A330

Sleep/Wake UUID: D2EF12A8-8737-49B5-A4F9-F9B58CDA392E

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000020

VM Regions Near 0x20:
--> 
    __TEXT                 00000001050c4000-0000000105139000 [  468K] r-x/rwx SM=COW  /Applications/MacPorts/*/kate.app/Contents/MacOS/kate

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   kate5                         	0x00000001050ef3ab KatePluginManager::disablePluginGUI(KatePluginInfo*, KateMainWindow*) + 43 (qhash.h:951)
1   kate5                         	0x00000001050ef57a KatePluginManager::disablePluginGUI(KatePluginInfo*) + 74 (katepluginmanager.cpp:274)
2   kate5                         	0x00000001050eeda7 KatePluginManager::unloadPlugin(KatePluginInfo*) + 23 (katepluginmanager.cpp:197)
3   kate5                         	0x00000001050ee008 KatePluginManager::~KatePluginManager() + 136 (qlist.h:159)
4   kate5                         	0x00000001050d7e2c KateApp::~KateApp() + 252 (kateapp.cpp:74)
5   kate5                         	0x00000001050d4771 main + 26465 (main.cpp:453)
6   libdyld.dylib                 	0x00007fff8e8b05fd start + 1



Reproducible: Sometimes

Steps to Reproduce:
1. start kate5
2. work a while, possibly changing which plugins should be loaded
3. exit

Actual Results:  
crash with the above backtrace

Expected Results:  
no crash

Qt itself has a tendency to crash when unloading the platform plugin, also related to QHash. It is for this reason that Qt will no longer unload plugins on exit (I've posted about this on kde-frameworks-devel).
Comment 1 Dominik Haumann 2016-04-05 18:53:18 UTC
Fixed for Applications 16.04 release, see commit:
https://quickgit.kde.org/?p=kate.git&a=commit&h=0326973a38ea7f96f85430b489480de00f401141
Comment 2 Dominik Haumann 2016-04-05 19:33:09 UTC
*** Bug 271063 has been marked as a duplicate of this bug. ***