https://bugs.kde.org/show_bug.cgi?id=385413
RJVB <rjvber...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #108501|0 |1 is obsolete| | --- Comment #20 from RJVB <rjvber...@gmail.com> --- Created attachment 108507 --> https://bugs.kde.org/attachment.cgi?id=108507&action=edit test cstyle.js Prints indent line=84 indentWidth=4 ch= indent linenr=880 indent linenr=882 indent linenr=886 indentLine line=84 linenr=746 isComment: Check mode @ Cursor(83,4): ISO C++:Control Flow tryCComment linenr=292 indentLine filler=-1 linenr=757 indentLine filler=-1 linenr=761 indentLine filler=-1 linenr=765 indentLine filler=-1 linenr=769 indentLine filler=-1 linenr=773 indentLine filler=-1 linenr=777 tryCondition currentLine=83 linenr=488 tryCondition currentString=" return decl;" lastPos=15 lastChar=; linenr=495 tryCondition currentIndentation=4 linenr=509 tryCondition decr currentLine=83 lineDelimiter=10 linenr=513 tryCondition firstPosVirtual=4 linenr=519 tryCondition decr currentLine=82 lineDelimiter=9 linenr=513 tryCondition firstPosVirtual=8 linenr=519 tryCondition decr currentLine=81 lineDelimiter=8 linenr=513 tryCondition firstPosVirtual=12 linenr=519 tryCondition decr currentLine=80 lineDelimiter=7 linenr=513 tryCondition firstPosVirtual=8 linenr=519 tryCondition decr currentLine=79 lineDelimiter=6 linenr=513 tryCondition firstPosVirtual=8 linenr=519 tryCondition decr currentLine=78 lineDelimiter=5 linenr=513 tryCondition firstPosVirtual=8 linenr=519 tryCondition decr currentLine=77 lineDelimiter=4 linenr=513 tryCondition firstPosVirtual=8 linenr=519 tryCondition decr currentLine=76 lineDelimiter=3 linenr=513 tryCondition firstPosVirtual=4 linenr=519 tryCondition decr currentLine=75 lineDelimiter=2 linenr=513 tryCondition firstPosVirtual=4 linenr=519 tryCondition decr currentLine=74 lineDelimiter=1 linenr=513 tryCondition firstPosVirtual=4 linenr=519 Process 28235 stopped * thread #1, name = 'kate', stop reason = signal SIGSEGV: invalid address (fault address: 0x0) The crashing line would be either the `if (firstPosVirtual < currentIndentation)` expression, or else something happens unwinding the stack when coming out of the while loop. If it helps, this is the C++ function in which I'm testing (lines 66-85): ``` 66 Declaration* usefulDeclaration(Declaration* decl) 67 { 68 if (!decl) 69 return nullptr; 70 71 // First: Attempt to find the declaration of a definition 72 decl = DUChainUtils::declarationForDefinition(decl); 73 74 // Convenience feature: Retrieve the type declaration of instances, 75 // it makes no sense to pass the declaration pointer of instances of types 76 if (decl->kind() == Declaration::Instance) { 77 AbstractType::Ptr type = TypeUtils::targetTypeKeepAliases(decl->abstractType(), decl->topContext()); 78 IdentifiedType* idType = dynamic_cast<IdentifiedType*>(type.data()); 79 Declaration* idDecl = idType ? idType->declaration(decl->topContext()) : nullptr; 80 if (idDecl) { 81 decl = idDecl; 82 } 83 } 84 return decl; 85 } ``` -- You are receiving this mail because: You are watching all bug changes.