On Thu, Jun 21, 2007 at 07:39:23PM +0400, Paul Romanchenko <[EMAIL PROTECTED]> 
was heard to say:
> Here we go! gdb stacktrace follows.
> Aptitude was built from sources fetched by 'apt-get source aptitude'.
> aptitude_0.4.5.3-1.diff.gz, aptitude_0.4.5.3-1.dsc, 
> aptitude_0.4.5.3.orig.tar.gz
> 
> 
> Program received signal SIGABRT, Aborted.
> [Switching to Thread -1212557616 (LWP 848)]
> 0xffffe410 in ?? ()
> (gdb) bt
> #0  0xffffe410 in ?? ()
> #1  0xbfc87e9c in ?? ()
> #2  0x00000006 in ?? ()
> #3  0xb7bce5b1 in abort () from /lib/i686/cmov/libc.so.6
> #4  0xb7dd2530 in __gnu_cxx::__verbose_terminate_handler () 
> from /usr/lib/libstdc++.so.6
> #5  0xb7dcfdd5 in std::set_unexpected () from /usr/lib/libstdc++.so.6
> #6  0xb7dcfe12 in std::terminate () from /usr/lib/libstdc++.so.6
> #7  0xb7dcff3a in __cxa_throw () from /usr/lib/libstdc++.so.6
> #8  0xb7d66e5f in std::__throw_out_of_range () from /usr/lib/libstdc++.so.6
> #9  0x0819a1ab in vs_editline::handle_key (this=0x8889558, [EMAIL PROTECTED]) 
> at 
> basic_string.h:306

  I still can't reproduce this, but I have a pretty good idea which
codepath you're going down, and I see at least one potential bug on it.
Could you try this patch and see if it helps any?

  Daniel
diff -r 9b9ecdfff423 src/vscreen/vs_editline.cc
--- a/src/vscreen/vs_editline.cc	Wed Jun 20 06:14:18 2007 -0700
+++ b/src/vscreen/vs_editline.cc	Sun Jun 24 10:31:00 2007 -0700
@@ -369,7 +369,11 @@ bool vs_editline::handle_key(const key &
   else
     {
       if(clear_on_this_edit)
-	text.clear();
+	{
+	  text.clear();
+	  curloc = 0;
+	  startloc = 0;
+	}
 
       text.insert(curloc++, 1, k.ch);
       normalize_cursor();

Reply via email to