473,480 Members | 1,885 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

sax.make_parser() segfaults

Hi all

I am using Python 2.4.1. I have machines running FC4, RH9, and MSW
Server 2003 for testing.

If I call sax.make_parser() from the interpreter or from a stand-alone
program, it works fine on all machines, but in the following setup it
works correctly on MSW, but segfaults on both FC4 and RH9.

The setup is a client program running wxPython as a gui, and Twisted as
a means of connecting to a server. Both wxPython's and Twisted's main
loops seem to be running ok. I have made a remote call to a Twisted
server, which has returned an xml string. In the callback routine, I
print the xml for debugging purposes, which looks fine, then I call
'parser = sax.make_parser()'. At that point it segfaults.

I added a 'print sax' command just before the call to ensure it is
valid. It displays <module 'xml.sax' from
'/usr/lib/python2.4/xml/sax/__init__.pyc'>, which looks correct.

A little digging reveals that the segfault occurs in
xml/parsers/expat.py, when it tries to execute 'from pyexpat import *'.

On FC4 and RH9, pyexpat.so is in python2.4/lib-dynload. On MSW, there
is a pyexpat.pyd in Python24/DLLSs, and a pyexpat.lib in Python24/libs.
I don't know if any of this is relevant, but I thought I would supply
as much info as possible. As mentioned above, I do not have the problem
with MSW.

Any suggestions will be much appreciated.

Thanks

Frank Millman

Nov 29 '05 #1
4 1840

Frank Millman wrote:
Hi all

I am using Python 2.4.1. I have machines running FC4, RH9, and MSW
Server 2003 for testing.

If I call sax.make_parser() from the interpreter or from a stand-alone
program, it works fine on all machines, but in the following setup it
works correctly on MSW, but segfaults on both FC4 and RH9.

The setup is a client program running wxPython as a gui, and Twisted as
a means of connecting to a server.


Progress report - I have narrowed it down to wxPython. I wrote small
stand-alone programs, one using Twisted, one using wxPython. Twisted
works fine, wxPython segfaults.

If no-one here can help, I will try asking on the wxPython mailing
list.

Frank

Nov 30 '05 #2

Frank Millman wrote:
Hi all

I am using Python 2.4.1. I have machines running FC4, RH9, and MSW
Server 2003 for testing.

If I call sax.make_parser() from the interpreter or from a stand-alone
program, it works fine on all machines, but in the following setup it
works correctly on MSW, but segfaults on both FC4 and RH9.

The setup is a client program running wxPython as a gui, and Twisted as
a means of connecting to a server.


Progress report - I have narrowed it down to wxPython. I wrote small
stand-alone programs, one using Twisted, one using wxPython. Twisted
works fine, wxPython segfaults.


No-one? I thought that a error like this in a standard module would be
of some concern, even if it turns out that the fault is with wxPython.

Anyway, I have found a workaround.

I call sax.make_parser() from the main line of the program, before
starting the wxPython main loop. The reference it returns is global,
and can be used anywhere within the program. This seems to work ok.

Frank

Dec 1 '05 #3
"Frank Millman" <fr***@chagford.com> writes:
> If I call sax.make_parser() from the interpreter or from a stand-alone
> program, it works fine on all machines, but in the following setup it
> works correctly on MSW, but segfaults on both FC4 and RH9.
[...] Progress report - I have narrowed it down to wxPython. I wrote small
stand-alone programs, one using Twisted, one using wxPython. Twisted
works fine, wxPython segfaults.


Could this be the following python bug:
https://sourceforge.net/tracker/inde...70&atid=105470

Bernhard

--
Intevation GmbH http://intevation.de/
Skencil http://skencil.org/
Thuban http://thuban.intevation.org/
Dec 1 '05 #4

Bernhard Herzog wrote:
"Frank Millman" <fr***@chagford.com> writes:
> If I call sax.make_parser() from the interpreter or from a stand-alone
> program, it works fine on all machines, but in the following setup it
> works correctly on MSW, but segfaults on both FC4 and RH9. [...] Progress report - I have narrowed it down to wxPython. I wrote small
stand-alone programs, one using Twisted, one using wxPython. Twisted
works fine, wxPython segfaults.


Could this be the following python bug:
https://sourceforge.net/tracker/inde...70&atid=105470

Bernhard

--


The symptoms certainly look the same - thanks for this link.

It also fits in with my workaround, as someone commented 'if you import
pyexpat first, it looks fine', which is effectively what I am doing.

Many thanks for the response.

Frank

Dec 1 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1979
by: marko | last post by:
I'm having big problems with php and mysql. php segfaults on certain mysql calls, with the following logs in apache error log: child pid 60386 exit signal Segmentation fault (11) and in the...
10
3033
by: Berthold Hoellmann | last post by:
Hello, When I use ./configure --with-thread --with-fpectl --with-signal-module \ --with-pymalloc --enable-shared --with-cxx=g++ make test on 2.3.3 I get
3
1767
by: Thomas Mailund | last post by:
Hi group. I have a problem with some C extensions I am working with and hope that some of you can help. Basically, I am wrapping a a tree structure from C where I have python methods for...
5
1448
by: Naveen Parihar | last post by:
I've a binary that runs on most of our servers but segfaults on one of the servers. Further, even on this specific machine, the binary runs successfully sometimes but segfaults most of the time....
5
1693
by: Matthias Kaeppler | last post by:
Hi, I thought it'd be a better idea to start a new thread dealing directly with my problem. Okay, here's again what's happening: I'm storing boost::shared_ptrS in an std::set. I supposed that on...
1
1779
by: David Douthitt | last post by:
I have a binary statically linked application that was compiled against Red Hat 7.3 (presumably glibc 2.2.5). The application SegFaults when run in a Red Hat Advanced Server environment - with...
9
4492
by: Josh Zenker | last post by:
I've been working on an implementation of Dijkstra's algorithm on and off for the past few days. I thought I was close to being finished, but clearly I've done something wrong. I'm not a very...
1
2008
by: Stefan Braumeister | last post by:
Hi NG, I got some difficult problem that drives me nuts. I wrote a relatively simple extension that reads binary files and extracts some data. If I call the script, that uses my extension via...
0
7049
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6912
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
6744
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
4488
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3000
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2989
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1304
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
565
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
188
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.