Bug 205057 - Kdevelop crushes on changing array key in PHP file
Summary: Kdevelop crushes on changing array key in PHP file
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: PHP (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-25 11:07 UTC by Victor Grischenko
Modified: 2009-08-25 14:18 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Test file (6.67 KB, application/octet-stream)
2009-08-25 11:08 UTC, Victor Grischenko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Grischenko 2009-08-25 11:07:34 UTC
Version:           svn1015284 (using KDE 4.3.0)
Compiler:          gcc-4.3-39.1 "-march=pentium4 -O3 -pipe -fomit-frame-pointer -ffast-math -funroll-loops" options was used
OS:                Linux
Installed from:    Compiled From Sources

1. Start kdevelop with no project. 
2. Open PHP file (see attachment)
3. move to line 162
4. Select 'metro' by mouse (without quotes)
5. start to type 'cap' (without quotes)
6. Kdevelop crushes
Comment 1 Victor Grischenko 2009-08-25 11:08:07 UTC
Created attachment 36431 [details]
Test file
Comment 2 Victor Grischenko 2009-08-25 11:10:59 UTC
Here is crash log from "kdevelop 2>kdev.log"
---------------------
WARNING: deleting stale lockfile /home/zenon/.kdevduchain/0/lock
<unknown program name>(3978)/ KDevelop::allocateRepository: picked duchain directory "/home/zenon/.kdevduchain/0"
QObject::connect: Cannot connect (null)::sessionAdded(KDevelop::IDebugSession*) to KDevelop::VariableCollection::updateAutoUpdate(KDevelop::IDebugSession*)
Calling appendChild() on a null node does nothing.
Calling appendChild() on a null node does nothing.
Calling appendChild() on a null node does nothing.
Calling appendChild() on a null node does nothing.
Calling appendChild() on a null node does nothing.
Calling appendChild() on a null node does nothing.
kdevelop(3978)/kdevplatform (language) KDevelop::CodeHighlightingColors::CodeHighlightingColors: Class color:  0x5912 -> 0xff141312
kdevelop(3978)/kdevplatform (language) KDevelop::CodeHighlightingColors::CodeHighlightingColors: TypeAlias color:  0x35938d -> 0xff141312
kdevelop(3978)/kdevplatform (language) KDevelop::CodeHighlightingColors::CodeHighlightingColors: Enum color:  0x6c101e -> 0xff141312
kdevelop(3978)/kdevplatform (language) KDevelop::CodeHighlightingColors::CodeHighlightingColors: Enumerator color:  0x862a38 -> 0xff141312
kdevelop(3978)/kdevplatform (language) KDevelop::CodeHighlightingColors::CodeHighlightingColors: Function color:  0x21005a -> 0xff141312
kdevelop(3978)/kdevplatform (language) KDevelop::CodeHighlightingColors::CodeHighlightingColors: MemberVariable color:  0x443069 -> 0xff141312
kdevelop(3978)/kdevplatform (language) KDevelop::CodeHighlightingColors::CodeHighlightingColors: LocalClassMember color:  0xae7d00 -> 0xff141312
kdevelop(3978)/kdevplatform (language) KDevelop::CodeHighlightingColors::CodeHighlightingColors: InheritedClassMember color:  0x705000 -> 0xff141312
kdevelop(3978)/kdevplatform (language) KDevelop::CodeHighlightingColors::CodeHighlightingColors: LocalVariable color:  0xc4d3c -> 0xff141312
kdevelop(3978)/kdevplatform (language) KDevelop::CodeHighlightingColors::CodeHighlightingColors: FunctionVariable color:  0x300085 -> 0xff141312
kdevelop(3978)/kdevplatform (language) KDevelop::CodeHighlightingColors::CodeHighlightingColors: NamespaceVariable color:  0x9f3c5f -> 0xff141312
kdevelop(3978)/kdevplatform (language) KDevelop::CodeHighlightingColors::CodeHighlightingColors: GlobalVariable color:  0x12762b -> 0xff141312
kdevelop(3978)/kdevplatform (language) KDevelop::CodeHighlightingColors::CodeHighlightingColors: Namespace color:  0x6b2840 -> 0xff141312
kdevelop(3978)/kdevplatform (language) KDevelop::CodeHighlightingColors::CodeHighlightingColors: ErrorVariable underline color:  0x8b0019 -> 0xff141312
kdevelop(3978)/kdevplatform (language) KDevelop::CodeHighlightingColors::CodeHighlightingColors: ForwardDeclaration color:  0x5c5c5c -> 0xff141312
kdevelop(3978)/kdevplatform (language) KDevelop::ColorCache::generateColors: text color: QColor(ARGB 1, 0.0784314, 0.0745098, 0.0705882)
kdevelop(3978)/kdevplatform (language) KDevelop::ColorCache::generateColors: color 0 interpolated from 0  <  1326 : 0xff141312
kdevelop(3978)/kdevplatform (language) KDevelop::ColorCache::generateColors: color 1 interpolated from 132  <  1326 : 0xff141312
kdevelop(3978)/kdevplatform (language) KDevelop::ColorCache::generateColors: color 2 interpolated from 264  <  1326 : 0xff141312
kdevelop(3978)/kdevplatform (language) KDevelop::ColorCache::generateColors: color 3 interpolated from 396  <  1326 : 0xff141312
kdevelop(3978)/kdevplatform (language) KDevelop::ColorCache::generateColors: color 4 interpolated from 528  <  1326 : 0xff141312
kdevelop(3978)/kdevplatform (language) KDevelop::ColorCache::generateColors: color 5 interpolated from 660  <  1326 : 0xff141312
kdevelop(3978)/kdevplatform (language) KDevelop::ColorCache::generateColors: color 6 interpolated from 792  <  1326 : 0xff141312
kdevelop(3978)/kdevplatform (language) KDevelop::ColorCache::generateColors: color 7 interpolated from 924  <  1326 : 0xff141312
kdevelop(3978)/kdevplatform (language) KDevelop::ColorCache::generateColors: color 8 interpolated from 1056  <  1326 : 0xff141312
kdevelop(3978)/kdevplatform (language) KDevelop::ColorCache::generateColors: color 9 interpolated from 1188  <  1326 : 0xff141312
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Php::CodeCompletionModel(0x8772af8), parent's thread is QThread(0x8059720), current thread is QThread(0x8710458)
Calling appendChild() on a null node does nothing.
kdevelop(3978)/kdevplatform (language) KDevelop::DUChainPrivate::loadChain: loading top-context 41
kdevelop(3978)/kdevplatform (language) KDevelop::DUChainPrivate::loadChain: loading top-context 1
kdevelop(3978)/kdevplatform (language) KDevelop::CodeHighlighting::highlightDUChain: highlighting du chain
kdevelop(3978)/kdevplatform (language) KDevelop::CodeHighlighting::highlightDUChain: highlighting disabled
kdevelop(3978)/kdevplatform (language) KDevelop::DUChain::documentLoadedPrepare: highlighted KUrl("file:///srv/www/vhosts/megamakler.com.zenon.zveno/www/models/referencesmodel.class.php") in foreground
kdevelop(3978)/kdevplatform (language) KDevelop::CodeCompletion::viewCreated: Registered completion model
Calling appendChild() on a null node does nothing.
Calling appendChild() on a null node does nothing.
Calling appendChild() on a null node does nothing.
kdevelop(3978)/kdevelop (php support) Php::CodeCompletionModel::completionRange: [ (161, 34)  ->  (161, 35) ] """
kdevelop(3978)/kdevplatform (language) KDevelop::CodeCompletionModel::completionInvokedInternal: completion invoked for context 0x8900330
kdevelop(3978)/kdevplatform (language) KDevelop::CodeCompletionModel::completionInvokedInternal: "" [ (0, 0)  ->  (227, 0) ]
kdevelop(3978)/kdevplatform (language) KDevelop::CodeCompletionModel::completionInvokedInternal: Found context is not current. Its revision is
kdevelop(3978)/kdevplatform (language) KDevelop::CodeCompletionModel::completionInvokedInternal: apply specialization: (161, 35)
kdevelop(3978)/kdevplatform (language) KDevelop::CodeCompletionModel::completionInvokedInternal: context at (161, 35) : 0x89213b0 "fetchCities" [ (137, 37)  ->  (224, 5) ]
kdevelop(3978)/kdevplatform (language) KDevelop::CodeCompletionModel::completionInvokedInternal: after specialization: "fetchCities" [ (137, 37)  ->  (224, 5) ]
kdevelop(3978)/kdevplatform (language) KDevelop::CodeCompletionModel::completionInvokedInternal: context is set to 0x89213b0
kdevelop(3978)/kdevplatform (language) KDevelop::CodeCompletionWorker::computeCompletions: "fetchCities"
kdevelop(3978)/kdevplatform (language) KDevelop::CodeCompletionWorker::computeCompletions: added text: "cap"
kdevelop(3978)/kdevplatform (language) KDevelop::CodeCompletionContext::log: CodeCompletionContext: "non-processed text: {
    global $DB;

        if ( !$region_id ) {
            return array();
        }

        // Получаем перечень городов в регионе
        $cities = $DB->fetchAssoc("id", "
            SELECT
                `city_id` AS `id`,
                `title_ru` AS `title`,
                `title_ru_genitive` AS `title_genitive`,
                IF(`city_id`=`capital_id`, 1, 0) AS `cap`
            FROM
                `cities`
                INNER JOIN `regions` ON `cities`.`region_id`=`regions`.`region_id`
            WHERE
                `region_id` = ?
            ORDER BY
                `title_ru`",
            $region_id);

        foreach ( $cities as $cur_id=>$cur_item ) {
            if ( $cities[$cur_id][""
kdevelop(3978)/kdevplatform (language) KDevelop::CodeCompletionContext::log: CodeCompletionContext: "added start tag: {
    global $DB;

        if ( !$region_id ) {
            return array();
        }

        // Получаем перечень городов в регионе
        $cities = $DB->fetchAssoc("id", "
            SELECT
                `city_id` AS `id`,
                `title_ru` AS `title`,
                `title_ru_genitive` AS `title_genitive`,
                IF(`city_id`=`capital_id`, 1, 0) AS `cap`
            FROM
                `cities`
                INNER JOIN `regions` ON `cities`.`region_id`=`regions`.`region_id`
            WHERE
                `region_id` = ?
            ORDER BY
                `title_ru`",
            $region_id);

        foreach ( $cities as $cur_id=>$cur_item ) {
            if ( $cities[$cur_id][""
kdevelop(3978)/kdevplatform (language) KDevelop::CodeCompletionContext::log: CodeCompletionContext: " ["
kdevelop(3978)/kdevplatform (language) KDevelop::CodeCompletionContext::log: CodeCompletionContext: " ["
kdevelop(3978)/kdevplatform (language) KDevelop::CodeCompletionContext::log: CodeCompletionContext: "NoMemberAccess"
kdevelop(3978)/kdevplatform (language) KDevelop::CodeCompletionContext::log: CodeCompletionContext: "returning early"
kdevelop(3978)/kdevelop (php support) Php::CodeCompletionContext::completionItems: setContext: using all declarations visible: 6621
kdevelop: Fatal IO error: client killed
KCrash: Application 'kdevelop' crashing...
Comment 3 Milian Wolff 2009-08-25 12:42:14 UTC
I cannot reproduce it. A proper backtrace would also be nice to have.

Just to make sure:

killall kdevelop
rm -Rf ~/.kdevduchain
kdevelop
Comment 4 Victor Grischenko 2009-08-25 14:18:23 UTC
It seems deleting "~/.kdevduchain" fixes this bug.