[Yazlist] Re: Access Violation when returning CQL transformation
error "too many characters in query"
Adam Dickmeiss
adam at indexdata.dk
Wed Mar 21 10:26:30 CET 2007
Michael Freidgeim wrote:
> Hi Mike,
>
> I am using Zoom.Net, and it took a long time before I created Zoom-C application to reproduce the problem.
>
> Actually in C code I was not able to reproduce Access Violation error, but addinfo shows incorrect value anyway, which potentially can causes memory corruption.
> The test code returns:
> CQL transformation error (10012) Too many characters in query (addinfo=H)
>
> instead of expected (addinfo=512)
>
> I've attached the sample code (if you want, it could be added to zoom tests folder, because I didn't find any sample code that calling ZOOM_query_cql2rpn).
>
> Let me know, if mailing list doesn't allow to read attachments, and I will include it in the body of e-mail.
Your attachment went through fine, at least in my emailer.
The program exposed a bad reference. This is now fixed in YAZ.
Thanks for taking the time to make a bug report with a program showing
the problem.
/ Adam
>
> Regards,
> Michael Freidgeim
>
> -----Original Message-----
> Date: Tue, 2 Jan 2007 13:48:37 +0000
> From: Mike Taylor <mike at indexdata.com>
> Subject: [Yazlist] Access Violation when returning CQL transformation
> error Too many characters in query
> To: "Discussion on the YAZ Z39.50 toolkit"
> <yazlist at lists.indexdata.dk>
> Message-ID: <17818.25269.401416.595791 at localhost.localdomain>
> Content-Type: text/plain; charset=iso-8859-1
>
> Hi, Michael. It's not immediately obvious from reading the code where the problem is. Please send a minimal ZOOM-C application that demonstrates the problem, and I'll see what I can do.
>
> Michael Freidgeim writes:
> > Hello,
> >
> > I am using function ZOOM_query_cql2rpn(ZOOM_query s, const char *str, ZOOM_connection conn); to pass CQL query > When I am passing relatively short query it works fine.
> > However when I passed long query:
> > (proprty) and (bath.notes = proprty) and (TITLE = proprty) and (AUTHOR = proprty) and (SUBJECT = proprty) and (EDITOR = proprty) and (PUBLISHER = proprty) >
> > It failed, and when I am retrieving error from connection(using ZOOM_API(int)ZOOM_connection_error(ZOOM_connection c, const char **cp,const char **addinfo) )
> > It returned cp: CQL transformation error (10012) > addinfo: Too many characters in query (addinfo=è...¨¨¨) > > and after this > An unhandled exception of type 'System.AccessViolationException'.Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
> >
> > It seems that (addinfo=è...¨¨¨) is not set up properly in ZOOM_query_cql2rpn, which causes the memory corruption.
> > Note that yaz-client returns correct error message > Can't convert CQL to PQF: Too many characters in query (addinfo=512) > > How can I avoid Access Violation and return meaningful error message ?
> >
> > Regards,
> > Michael Freidgeim
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Yazlist mailing list
> Yazlist at lists.indexdata.dk
> http://lists.indexdata.dk/cgi-bin/mailman/listinfo/yazlist
More information about the Yazlist
mailing list