Bug 426561

Summary: Crash on startup while parsing python code
Product: [Applications] kdevelop Reporter: Gaël de Chalendar (aka Kleag) <kleagg>
Component: generalAssignee: kdevelop-bugs-null
Status: RESOLVED DUPLICATE    
Severity: crash CC: mail, mail
Priority: NOR Keywords: drkonqi
Version: 5.6.0   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: New crash information added by DrKonqi

Description Gaël de Chalendar (aka Kleag) 2020-09-15 14:03:31 UTC
Application: kdevelop (5.6.0)

Qt Version: 5.15.0
Frameworks Version: 5.74.0
Operating System: Linux 5.4.0-47-generic x86_64
Windowing system: X11
Distribution: KDE neon User Edition 5.19

-- Information about the crash:
- What I was doing when the application crashed:
Starting kdevelop. Waiting without doing anything that the sources parser finish. Several python projects loaded and one LUA project.

- Custom settings of the application:
Just changed the environment, starting with a virtualenvwrapper initialized with the modules used in a project loaded (numpy, torch, torchvision, spacy). 
Also activated every possible config elements in kdevelop code parsing settings.

The crash can be reproduced every time.

-- Backtrace (Reduced):
#4  0x00007f816fda0d07 in Python::PythonAstTransformer::visitNode(_expr*) (this=this@entry=0x7f8105ff97e0, node=0x1) at ./parser/generated.h:164
#5  0x00007f816fda123a in Python::PythonAstTransformer::visitNode(_expr*) (this=this@entry=0x7f8105ff97e0, node=0x7f80e8fea828) at ./parser/generated.h:323
#6  0x00007f816fda315b in Python::PythonAstTransformer::visitNodeList<_expr, Python::ExpressionAst>(asdl_seq*) (node=0x7f80e8fea7e0, this=0x7f8105ff97e0) at ./parser/generated.h:38
#7  Python::PythonAstTransformer::visitNode(_slice*) (this=this@entry=0x7f8105ff97e0, node=<optimized out>) at ./parser/generated.h:513
#8  0x00007f816fda1673 in Python::PythonAstTransformer::visitNode(_expr*) (this=this@entry=0x7f8105ff97e0, node=0x7f80e8fea888) at ./parser/generated.h:354


Reported using DrKonqi
Comment 1 Gaël de Chalendar (aka Kleag) 2020-09-15 14:03:32 UTC
Created attachment 131676 [details]
New crash information added by DrKonqi

DrKonqi auto-attaching complete backtrace.
Comment 2 Gaël de Chalendar (aka Kleag) 2020-09-15 14:15:33 UTC
Even after removing duchain cache and stopping background syntax analyzer, it continues to crash.

Correction: after several restarts and several cache removing, it stopped to crash.


When it crashed, messages in the console were:

Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
created new snippet repo "/home/gael/.local/share/ktexteditor_snippets/data/Bash.xml" SnippetRepository(0x55bbb316b110)
Hspell: can't open /usr/share/hspell/hebrew.wgz.sizes.
kf.sonnet.clients.hspell: HSpellDict::HSpellDict: Init failed
kf.kio.widgets.kdirmodel: protocol mismatch: "" vs "file"
Cyclic dependency detected between "file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/kirigami.2/styles/org.kde.desktop.plasma/Units.qml" and "file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/kirigami.2/styles/org.kde.desktop.plasma/Units.qml"
qrc:/qml/Develop.qml:139:21: QML Heading: Binding loop detected for property "font.pointSize"
qrc:/qml/area_code.qml:87:9: QML Heading: Binding loop detected for property "font.pointSize"
qrc:/qml/area_code.qml:63:9: QML Heading: Binding loop detected for property "font.pointSize"
qrc:/qml/storage.js:24: TypeError: Cannot call method 'openDatabaseSync' of undefined
kdevelop.plugins.python.duchain: tuple type object is not available
kdevelop.plugins.python.duchain:  [ !!! ] did not get a typetrack container object when expecting one! Fix code / setup.
kdevelop.plugins.python.duchain:  [ !!! ] did not get a typetrack container object when expecting one! Fix code / setup.
kdevelop.plugins.python.duchain: tuple type object is not available
kdevelop.plugins.python.duchain:  [ !!! ] did not get a typetrack container object when expecting one! Fix code / setup.
kdevelop.plugins.python.duchain: tuple type object is not available
kdevelop.plugins.python.duchain: tuple type object is not available
kdevelop.plugins.python.duchain: tuple type object is not available
kdevelop.plugins.python.duchain: tuple type object is not available
python code checker error: "/home/gael/.virtualenvs/pytorch/lib/python3.8/site-packages/pep8.py:110: FutureWarning: Possible nested set at position 1\n  EXTRANEOUS_WHITESPACE_REGEX = re.compile(r'[[({] | []}),;:]')\n"
remaining: 0 1075
kdevplatform.language: Could not open file "/home/gael/.virtualenvs/pytorch/lib/python3.8/site-packages/torch/_C/__init__.py" (path "/home/gael/.virtualenvs/pytorch/lib/python3.8/site-packages/torch/_C/__init__.py" )
OverflowError: Python int too large to convert to C long
kdevplatform.shell: Broken text-document:  QUrl("file:///tmp/kdevelop_HfwQsq.patch")
qrc:/qml/storage.js:24: TypeError: Cannot call method 'openDatabaseSync' of undefined
OverflowError: Python int too large to convert to C long
OverflowError: Python int too large to convert to C long
OverflowError: Python int too large to convert to C long
OverflowError: Python int too large to convert to C long
Unsupported _expr AST type:  37
Unsupported _expr AST type:  7500915
QSocketNotifier: Invalid socket 6 and type 'Read', disabling...
QSocketNotifier: Invalid socket 10 and type 'Read', disabling...
QSocketNotifier: Invalid socket 22 and type 'Read', disabling...
QSocketNotifier: Invalid socket 27 and type 'Read', disabling...
QSocketNotifier: Invalid socket 24 and type 'Read', disabling...
The X11 connection broke (error 1). Did the X11 server die?
ClassDeclarationData::baseClasses There were items left on destruction: 2208
ProblemData::diagnostics There were items left on destruction: 2629
DUContextData::m_uses There were items left on destruction: 29556
Comment 3 Sven Brauch 2020-09-15 15:14:00 UTC
This is a crash in the AST code, seems related to the Python 3.8 changes done very recently probably. What Python version is your KDevelop using?
Comment 4 Francis Herne 2020-09-15 15:15:12 UTC

*** This bug has been marked as a duplicate of bug 426292 ***
Comment 5 Gaël de Chalendar (aka Kleag) 2020-09-15 15:32:39 UTC
Python 3.8.2