[Zope] Mysterious crash with Zope 2.4.x
Berthold Stöger
bs@fundaq.com
Wed, 05 Sep 2001 14:19:42 +0200
Hi,
I'm porting an application from Zope 2.0 to Zope 2.4.1 and am
experiencing strange crashes. We use a session manager written
in C with a Python interface. When calling the get() method of
the session object in DTML (be it in a var-, call- or if- tag),
Zope crashes, but when passing the session object down to an
External Method and calling get() from there, it works! I put a
printf() in the first line of the get() function and realized that
Zope crashes before calling the function.
The crashing DTML Method looks like this:
<!--#var standard_html_header -->
<dtml-call "test2(REQUEST.session2)">
<dtml-call "test3(REQUEST)">
<dtml-let s="REQUEST.session2">
<dtml-call "test2(s)">
<dtml-var "s.get('pop_show')"><br>
</dtml-let>
The standard_html_header prepares the session object and puts it in
REQUEST.session2
test2 is an External Method looking like this:
def test2(a):
print "test:" + str(a)
print "test2:" + str(a.get('pop_show'))
and test3 looks like this:
def test3(REQUEST):
s = REQUEST.session2
print "test3:" + str(s.get('pop_show'))
print "test3:" + str(REQUEST.session2.get('pop_show'))
The DTML method crashes in <dtml-var "s.get('pop_show')">. test2()
and test3() work as they should.
Is there a way to find out where Zope crashes (I have a feeling it's
somewhere in the C Codes)?
Where shall I put strategic printf()s??
thanx,
bs