[BlackBerry-Python] PySide for BB10

Martin Kolman martin.kolman at gmail.com
Tue Jan 15 08:52:57 EST 2013


> On 2013-01-09 09:21, Martin Kolman wrote:
>> Process 30396593 (python3.2) terminated SIGSEGV code=1 fltno=11
>> ip=783abf7c(/base/lib/libcpp.so.4 at _ZNKSt6locale9_GetfacetEj+0x27)
>> mapaddr=0002bf7c. ref=00000010
>
> Looking at this now, it stirs vague memories from when Ritesh and I
> were building things in early summer and, I think, we had
> complications with using qcc versus gcc... does that ring a bell
> Ritesh?  I think we had to force certain things in the command line
> arguments which, if true, might be visible in our build instructions.
> I'm personally too long out of the C++ world to really be much help on
> such things.
>
>> BB10 doesn't like loading additional libraries using LD_LIBRARY_PATH
>> This is just a guess, but maybe it kills the app when it tries to load a
>> library from its own data folder.
>
> I can eliminate this as a possibility. I've loaded .so files from
> system folders, the app's own app/native folder, the app's data/
> folder, and even shared/misc without issue, whether the folder is in
> the LD_LIBRARY_PATH or not (i.e. giving full path works too).
>
>> bad Python interpreter
>> Maybe the Python 3.2 interpreter on the device is bad and can't handle
>> the PySide import ?
>
> Almost certainly not the case either, since we've never been able to
> blame anything on the prebuilt interpreter yet. They've actually made
> the source available in a private repo, and some of us have reviewed
> it a bit. It's pretty vanilla, with a few QNX-isms but nothing that
> I'd expect is relevant here. Anything's possible of course, but this
> one seems very unlikely.
>
>> Any help will be much appreciated! :)
>
> Micke, Ritesh, does his segfault ring a bell?  Somehow I think this
> one's actually got a simple fix but I've erased too many
> PySide-related things from my brain in the last few months.
>
> -Peter
> _______________________________________________
> BlackBerry-Python mailing list
> BlackBerry-Python at engcorp.com
> http://www.engcorp.com/mailman/listinfo/blackberry-python
Looks like I've sent this just to Peter and not to the ML, so reposting.

I managed to get some more output using the the -v -d  flags for the 
interpreter.

Full log of a build using the on-device libraries:
https://gist.github.com/4505072

There is also some additional debugging output I've added mixed in (it 
prints current environment and ascending numbers during PySide module 
import).

Excerpt from probably the most interesting part:

>>> import bbpy

import bbpy # directory bbpy

# bbpy/__pycache__/__init__.cpython-32.pyc matches bbpy/__init__.py

import bbpy # precompiled from bbpy/__pycache__/__init__.cpython-32.pyc

import pprint # precompiled from /usr/lib/python3.2/pprint.pyc

# bbpy/__pycache__/app.cpython-32.pyc matches bbpy/app.py

import bbpy.app # precompiled from bbpy/__pycache__/app.cpython-32.pyc

1

import PySide # directory PySide

# PySide/__pycache__/__init__.cpython-32.pyc matches PySide/__init__.py

import PySide # precompiled from PySide/__pycache__/__init__.cpython-32.pyc

dlopen("PySide/QtCore.so", 2);



Process 33235134 (python3.2) terminated SIGSEGV code=1 fltno=11 
ip=7841bf7c(/base/lib/libcpp.so.4 at _ZNKSt6locale9_GetfacetEj+0x27) 
mapaddr=0002bf7c. ref=00000010

Memory fault (core dumped)

$

So it looks like it segfaults when it tries to import the QtCore.so 
library from PySide (that provides bindings for the Qt QtCore module ?).
It does the same for any other submodule though. Some examples:

>>> import PySide.QtScript
import PySide # directory PySide
# PySide/__pycache__/__init__.cpython-32.pyc matches PySide/__init__.py
import PySide # precompiled from PySide/__pycache__/__init__.cpython-32.pyc
dlopen("PySide/QtScript.so", 2);

Process 33521843 (python3.2) terminated SIGSEGV code=1 fltno=11 
ip=782fbf7c(/base/lib/libcpp.so.4 at _ZNKSt6locale9_GetfacetEj+0x27) 
mapaddr=0002bf7c. ref=00000010
Memory fault (core dumped)

>>> import PySide.QtXml
import PySide # directory PySide
# PySide/__pycache__/__init__.cpython-32.pyc matches PySide/__init__.py
import PySide # precompiled from PySide/__pycache__/__init__.cpython-32.pyc
dlopen("PySide/QtXml.so", 2);

Process 33570995 (python3.2) terminated SIGSEGV code=1 fltno=11 
ip=7839bf7c(/base/lib/libcpp.so.4 at _ZNKSt6locale9_GetfacetEj+0x27) 
mapaddr=0002bf7c. ref=00000010
Memory fault (core dumped)


Best wishes
Martin Kolman


More information about the BlackBerry-Python mailing list