<div class="markdown_content"><p>Update: can confirm that in BNCweb, the following query<br/>
"elephant"%c # coment comment comment<br/>
"and"%c<br/>
"castle%c</p>
<p>... evaluates as if it was just "elephant"%c</p>
<hr/>
<p><strong><a class="alink" href="https://sourceforge.net/p/cwb/bugs/82/">[bugs:#82]</a> CQP can hang without output when executing queries ending in a comment</strong></p>
<p><strong>Status:</strong> open<br/>
<strong>Group:</strong> TODO-3.5<br/>
<strong>Created:</strong> Mon Aug 03, 2026 01:51 PM UTC by Timm Weber<br/>
<strong>Last Updated:</strong> Tue Aug 25, 2026 02:15 PM UTC<br/>
<strong>Owner:</strong> nobody</p>
<p>Executing the following malformed query in CQP causes its prompt to hang without output: <code>[pos="JJ.?]? ("#?brexit"%c)</code> To get CQP out of this stuck state, the user has to input an additional <code>;\n</code> to get an error message.</p>
<p>This is unexpected behaviour and has the potential to break software using CQP in child process mode, since a deadlock situation arises (both cqp and the host program get stuck on reading stdin and stdout, respectively). See also <a href="https://github.com/ausgerechnet/cwb-ccc/issues/92" rel="nofollow">this issue</a> (and subsequent workaround) for cwb-cc.</p>
<p>The underlying issue seems to be that any query containing a <code>#</code> character outside a string hangs indefinitely, since CQP will treat the rest of the line following the hash symbol (including the <code>;</code> and newline) as a comment. Just executing <code>#</code> or <code>#;</code>is enough to replicate the issue and will also hang cqp in the same way.</p>
<p>Interestingly, this only seems to occur when not using input line editing (the <code>-e</code> flag), i.e. in cqp started without any flag or in child process mode.</p>
<hr/>
<p>Sent from sourceforge.net because cwb@sslmit.unibo.it is subscribed to <a href="https://sourceforge.net/p/cwb/bugs/">https://sourceforge.net/p/cwb/bugs/</a></p>
<p>To unsubscribe from further messages, a project admin can change settings at <a href="https://sourceforge.net/p/cwb/admin/bugs/options.">https://sourceforge.net/p/cwb/admin/bugs/options.</a> Or, if this is a mailing list, you can unsubscribe from the mailing list.</p></div>