[ZCM] [ZC] 782/10 Comment "Adding a Zclass in 2.6.1b1"
Collector: Zope Bugs, Features, and Patches ...
zope-coders-admin@zope.org
Mon, 27 Jan 2003 18:18:52 -0500
Issue #782 Update (Comment) "Adding a Zclass in 2.6.1b1"
Status Resolved, Zope/bug medium
To followup, visit:
http://collector.zope.org/Zope/782
==============================================================
= Comment - Entry #10 by muldrow on Jan 27, 2003 6:18 pm
This fix also appears to have resolved a rather nasty memory leak we've had any time we tried to reindex an object or objects in ZCatalog. I had it narrowed down to, apparently, when the ZCatalog wrote changes as it indexed text indexes. It was shooting memory usage through the roof and never going back down. When I put that data in the latest CVS, the leak seems to have gone away--I've been testing it since you recommended the switch, and the leak hasn't come back.
________________________________________
= Resolve - Entry #9 by tseaver on Jan 27, 2003 6:09 pm
Status: Pending => Resolved
My instinct was based on seeing checkins and collector traffic;
one sample is collector #689, "Deleting ZClass Crashes Zope",
which was resolved December 16th with the comment:
This appears to be fixed by the coptimization.c changes in CVS.
'coptimizations.c' is one of the ZODB extension modules.
________________________________________
= Comment - Entry #8 by muldrow on Jan 27, 2003 4:20 pm
Sure enough, that worked. Are there significant ZODB changes that could have caused this?
________________________________________
= Comment - Entry #7 by tseaver on Jan 27, 2003 3:51 pm
Right, I think the error is outside the ZClasses package (likely
in ZODB, but I couldn't swear to it). Can you upgrade the whole
Zope checkout to the 2.6 branch head?
$ cvs -q up -r Zope-2_6-branch
and then rebuild any C extensions:
$ python2.1 setup.py build_ext --inplace
That resolves the problem for me.
________________________________________
= Comment - Entry #6 by muldrow on Jan 27, 2003 3:42 pm
OK, I tried it with the CVS' latest Zclass stuff. Still no luck--and I've tried it with the latest CVS stuff on a fresh Zope with a new Data.fs, and I'm getting the same error message.
I'm pasting the file list from an ls-al on lib/python/Zclass here to make sure I put the CVS stuff in correctly--I'm a CVS newbie and could've accidentally just grabbed the same thing I had.
drwxrwxr-x 3 zope zope 4096 Jan 27 15:34 .
drwxrwxr-x 33 zope zope 4096 Jan 27 15:30 ..
-rw-r--r-- 1 root root 7421 Aug 14 18:03 Basic.py
-rw------- 1 zope zope 10008 Jan 27 15:34 Basic.pyc
-rwxr-xr-x 1 root root 869 Mar 25 1999 class.gif
drwxrwxr-x 2 zope zope 4096 Jan 27 15:30 dtml
-rw-r--r-- 1 root root 1389 Aug 14 18:03 __init__.py
-rw------- 1 zope zope 1123 Jan 27 15:34 __init__.pyc
-rw-r--r-- 1 root root 8741 Aug 14 18:03 Method.py
-rw------- 1 zope zope 13876 Jan 27 15:34 Method.pyc
-rwxr-xr-x 1 root root 888 Apr 9 1999 methods.gif
-rw-r--r-- 1 root root 2328 Aug 14 18:03 ObjectManager.py
-rw------- 1 zope zope 3916 Jan 27 15:34 ObjectManager.pyc
-rw-r--r-- 1 root root 12013 Aug 14 18:03 Property.py
-rw------- 1 zope zope 17221 Jan 27 15:34 Property.pyc
-rwxr-xr-x 1 root root 861 Apr 9 1999 propertysheets.gif
-rw-r--r-- 1 root root 1658 Aug 14 18:03 ZClassOwner.py
-rw------- 1 zope zope 1976 Jan 27 15:34 ZClassOwner.pyc
-rwxr-xr-x 1 root root 23679 Aug 14 18:03 ZClass.py
-rw------- 1 zope zope 30566 Jan 27 15:34 ZClass.pyc
________________________________________
= Comment - Entry #5 by tseaver on Jan 27, 2003 3:41 pm
I don't actually think that the ZClass package is to blame at all.
I was able to reproduce the symptom you describe using a checkout
from the 'Zope-2-6-1b1-src' tag; it went away when I did:
$ pwd
/tmp/Zope-2.6.1-beta1
$ cvs -q up -r Zope-2_6-branch
...
$ python2.1 setup build_ext --inplace
and then restarted Zope.
________________________________________
= Comment - Entry #4 by muldrow on Jan 27, 2003 3:01 pm
It doesn't really care what I use for id or title or meta_type--seems to throw an error on every combination I throw at it! Should I just try the newest ZClass stuff from CVS, or do i need other pieces?
________________________________________
= Comment - Entry #3 by tseaver on Jan 27, 2003 2:48 pm
Chris, I can't reproduce against the head of the 2.6 branch.
Here is what I did:
- I created a product, 'Control_Panel/Products/Muldrow'.
- In its 'manage_main', I selected 'ZClass' from the add list,
and filled in:
o Id: Chris
o Title: Test Collector #783
o Meta Type: Collector 762
o Create constructor objects: Checked
o Selected: [ OFS.File ]
When I clicked the "Add" button, I got a "normal" folder
listing of the newly-created ZClass' "Methods" tab.
The only checkin within the 'ZClasses' package since the 2.6.1b1
release was a fix to ensure quoting of the ZClass title (to
alleviate a potential cross-site scripting problem). I can't
see how it would affect your ability to add a ZClass; at most,
the changed template might prevent your viewing its contents
after creation.
Can you try with the "latest and greatest" from CVS? Or post
the values you are using for ID / title / meta_type?
________________________________________
= Comment - Entry #2 by muldrow on Jan 27, 2003 2:16 pm
Some more info: This happens no matter what I attempt to subclass and no matter whether I check the boxes for standard Zope base classes or constructer objects. Basically, it occurs on any attempt to add a Zclass.
________________________________________
= Request - Entry #1 by Anonymous User on Jan 27, 2003 2:09 pm
When I attempt to add a Zclass in any product, I get the following error:
<!--
<p>Traceback (innermost last):
<ul>
<li> Module ZPublisher.Publish, line 102, in publish</li>
<li> Module Zope.App.startup, line 200, in commit</li>
<li> Module ZODB.Transaction, line 236, in commit</li>
<li> Module ZODB.Transaction, line 352, in _commit_objects</li>
<li> Module ZODB.Connection, line 388, in commit<br />
__traceback_info__: (('ZClasses.ZClass', 'ZClass'), '\x00\x00\x00\x00\x00x3\xbc', '')</li>
</ul>TypeError: expected string or Unicode object, None found
</p>
-->
I'm able to add a Zclass with no errors using an identical Data.fs on Zope 2.6.0.
==============================================================