<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/4.1.92">
</HEAD>
<BODY>
I found the source of the crash and a workaround.<BR>
<BR>
The crash occurs on line 683 of qsciapis.cpp. Apparently prep->raw_apis.end() is returning an invalid value and the it iterator becomes out of range. The change I made is hackish (lines with code for api_index) but I do not fully understand how prep->raw_apis.end() may be invalid so I took the easy way out. Hopefully someone else can provide a more meaningful fix.<BR>
<BR>
int api_index = 0; //added<BR>
while (api_index < prep->raw_apis.count() && (*it).startsWith(path)) //(it != prep->raw_apis.end() && (*it).startsWith(path)) <-- line 683<BR>
{<BR>
QString w = (*it).mid(ctstart);<BR>
<BR>
if (w != prev && enoughCommas(w, commas))<BR>
{<BR>
shifts << shift;<BR>
cts << w;<BR>
prev = w;<BR>
}<BR>
<BR>
++it;<BR>
++api_index; //added<BR>
}<BR>
<BR>
<BR>
On Mon, 2012-03-19 at 21:35 -0400, Gedalia Pasternak wrote:<BR>
<BLOCKQUOTE TYPE=CITE>
is there an assertion being triggered by the parser? I think I had to change the default qscintilla warning level down a level because occasionally a close to fatal assertion gets triggered splitting up strings. (sorry it was a couple of years ago so I'm a bit fuzzy.<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
-gedalia
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
On Mon, Mar 19, 2012 at 9:29 PM, Jack Cosgrove <<A HREF="mailto:jackcosgrove@gmail.com">jackcosgrove@gmail.com</A>> wrote:<BR>
<BLOCKQUOTE>
Is there any way I can get some help with this?
</BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BLOCKQUOTE>
<BR>
On Sat, 2012-03-17 at 12:58 -0500, Jack Cosgrove wrote:<BR>
> Hi,<BR>
><BR>
> I am encountering crashes when I try to use autocomplete to fill in<BR>
> function arguments using the Python lexer. For example, given an API<BR>
> entry of "foo.bar(foo, bar)", I will always be prompted for foo and bar,<BR>
> but if I accept the autocompletion for "bar" and then type an opening<BR>
> parenthesis my app crashes.<BR>
><BR>
> Attached is a small example demonstrating this behavior. Type in "fo",<BR>
> accept the suggestion, then ".", accept "bar", then "(" to replicate.<BR>
><BR>
> However, if you type in "fo", accept, then ".bar(", then delete the "(",<BR>
> you can then type "(" again and encounter the function argument<BR>
> suggestion. After this happens the first time the application never<BR>
> crashes, even if replicating the first procedure on a new line.<BR>
><BR>
> Thanks to all who reply for your help!<BR>
<BR>
<BR>
<BR>
</BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BLOCKQUOTE>
_______________________________________________<BR>
QScintilla mailing list<BR>
<A HREF="mailto:QScintilla@riverbankcomputing.com">QScintilla@riverbankcomputing.com</A><BR>
<A HREF="http://www.riverbankcomputing.com/mailman/listinfo/qscintilla">http://www.riverbankcomputing.com/mailman/listinfo/qscintilla</A>
</BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
-- <BR>
---------------------------------------------------------------<BR>
cel: 917.776.8346 AIM: gedaliap<BR>
<A HREF="http://www.gedalia.net">http://www.gedalia.net</A><BR>
---------------------------------------------------------------<BR>
Fight Entropy!!! Fight Entropy!!! Figth Etnropy! !<BR>
iFgth Etnrop!y ! giFth tErno!py ! giFt htrEno!p y! --- Well maybe<BR>
not...<BR>
<BR>
</BLOCKQUOTE>
<BR>
</BODY>
</HTML>