[Zope-dev] Data.fs corruption (reproducable)

Dr. Peer Griebel peer@knoll-is.de
Fri, 12 May 2000 15:18:07 +0200


Hi,

I just discovered that my Data.fs get's periodically crashed. The
symptom is that one single external method in Zope will be presented as
a folder. I can't edit the method nor delete it. In the output I can
find many messages like ZODB Couldn't load state for
'\000\000\000\000\000\000\000\263' (The numbers are just guessed since I
don't have them currently.)

After the first occurence of the problem I copied all of my projects
into a clean new Data.fs but the problem came back instantly. Now I
could determine how to prevent the problem: I have to change the
implementation of my external method.

The external method is mostly a copy of the method thousands_commas in
DT_var.py. All I did is to replace dots by commas and vice versa to
implement the German representation of numbers:

def FormatPreis( v, n=2, thou=regex.compile(
                     "\([0-9]\)\([0-9][0-9][0-9]\([,.]\|$\)\)").search):
	v = "%.*f" % ( n, v )
	vl = string.split(v,'.')
	if not vl: return v
	v=vl[0]
	del vl[0]
	if vl: s = ',' + string.join(vl,',')
	else: s = ''
	l=thou(v)
	while l >= 0:
		v=v[:l+1]+'.'+v[l+1:]
		l=thou(v)
	return v+s

When this method gets called by some of my dtml-documents Data.fs gets
crashed.  (Therefore I started to make backups every few minutes.) 

Since I replaced the method above by a very simple method

def FormatPreis( v, n=2 ):
	return str(v)

my data.fs stays intact! So what's happening here??? I hope there is no
major problem within Zope. But I would like to see a hint what's going
on.

Thank you for your help!


-- 
connection reset by
      Peer

_______________________________________________________________________
Dr. Peer Griebel                                  Tel. +49 7581 4831 23
Geschäftsführer                                   Fax. +49 7581 4831 11
Knoll Informationssysteme GmbH                   http://www.knoll-is.de
Dreiköniggasse 17                               mailto:peer@knoll-is.de
88348 Saulgau                        privat: mailto:peer.griebel@gmx.de