Bug 277025 - kdevelop crashes on closing
Summary: kdevelop crashes on closing
Status: RESOLVED DUPLICATE of bug 243375
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: git master
Platform: Microsoft Windows Microsoft Windows
: NOR crash
Target Milestone: 4.2.3
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-03 20:27 UTC by Patrick Spendrin
Modified: 2011-07-05 23:06 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Spendrin 2011-07-03 20:27:19 UTC
Version:           git master (using Devel) 
OS:                MS Windows

If I open kdevelop and try to close it right away, it crashes with the following backtrace:
Application: KDevelop (kdevelop), signal: EXCEPTION_ACCESS_VIOLATION


kdeui.dll!KCompTreeNode::find() [q:\kdelibs\kdeui\util\kcompletion_p.h @ 105] at 0x66b9a205
kdeui.dll!KCompTreeNode::remove() [q:\kdelibs\kdeui\util\kcompletion.cpp @ 791] at 0x66b9dbeb
kdeui.dll!KCompletion::removeItem() [q:\kdelibs\kdeui\util\kcompletion.cpp @ 212] at 0x66b9b551
katepartinterfaces.dll!KateCmd::unregisterCommand() [q:\kate\part\utils\katecmd.cpp @ 71] at 0x610a3686
katepartinterfaces.dll!KateScriptManager::~KateScriptManager() [q:\kate\part\script\katescriptmanager.cpp @ 53] at 0x60ecc829
katepartinterfaces.dll!KateScriptManager::`scalar deleting destructor'() [[unknown] @ -1] at 0x60ed1166
katepartinterfaces.dll!KateGlobal::~KateGlobal() [q:\kate\part\utils\kateglobal.cpp @ 209] at 0x6109b2cd
katepartinterfaces.dll!KateGlobal::`vector deleting destructor'() [[unknown] @ -1] at 0x61096f64
katepartinterfaces.dll!KateGlobal::decRef() [q:\kate\part\utils\kateglobal.h @ 180] at 0x60e38d11
katepart.dll!KateFactory::~KateFactory() [q:\kate\part\utils\katefactory.cpp @ 50] at 0x621217c6
katepart.dll!KateFactory::`scalar deleting destructor'() [[unknown] @ -1] at 0x62121746
QtCored4.dll!QObjectCleanupHandler::clear() [q:\qt\src\corelib\kernel\qobjectcleanuphandler.cpp @ 140] at 0x6741b1a4
QtCored4.dll!QObjectCleanupHandler::~QObjectCleanupHandler() [q:\qt\src\corelib\kernel\qobjectcleanuphandler.cpp @ 87] at 0x6741b03e
kdecore.dll!QObjectCleanupHandler::`scalar deleting destructor'() [[unknown] @ -1] at 0x6c4d8eda
kdecore.dll!_k_factorycleanup__LINE__::destroy() [q:\kdelibs\kdecore\util\kpluginfactory.cpp @ 29] at 0x6c4d8e7b
kdecore.dll!KCleanUpGlobalStatic::~KCleanUpGlobalStatic() [q:\kdelibs\kdecore\kernel\kglobal.h @ 62] at 0x6c1f5968
kdecore.dll!`_k_factorycleanup__LINE__::operator->'::`13'::`dynamic atexit destructor for 'cleanUpObject''() [[unknown] @ -1] at 0x6c5629fd
kdecore.dll!_CRT_INIT() [f:\dd\vctools\crt_bld\self_x86\crt\src\crtdll.c @ 415] at 0x6c4fd1f4
kdecore.dll!__DllMainCRTStartup() [f:\dd\vctools\crt_bld\self_x86\crt\src\crtdll.c @ 526] at 0x6c4fd400
kdecore.dll!_DllMainCRTStartup() [f:\dd\vctools\crt_bld\self_x86\crt\src\crtdll.c @ 476] at 0x6c4fd2c1
ntdll.dll!RtlQueryEnvironmentVariable() [[unknown] @ -1] at 0x77999930
ntdll.dll!LdrShutdownProcess() [[unknown] @ -1] at 0x779b8fba
ntdll.dll!RtlExitUserProcess() [[unknown] @ -1] at 0x779b8e5c
kernel32.dll!ExitProcess() [[unknown] @ -1] at 0x75af7a25
MSVCR100D.dll!amsg_exit() [[unknown] @ -1] at 0x6e9d85bb
MSVCR100D.dll!amsg_exit() [[unknown] @ -1] at 0x6e9d8467
MSVCR100D.dll!exit() [[unknown] @ -1] at 0x6e9d80b2
kdevelop.exe!__tmainCRTStartup() [f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 568] at 0x178b0a
kdevelop.exe!WinMainCRTStartup() [f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 371] at 0x17887f
kernel32.dll!BaseThreadInitThunk() [[unknown] @ -1] at 0x75af33ca
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77999ed2
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77999ea5


