473,602 Members | 2,792 Online
Bytes | Software Development & Data Engineering Community
+ 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 1850

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
1991
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 syslog: May 4 13:53:49 op-fi1 /kernel: pid 60023 (httpd), uid 80: exited on signal 11 The following code segfaults php every time (or apache when accessed
10
3054
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
1778
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 extracting either the entire tree or subtrees; since I don't want the full tree to be deallocated while python has references to the subtrees, I INCREF the full tree whenever I hand out a subtree reference. I don't want any of the subtrees to be...
5
1458
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. While trying to debug this behaviour using gdb, I found out that the segfaults occurs randomly at different places in the code. For example, once a pointer was not initiallized to NULL (it was pointing to x8 insterad of x0) in a constructor, even...
5
1704
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 program exit, when the set's dtor is called, the shared_ptrS would clean up after themselves appropriately. What actually happens though is that the program segfaults when the set is destructed. I noticed that erasing the smart pointers from...
1
1790
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 glibc 2.3.2. I had another binary (Samhain - to which I have source!) which had the same problem and exhibited the same strace. After a recompile, the newly compiled static binary worked fine. Why is this? The first binary I don't have source...
9
4503
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 experienced programmer, so please be patient. My code compiles in g++ without any errors or warnings. Unfortunately it segfaults when it runs. I tried adding some outputs to the console throughout the "Dijkstra" function but wasn't able to...
1
2016
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 webbrowser, apache sometimes segfaults with: *** glibc detected *** free(): invalid next size (normal): 0x0000555555a7c240 ***
0
7993
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8404
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8054
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8268
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6730
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5440
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3900
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2418
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 we have to send another system
1
1510
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.