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 880 - After freezed, exe will crash if QtDeclarative is imported in the python script
: After freezed, exe will crash if QtDeclarative is imported in the python script
Status: CLOSED INVALID
Product: PySide
Classification: Unclassified
Component: QtDeclarative
: HEAD
: PC MS Windows XP/Vista/7
: P5 major
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2011-06-09 18:36 EEST by yi.cui
Modified: 2011-06-22 20:25 EEST (History)
8 users (show)

See Also:


Attachments
the python script for test (199 bytes, text/plain)
2011-06-09 18:36 EEST, yi.cui
Details
the script for py2exe (158 bytes, text/plain)
2011-06-09 18:37 EEST, yi.cui
Details
dist folder created by py2exe (40.68 KB, image/jpeg)
2011-06-09 18:39 EEST, yi.cui
Details

Note You need to log in before you can comment on or make changes to this bug.
Description yi.cui 2011-06-09 18:36:11 EEST
Created attachment 336 [details]
the python script for test

Reproduce steps:

1. Write a simple python script and import QtDeclarative. For example,
hello.py:

import sys

from PySide.QtCore import QUrl
from PySide.QtGui import QApplication, QIcon
from PySide.QtDeclarative import QDeclarativeView


if __name__ == '__main__':

    sys.exit()

2. Use py2exe or cx-freeze to freeze the hello.py and get an exe named
hello.exe.

3. Run hello.exe then Windows report access violation error.

4. In hello.py, remove "from PySide.QtDeclarative import QDeclarativeView" and
repeat step 2 to step 3. It will run with no error.
Comment 1 yi.cui 2011-06-09 18:37:07 EEST
Created attachment 337 [details]
the script for py2exe
Comment 2 yi.cui 2011-06-09 18:39:37 EEST
Created attachment 338 [details]
dist folder created by py2exe

The picture showes that py2exe copied the right dlls.
Comment 3 Hugo Parente Lima 2011-06-10 00:36:02 EEST
Your application works without py2exe? If it works then it's not a PySide bug,
but something you forgot on the freeze process, better to ask this on our
mailing list where you can find people experienced in freezeing PySide
applications.
Comment 4 yi.cui 2011-06-10 05:03:29 EEST
(In reply to comment #3)
> Your application works without py2exe? If it works then it's not a PySide bug,
> but something you forgot on the freeze process, better to ask this on our
> mailing list where you can find people experienced in freezeing PySide
> applications.

No, it's not the case. py2exe works correctly. See the picture of attchment #3.
The exe generated and all dlls copied. The problem is, as I attached in
attachment #1 [details], if this line is in hello.py, "from PySide.QtDeclarative import
QDeclarativeView", the exe will crash. After remove this line, the exe works
just fine.
Comment 5 Hugo Parente Lima 2011-06-13 22:05:16 EEST
(In reply to comment #4)
> (In reply to comment #3)
> > Your application works without py2exe? If it works then it's not a PySide bug,
> > but something you forgot on the freeze process, better to ask this on our
> > mailing list where you can find people experienced in freezeing PySide
> > applications.
> 
> No, it's not the case. py2exe works correctly. See the picture of attchment #3.
> The exe generated and all dlls copied. The problem is, as I attached in
> attachment #1 [details], if this line is in hello.py, "from PySide.QtDeclarative import
> QDeclarativeView", the exe will crash. After remove this line, the exe works
> just fine.

Probably py2exe forgot to put some Qt plugin or something needed by
QtDeclarative module into your executable causing it to crash.

As the code works on normal PySide installation this is not really a bug but an
issue with py2exe, again I recommend you to ask for help on PySide mailing list
about py2exe.

Regards.
Comment 6 renato filho 2011-06-22 20:25:21 EEST
release 1.0.4