Public bug reported:

Binary package hint: python-uno

$ lsb_release -d
    Description:    Ubuntu 8.04.1

python-uno ersion: 1:2.4.1-1ubuntu2

The python script that causes this so small I can include it in line
{{{
#!/usr/bin/python
import sys, uno, unohelper

# get the uno component context from the PyUNO runtime
ctx = uno.getComponentContext()
smgr = ctx.ServiceManager
xToolkit = smgr.createInstance( "com.sun.star.awt.Toolkit")
unohelper.inspect(xToolkit, sys.stdout)
}}}

Saving this to a text file "test.py" and executing
    python test.py
produces
    Segmentation fault

I installed debugging symbols; here's the stack trace i got from gdb

#0  0xb68b60c7 in Application::IsInMain () from 
/usr/lib/openoffice/program/libvcl680li.so
#1  0xb6d9a2ba in VCLXToolkit_CreateInstance () from 
/usr/lib/openoffice/program/libtk680li.so
#2  0xb7b14373 in cppu::OSingleFactoryHelper::createInstanceEveryTime () from 
/usr/lib/openoffice/program/libuno_cppuhelpergcc3.so.3
#3  0xb7b10180 in cppu::OSingleFactoryHelper::createInstanceWithContext () from 
/usr/lib/openoffice/program/libuno_cppuhelpergcc3.so.3
#4  0xb7b110e9 in cppu::OFactoryComponentHelper::createInstanceWithContext () 
from /usr/lib/openoffice/program/libuno_cppuhelpergcc3.so.3
#5  0xb7b13e18 in cppu::ORegistryFactoryHelper::createInstanceEveryTime () from 
/usr/lib/openoffice/program/libuno_cppuhelpergcc3.so.3
#6  0xb7b10180 in cppu::OSingleFactoryHelper::createInstanceWithContext () from 
/usr/lib/openoffice/program/libuno_cppuhelpergcc3.so.3
#7  0xb7b110e9 in cppu::OFactoryComponentHelper::createInstanceWithContext () 
from /usr/lib/openoffice/program/libuno_cppuhelpergcc3.so.3
#8  0xb76edbcd in stoc_smgr::OServiceManager::createInstanceWithContext () from 
/usr/lib/openoffice/program/bootstrap.uno.so
#9  0xb76e87d7 in stoc_smgr::OServiceManager::createInstance () from 
/usr/lib/openoffice/program/bootstrap.uno.so
#10 0xb7f3bae3 in callVirtualMethod () from 
/usr/lib/openoffice/program/libgcc3_uno.so
#11 0xb7f3bdcf in cpp_call () from /usr/lib/openoffice/program/libgcc3_uno.so
#12 0xb7f3c230 in bridges::cpp_uno::shared::unoInterfaceProxyDispatch () from 
/usr/lib/openoffice/program/libgcc3_uno.so
#13 0xb6e85f3a in stoc_corefl::IdlInterfaceMethodImpl::invoke () from 
/usr/lib/openoffice/program/reflection.uno.so
#14 0xb6ed49cc in stoc_inv::Invocation_Impl::invoke () from 
/usr/lib/openoffice/program/invocation.uno.so
#15 0xb7bb526e in pyuno::PyUNO_callable_call () from 
/usr/lib/openoffice/program/libpyuno.so
#16 0x0805cb37 in PyObject_Call ()
#17 0x080c7987 in PyEval_EvalFrameEx ()
#18 0x080cb0d7 in PyEval_EvalCodeEx ()
#19 0x080cb227 in PyEval_EvalCode ()
#20 0x080ea6d8 in PyRun_FileExFlags ()
#21 0x080ea979 in PyRun_SimpleFileExFlags ()
#22 0x08059335 in Py_Main ()
#23 0x080587f2 in main ()

{{{
$ dpkg -l '*dbgsym*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-f/Unpacked/Failed-cfg/Half-inst/t-aWait/T-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name                           Version                        Description
+++-==============================-==============================-============================================================================
ii  openoffice.org-base-core-dbgsy 1:2.4.1-1ubuntu2               debug symbols 
for package openoffice.org-base-core
ii  openoffice.org-core-dbgsym     1:2.4.1-1ubuntu2               debug symbols 
for package openoffice.org-core
ii  openoffice.org-dev-dbgsym      1:2.4.1-1ubuntu2               debug symbols 
for package openoffice.org-dev
ii  openoffice.org-headless-dbgsym 1:2.4.1-1ubuntu2               debug symbols 
for package openoffice.org-headless
ii  openoffice.org-impress-dbgsym  1:2.4.1-1ubuntu2               debug symbols 
for package openoffice.org-impress
ii  openoffice.org-kde-dbgsym      1:2.4.1-1ubuntu2               debug symbols 
for package openoffice.org-kde
ii  openoffice.org-ogltrans-dbgsym 1:2.4.1-1ubuntu2               debug symbols 
for package openoffice.org-ogltrans
}}}

