PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 703 - Pyside segfaults on event overriding
: Pyside segfaults on event overriding
Status: CLOSED WORKSFORME
Product: PySide
Classification: Unclassified
Component: PySide
: 1.0.0 rc1
: N900 Maemo5/Fremantle
: P4 normal
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2011-02-26 14:28 EET by Oleg Kandaurov
Modified: 2011-04-29 18:08 EEST (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Kandaurov 2011-02-26 14:28:05 EET
I run example that are posted below and pyside segfaults on ctrl+enter
pressing.
P.S. I use scratchbox 1.0.16 and pyside-rc1

import os, sys
from PySide.QtGui import *
from PySide.QtCore import *

class SpecialDialog(QDialog):
    def __init__(self, parent = None):
        QDialog.__init__(self, parent)
        editor = QTextEdit()
        layout = QVBoxLayout()
        layout.addWidget(editor)
        self.setLayout(layout)

    def event(self, event):
        '''Accept dialog on Ctrl+Enter'''
        if isinstance(event, QKeyEvent):
            if event.modifiers() == Qt.ControlModifier:
                if event.key() == Qt.Key_Return:
                    self.accept()
                    return True
        return QDialog.event(self, event)

if __name__ == '__main__':
    app = QApplication(sys.argv)
    window = QMainWindow()
    dialog = SpecialDialog(window)
    window.show()
    dialog.show()
    sys.exit(app.exec_())
    pass
Comment 1 Hugo Parente Lima 2011-02-28 14:55:33 EET
I did can't reproduce this.

My tests:

* Running on desktop (x86_64):

Works, hitting ctrl+enter closes the dialog.

* Running on N900, but with X11 redirected to a desktop:

Works, hitting ctrl+enter closes the dialog.

* Running on N900, using the n900 keyboard:

ctrl+enter does nothing, I guess it's a hildon/n900/x11 issue because the
ctrl+enter event isn't created at all.

I didn't check inside scratchbox x86 nor armel. Did you test it on device?
Comment 2 Oleg Kandaurov 2011-02-28 16:00:18 EET
Yes, i have tested this bug on device and all works fine. It seems that the bug
appears in Scratchbox only. We develop on Scrathbox, thats why we have to use
workaround regardless of bug missing on another platforms.
Comment 3 Hugo Parente Lima 2011-02-28 16:31:20 EET
Ah, ok, I'm prioritizing as P3[1] as it works on desktop and on the device,
this can be a hidden bug that only show his face on scratchbox or a problem on
qemu/scratchbox.

Are you trying on scratchbox ARMEL or scratchbox x86? Or the bug happen on
both?

[1] This could be a P2 too if some dev. rise a hand asking about it.
Comment 4 Oleg Kandaurov 2011-02-28 16:46:39 EET
I try it only on x86.
Comment 5 Matti Airas 2011-03-01 06:23:18 EET
I'd recommend developing directly on the device instead of using Scratchbox, or
at least being prepared for issues on Scratchbox. I'd vote for following the
Nokia-internal practice that bugs need to be reproduced on the device to be
valid, and therefore resolving the bug as invalid or wontfix (or at least
prioritizing it rather low).
Comment 6 Hugo Parente Lima 2011-03-01 11:46:30 EET
(In reply to comment #5)
> I'd recommend developing directly on the device instead of using Scratchbox, or
> at least being prepared for issues on Scratchbox. I'd vote for following the
> Nokia-internal practice that bugs need to be reproduced on the device to be
> valid, and therefore resolving the bug as invalid or wontfix (or at least
> prioritizing it rather low).

I agree with that policy, scratchbox is a workaround by their nature, in a
different scale we could say that is like reporting a bug in a Windows app
because it doesn't run on wine.

Anyway, why do you don't develop directly on device? IMO is the better way, to
be true IMO any way of avoiding scratchbox is the better way =] , just turn on
the ssh and mount it using sshfs on your desktop.

P.S.: Waiting for one more core dev vote to start using the policy suggested by
Matti.
Comment 7 Hugo Parente Lima 2011-03-15 22:36:16 EET
Lowering the priority as suggested by Matti.
Comment 8 renato filho 2011-03-15 23:32:23 EET
In my opinion this is a critical bug, this can be a hidden bug which appears on
 sbox for some reason, and can be related with the several problems pointed by
Odyx on bug #733. I think we need investigate a bit more the problem before
lowering the priority. Only because that runs fine on Desktop does not make
this bug less significant or less critical, we need check the core dump then
take some conclusion. I will try do this ASAP, but for now I recommend keep
this as P3 or P2, because this is a segfault without explanation.
Comment 9 Hugo Parente Lima 2011-03-17 21:38:33 EET
The problem is that it doesn't segfault on platform X, it segfaults when we try
to emulate the platform X under platform Y, there are many layers between X and
Y, I would even say that X isn't X, it's X' :-)
Comment 10 Matti Airas 2011-03-18 11:17:23 EET
Yep, Scratchbox can cause all kinds of weird behaviour without the issues being
bugs anywhere else but in Scratchbox itself - the bug should be reproduced on
real hardware before investing time on it.
Comment 11 Marcelo Lira 2011-04-05 21:59:20 EEST
It worked on scratchbox on my Ubuntu 64bits.
Comment 12 renato filho 2011-04-29 18:08:01 EEST
PySide release 1.0.2