| Summary: | KOrganizer KPart crashes calling "create" from factory | ||
|---|---|---|---|
| Product: | [Applications] korganizer | Reporter: | Giacomo Lacava <g.lacava> |
| Component: | general | Assignee: | kdepim bugs <pim-bugs-null> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | crash | CC: | andresbajotierra |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Ubuntu | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
The code producing the crash:
#!/usr/bin/env python
import sys
from PyKDE4.kdecore import *
from PyKDE4.kdeui import *
from PyKDE4.kparts import *
from PyQt4.QtGui import QLabel
class MainWindow (KMainWindow):
def __init__ (self):
KMainWindow.__init__(self)
#self.resize(640, 480)
factory = KLibLoader.self().factory("korganizerpart")
#--- below line will crash ---#
part = factory.create(self, "KOrganizerPart")
self.setCentralWidget(part.topLevelWidget())
#--------------- main ------------------
if __name__ == '__main__':
appName = "korganizerpart_example"
catalog = ""
programName = ki18n("KOrganizer Part Example")
version = "1.0"
description = ki18n("Example loading a KOrganizer Part")
license = KAboutData.License_GPL
copyright = ki18n("none")
text = ki18n("none")
homePage = "blog.pythonaro.com"
bugEmail = "g.lacava@gmail.com"
aboutData = KAboutData(appName, catalog, programName, version, description,
license, copyright, text, homePage, bugEmail)
KCmdLineArgs.init(sys.argv, aboutData)
app = KApplication()
mainWindow = MainWindow()
mainWindow.show()
app.exec_()
this has nothing to do with kdevelop, reassigning. please take a look at where you report bugs. Yeah, sorry, I noticed it already and cloned it. Unfortunately, the bug wizard returns a generic "Language Support: Python" when you search for "python", maybe it should be made explicit that that's a KDevelop-only category. [Comment from a bug triager] The KOrganizer KPart bug is being tracked at bug 205713. Merging. Thanks *** This bug has been marked as a duplicate of bug 205713 *** |
Version: (using KDE 4.3.3) OS: Linux Installed from: Ubuntu Packages Application that crashed: test.py Version of the application: 1.0 KDE Version: 4.3.3 (KDE 4.3.3) Qt Version: 4.5.2 Operating System: Linux 2.6.31-15-generic i686 Distribution: Ubuntu 9.10 What I was doing when the application crashed: This is a test python file to instantiate the KOrganizer KPart, mirroring the official KatePart example from PyKDE. Just launching the program results in a crash when the factory object is invoked to create the actual part (i.e. part = factory.create(self, "KOrganizerPart") -- Backtrace: Application: KOrganizer Part Example (test.py), signal: Segmentation fault [KCrash Handler] #6 QWidget::window (this=0x0) at kernel/qwidget.cpp:3883 #7 0x02a045f9 in QWidget::topLevelWidget (this=0xa5c3a08, parentWidget=0x0, parent=0xa4e23e0, __in_chrg=<value optimized out>, __vtt_parm=<value optimized out>) at /usr/include/qt4/QtGui/qwidget.h:314 #8 KOrganizerPart (this=0xa5c3a08, parentWidget=0x0, parent=0xa4e23e0, __in_chrg=<value optimized out>, __vtt_parm=<value optimized out>) at ../../korganizer/korganizer_part.cpp:53 #9 0x02a055b2 in KPluginFactory::createPartInstance<KOrganizerPart> (parentWidget=0x0, parent=0xa4e23e0, args=...) at /usr/include/kpluginfactory.h:467 #10 0x00f9ce85 in KPluginFactory::create (this=0xa5c2700, iface=0xb78411ec "KOrganizerPart", parentWidget=0x0, parent=0xa4e23e0, args=..., keyword=...) at ../../kdecore/util/kpluginfactory.cpp:191 #11 0x00845997 in ?? () from /usr/lib/pymodules/python2.6/PyKDE4/kdecore.so #12 0x080dc0d0 in call_function (f=0x924484, throwflag=0) at ../Python/ceval.c:3706 #13 PyEval_EvalFrameEx (f=0x924484, throwflag=0) at ../Python/ceval.c:2389 #14 0x080dddf2 in PyEval_EvalCodeEx (co=0xb7822ad0, globals=0xb787b1c4, locals=0x0, args=0xa3e11b8, argcount=1, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at ../Python/ceval.c:2968 #15 0x0816014c in function_call (func=0xa3bcc34, arg=0xa3e11ac, kw=0x0) at ../Objects/funcobject.c:524 #16 0x0806120a in PyObject_Call (func=0xa3bcc34, arg=0xa3e11ac, kw=0x0) at ../Objects/abstract.c:2492 #17 0x080684ac in instancemethod_call (func=0xb7823324, arg=0xa3e11ac, kw=0x0) at ../Objects/classobject.c:2579 #18 0x0806120a in PyObject_Call (func=0xb7823324, arg=0xb784902c, kw=0x0) at ../Objects/abstract.c:2492 #19 0x080aea8e in slot_tp_init (self=0xa3badec, args=0xb784902c, kwds=0x0) at ../Objects/typeobject.c:5638 #20 0x080aa165 in type_call (type=0xa44c71c, args=0xb784902c, kwds=0x0) at ../Objects/typeobject.c:747 #21 0x0806120a in PyObject_Call (func=0xa44c71c, arg=0xb784902c, kw=0x0) at ../Objects/abstract.c:2492 #22 0x080dbc3c in do_call (f=0xa2556f4, throwflag=0) at ../Python/ceval.c:3924 #23 call_function (f=0xa2556f4, throwflag=0) at ../Python/ceval.c:3729 #24 PyEval_EvalFrameEx (f=0xa2556f4, throwflag=0) at ../Python/ceval.c:2389 #25 0x080dddf2 in PyEval_EvalCodeEx (co=0xb7822848, globals=0xb787b1c4, locals=0xb787b1c4, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at ../Python/ceval.c:2968 #26 0x080ddef7 in PyEval_EvalCode (co=0xb7822848, globals=0xb787b1c4, locals=0xb787b1c4) at ../Python/ceval.c:522 #27 0x080faa1f in run_mod (fp=0xa24dc78, filename=0xbf911454 "test.py", start=257, globals=0xb787b1c4, locals=0xb787b1c4, closeit=1, flags=0xbf90f70c) at ../Python/pythonrun.c:1335 #28 PyRun_FileExFlags (fp=0xa24dc78, filename=0xbf911454 "test.py", start=257, globals=0xb787b1c4, locals=0xb787b1c4, closeit=1, flags=0xbf90f70c) at ../Python/pythonrun.c:1321 #29 0x080fac12 in PyRun_SimpleFileExFlags (fp=0xa24dc78, filename=0xbf911454 "test.py", closeit=1, flags=0xbf90f70c) at ../Python/pythonrun.c:931 #30 0x0805c8d8 in Py_Main (argc=2, argv=0xbf90f7f4) at ../Modules/main.c:599 #31 0x0805baeb in main (argc=2, argv=0xbf90f7f4) at ../Modules/python.c:23