Summary: | Python plasmoid causes segfault | ||
---|---|---|---|
Product: | [Plasma] plasma4 | Reporter: | Ronuk Raval <ronuk.raval> |
Component: | scriptengines | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED WORKSFORME | ||
Severity: | crash | CC: | aseigo |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
Small Plasmoid to demonstrate segfault
Plasmoid demonstrating workaround |
Description
Ronuk Raval
2009-08-24 19:46:39 UTC
After some more work, I have located the exact location of the bug: adding a QGraphicsLinearLayout to Plasma::TabBar causes a segfault. Attaching a small test plasmoid to demonstrate this. [rraval@enthalpy]$ plasmapkg -i plasma-applet-segfault.zip Successfully installed /home/eon/Projects/plasma/plasma-applet-segfault.zip [rraval@enthalpy]$ plasmoidviewer plasma-applet-segfault plasmoidviewer(2751)/plasma main: setting FormFactor to "planar" plasmoidviewer(2751)/plasma main: setting Location to "floating" plasmoidviewer(2751)/plasma main: setting containment to "null" plasmoidviewer(2751)/plasma FullView::addApplet: adding applet "plasma-applet-segfault" in "null" plasmoidviewer(2751)/libplasma Plasma::CoronaPrivate::addContainment: loading of containment "null" failed. plasmoidviewer(2751)/libplasma Plasma::AppletPrivate::init: Check your constructor! You probably want to be passing in a Service::Ptr or a QVariantList with a valid storageid as arg[0]. plasmoidviewer(2751)/libplasma Plasma::Applet::load: we have a script using the "python" API plasmoidviewer(2751)/libplasma Plasma::AppletPrivate::setupScriptSupport: setting up script support, package is in "/home/eon/.kde4/share/apps/plasma/plasmoids/plasma-applet-segfault/" which is a "Plasmoid" package , main script is "/home/eon/.kde4/share/apps/plasma/plasmoids/plasma-applet-segfault/contents/code/main.py" plasmoidviewer(2751)/libplasma Plasma::Package::filePath: "/home/eon/.kde4/share/apps/plasma/plasmoids/plasma-applet-segfault/contents/locale" does not exist plasmoidviewer(2751)/libplasma Plasma::Package::filePath: "/home/eon/.kde4/share/apps/plasma/plasmoids/plasma-applet-segfault/contents/config/main.xml" does not exist plasmoidviewer(2751)/libplasma Plasma::Package::filePath: "/home/eon/.kde4/share/apps/plasma/plasmoids/plasma-applet-segfault/contents/ui/config.ui" does not exist KCrash: Application 'plasmoidviewer' crashing... sock_file=/home/eon/.kde4/socket-enthalpy/kdeinit4__0 [1]+ Stopped plasmoidviewer plasma-applet-segfault [rraval@enthalpy]$ Created attachment 36478 [details]
Small Plasmoid to demonstrate segfault
Created attachment 39445 [details]
Plasmoid demonstrating workaround
Apparently this bug gets no love from the powers that be. In any case, I'll document the workaround I've stumbled upon here.
So, plasma segfaults when a QGraphicsLinearLayout is added to a TabBar. However, this crash can be avoided by using a QGraphicsGridLayout to simulate a QGraphicsLinearLayout (i.e. use only one column or row). Adding a QGraphicsGridLayout to a TabBar works as expected.
Attaching a small plasmoid that demonstrates this.
replicating it line by line using javascript, it does not crash. (ignoring the fact that adding the same label to a tab as well as layout in another tab is a bit odd / nonsensical) .. could be a problem in the python bindings, but it certainly does work within plasma (and in scriptengines such as the js one) |