[Clam-devel] Re: adding the documents to the scheme of SilenceDetector

David García Garzón dgarcia at iua.upf.edu
Tue May 27 06:21:01 PDT 2008


I don't know even whether the CLAM::DescriptorSchema dumping is implemented at 
all. We planned such a feature but as we ended up implementing the XML with 
CLAM_Annotator::Schema, the DescSchema just dumps an empty node. This is one 
of the TODOs you should spot (for your or for me): merging both schemas 
functionalities into a single class.

The bug/crash appears when you actually dump a pool with no added scope 
instances. The pool is very weak in the sense that along its live due to the 
work flow it may have inconsistent states, and this is one. We should write 
down such inconsistent states and eventually fix them. Maybe not now as we 
need a wider view of the work flow unless the crash is really due to a 
missimplementation. So you should see why it is crashing and fix it or 
writing it down on the TODO.



On Dimarts 27 Maig 2008, JunJun wrote:
> I'm not quite clear now, but here is a debugging patch(see
> FillDescriptionScheme_dump_debug.patch), where I tried :
> "schema.FillDescriptionScheme(descriptionScheme);"
> and then..
> "CLAM::XMLStorage::Dump(descriptionScheme, "DescriptorsScheme",
> std::cout);" It outputs an error. (see debug_5_27.txt)
>
> Yet if I comment out that line
> "schema.FillDescriptionScheme(descriptionScheme);", there is no error(see
> debug_5_27_20_25.txt).
>
> One more important question is: what's the convenient way of you to debug
> the code? My way with std::cout << "X" << std::endl is clumsy. The "scons
> /src/SilenceDetector" just do the compiling job rather than linking. What's
> more, if I changed any code apart of /SilenceDetector, must I recompile all
> of the annotator code again?

That's the way we do. Plus running gdb (the gnu debugger) to dump stack back 
traces on crash points, plus running valgrind ( linux :-( ) to locate memory 
leaks and illegal memory uses. I personally flee from doing step by step 
debug executions, but that's because gdb frontend programs are really 
horrible. So adding traces should be sufficient.


-- 
David García Garzón
(Work) dgarcia at iua dot upf anotherdot es
http://www.iua.upf.edu/~dgarcia
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.clam-project.org/pipermail/clam-devel-clam-project.org/attachments/20080527/6cca500e/attachment-0003.pgp>


More information about the clam-devel mailing list