What should have happened:
    A meaningful exception (or no exception), justifying python as a quick-test 
tool for ideas.

What did happen:
   Whether I wanted to or not, a headlong dive into Ububtu / Debian package 
management.

First I posted

    https://answers.edge.launchpad.net/ubuntu/+source/kdevelop/+question/40081
    How do I step through the source code of    installed packages?
(thanks for your responses)
and realised that
1. It's quite uncommon for people to debug / step through installed binary 
packages - the de-facto approach is to build from source with debugging 
information and optimisation off, and step through that.
2. kdbg / gdb has no way of knowing (that I can find) where the source code for 
a loaded library / program is, even with the debug info package for that 
package installed.
3. sudo apt-get source <packagename> doesn't apply to OpenOffice.org - I got 
the following message when I tried:
    $ apt-get -s source openoffice.org-core
    NOTICE: 'openoffice.org' packaging is maintained in the 'Bzr' version 
control system at:
    http://bazaar.launchpad.net/~openoffice-pkgs/openoffice/2.4.1-hardy
    Please use:
    bzr get http://bazaar.launchpad.net/~openoffice-pkgs/openoffice/2.4.1-hardy
    to retrieve the latest (possible unreleased) updates to the package.
4. According to the apt-get man page, in the "source" command section:
"Note that source packages are not tracked like binary packages, they exist 
only in the current directory and are similar to downloading source tar balls.".
5. <trawls the net some more> I found
    http://openoffice.debian.net/build.html
    Building OpenOffice.org 2.2.1 from the latest apt-gettable Debian sources
It suggested that I
    apt-get update
    apt-get build-dep openoffice.org
    apt-get source openoffice.org
(which doesn't apply to Ubuntu, I guess)
In Ubuntu, OpenOffice.org is stored on Bazaar
6. OpenOffice.org is stored on Bazaar in 'bzip2 compressed archives' so I 
couldn't just point gdb at the expanded source tree.
sudo apt-get install bzr
bzr get http://bazaar.launchpad.net/~openoffice-pkgs/openoffice/2.4.1-hardy
for which I would need about 6GB of free disk space and (from previous 
experience).
    dpkg-buildpackage -uc -us -rfakeroot
7. dpkg-buildpackage -uc -us -rfakeroot failed as I needed to
sudo apt-get install bison flex-old libpam0g-dev libxaw7-dev libfontconfig1-dev 
zlib1g-dev libfreetype6-dev libx11-dev libsm-dev libxt-dev libxext-dev 
libxtst-dev libice-dev libsane-dev libxrender-dev libcupsys2-dev 
libarchive-zip-perl libpng12-dev libjpeg62-dev libxml2-dev libldap2-dev 
libexpat1-dev libgnomevfs2-dev fastjar imagemagick netpbm libxkbfile-dev 
libxinerama-dev x11proto-render-dev unixodbc-dev gperf libpq-dev libxrandr-dev 
translate-toolkit libgl1-mesa-dev libglu1-mesa-dev libcurl4-openssl-dev 
libssl-dev libdb4.6-dev java-gcj-compat-dev libgcj-bc libxalan2-java 
libjcommon-java libsac-java libxml-java libflute-1.3-jfree-java 
libpentaho-reporting-flow-engine-java liblayout-java libloader-java 
libformula-java librepository-java libfonts-java libjcommon-serializer-java 
xulrunner-1.9-dev dmake mono-mcs mono-gmcs libmono-dev mono-utils 
cli-common-dev mono-1.0-devel mono-2.0-devel libhunspell-dev libboost-dev 
libvigraimpex-dev libwpd8-dev libwps-dev libwpg-dev libicu-dev libxslt1-dev 
libcairo2-dev kdelibs4-dev libhsqldb-java bsh libdbus-glib-1-dev 
libgstreamer-plugins-base0.10-dev libneon27-dev libgtk2.0-dev

Actually dpkg-buildpackage included version constraints in brackets for the 
required packages. I won't repeat them here as I don't want to waste your time 
unnecessarily.
>From building it before on Fedora 8 this would take up most of the day on my 
>puny 1GHz pentium III with only 512MB RAM.

8. The recommended location for source files
    http://proton.pathname.com/fhs/pub/fhs-2.3.html#USRSRCSOURCECODE
    Filesystem Hierarchy Standard
I found the section on
    /usr/src Source code (optional)
I'm guessing that I need to install the source code here.

Speaking of Fedora, kdbg integration is somewhat more integrated and will 
recommend
    debuginfo-install <package name>
this downloads and installs debugging symbol information and the source code in 
a well known location.

9. The debugging information in the debugging packages doesn't include
source file and line number information.

I eagerly look forward to a considered response.

** Affects: openoffice.org (Ubuntu)
     Importance: Undecided
         Status: New

-- 
python-uno segfaults
https://bugs.launchpad.net/bugs/251427
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to