Reproducible: Always

Steps to Reproduce:
open kdevelop, close kdevelop

Actual Results:  
crashes

Expected Results:  
shouldn't crash
Comment 1 Milian Wolff 2011-07-04 14:15:26 UTC
does this also happen in Kate? It doesn't really look like KDevelop specific to me... If not then I'll have to look for scripts/commands being added in KDevelop...
Comment 2 Patrick Spendrin 2011-07-04 17:14:45 UTC
no, it doesn't happen with kate.
here is the tail of the debug output:

[4720] kdevelop(4720)/kdevplatform (shell) __thiscall KDevelop::Core::~Core(void):
[4720] kdevelop(4720)/kutils (KSettings::Dispatcher) void __thiscall KSettings::Dispatcher::DispatcherPrivate::unregisterComponent(class QObject *): componentName= "kdevplatformproject" refcount= 0
[4720] kdevelop(4720)/kdevplatform (language) __thiscall KDevelop::DUChainPrivate::~DUChainPrivate(void): Destroying
[4720] QWaitCondition: Destroyed while threads are still waiting
[4720] kdevelop(4720)/kio (Slave) void __thiscall KIO::Slave::kill(void): killing slave pid 2040 ( "trash://" )
[4720] kdevelop(4720)/kio (Slave) void __thiscall KIO::Slave::kill(void): killing slave pid 1552 ( "file://" )
[3872] Debug:klauncher(3872)/kio (KLauncher) void __thiscall KLauncher::slotFinished(int,enum QProcess::ExitStatus): process finished exitcode= 0 exitStatus= 0
[4720] kdevelop(4720)/kio (Slave) void __thiscall KIO::Slave::kill(void): killing slave pid 3852 ( "file://" )
[3872] Debug:klauncher(3872)/kio (KLauncher) void __thiscall KLauncher::slotFinished(int,enum QProcess::ExitStatus): process finished exitcode= 0 exitStatus= 0
[3872] Debug:klauncher(3872)/kio (KLauncher) void __thiscall KLauncher::slotFinished(int,enum QProcess::ExitStatus): process finished exitcode= 0 exitStatus= 0
[4720] zone still contained 2 blocks
[4864] drkonqi(4864) class CrashedApplication *__thiscall KCrashBackend::constructCrashedApplication(void): Executable is: "L:/bin/kdevelop"
[4864] drkonqi(4864) class CrashedApplication *__thiscall KCrashBackend::constructCrashedApplication(void): Executable exists: false
[4864] drkonqi(4864) bool __cdecl DrKonqi::init(void): Enabling drkonqi crash catching
Comment 3 Dominik Haumann 2011-07-04 22:25:13 UTC
Just an idea: In utils/katecmd.h, we have one single KCompletion object, shared with several line edits (all the command line-edit (F7)).

KCompletion m_cmdCompletion; // shared completion object for all KateCmdLineEdits in each KTE::View

Maybe this completion object is invalid, because it's deleted in windows and not in linux?
Comment 4 Patrick Spendrin 2011-07-05 07:53:54 UTC
Ok, I found out again yesterday evening that I already debugged this nearly a year ago; the problem is indeed the KCompletion objects. It seems as if deleted pointers are not set to 0x0 on msvc debug builds, but instead to some other values (0xfeeefeee). This also means that checks like if(0xfeeefeee) do not return the same results as on gcc...
I will debug this in kdelibs, and see how I can fix that error. Thanks for the pointers to katecmd though ;-)
Comment 5 Patrick Spendrin 2011-07-05 23:06:37 UTC

*** This bug has been marked as a duplicate of bug 243375 ***