[dev] bug in imp 2.3.7

Kris von Mach dev@swishmail.com
Wed, 05 Sep 2001 13:05:14 -0400


I have been doing more testing, and found a way to replicate this error.

If you have 21 or more seen email messages, and one email message that was 
unseen and marked as deleted, and you have hide deleted enabled, you will 
get the error message I have described, by either clicking on INBOX or by 
login in.

__
Kris.

At 12:26 PM 9/5/2001 -0400, you wrote:
>Hi,
>
>I think I may have found a bug in imp 2.3.7.
>
>When a user deletes (marks for deletion) first email message that is 
>unseen, then clicks on 'hide deleted', logs out, and logs back in, they 
>get this:
>
>Warning: Undefined offset: 117 in 
>/home/httpd/html/beta-horde/imp/mailbox.php on line 430
>
>Warning: Cannot add header information - headers already sent by (output 
>started at /home/httpd/html/beta-horde/imp/mailbox.php:430) in 
>/usr/local/lib/php/HTTP/Compress.php on line 75
>
>Warning: Cannot add header information - headers already sent by (output 
>started at /home/httpd/html/beta-horde/imp/mailbox.php:430) in 
>/usr/local/lib/php/HTTP/Compress.php on line 76
>
>Warning: Cannot add header information - headers already sent by (output 
>started at /home/httpd/html/beta-horde/imp/mailbox.php:430) in 
>/usr/local/lib/php/HTTP/Compress.php on line 86
>
>Warning: Cannot add header information - headers already sent by (output 
>started at /home/httpd/html/beta-horde/imp/mailbox.php:430) in 
>/usr/local/lib/php/HTTP/Compress.php on line 100
>
>and a lot more compressed stuff....
>
>
>This doesn't happen to all the accounts. It depends what one has in their 
>email account already. So there is some other variable here that needs to 
>be met in order to replicate this error. Which I can't locate.
>
>But I can replicate this every time, by actually copying all the email 
>messages from one account to another account, then following the steps I 
>described, and the same thing will happen.
>
>Has anyone else experienced this? And is anyone of the developers willing 
>to look into this? I can send the whole mailbox if you need it to locate 
>the problem.
>
>I run on FreeBSD 4.2 qmail 1.03 vpopmail 4.9.8-2 courier imap 1.3.6 with 
>apache 1.3.20 php4.0.6-memlimit and latest PEAR. I have also replicated 
>this error on:
>FreeBSD 4.3-stable qmail 1.03 vpopmail 4.9.10 courier imap 1.3.8.2 with 
>apache 1.3.20 php4.0.6 and latest PEAR.
>
>I will continue to try to isolate the problem, but if anyone has any 
>suggestions, I would appreciate it.
>
>__
>Kris.



>From chuck@horde.org Date: Wed,  5 Sep 2001 13:40:56 -0400
Return-Path: <chuck@horde.org>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 92061 invoked from network); 5 Sep 2001 17:43:02 -0000
Received: from h00104bc60b3c.ne.mediaone.net (HELO marina.horde.org) (24.91.198.7)
  by horde.org with SMTP; 5 Sep 2001 17:43:02 -0000
Received: by marina.horde.org (Postfix, from userid 33)
	id 1C2683D9F; Wed,  5 Sep 2001 13:40:57 -0400 (EDT)
Received: from 206.243.191.252 ( [206.243.191.252])
	as user chuck@localhost by marina.horde.org with HTTP;
	Wed,  5 Sep 2001 13:40:56 -0400
Message-ID: <999711656.3b9663a8ef9da@marina.horde.org>
Date: Wed,  5 Sep 2001 13:40:56 -0400
From: Chuck Hagenbuch <chuck@horde.org>
To: dev@lists.horde.org
References: <5.1.0.14.2.20010905130233.03e5af38@pop3.swishmail.com>
In-Reply-To: <5.1.0.14.2.20010905130233.03e5af38@pop3.swishmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 2.3.7-cvs
Subject: Re: [dev] bug in imp 2.3.7

Quoting Kris von Mach <dev@swishmail.com>:

> I have been doing more testing, and found a way to replicate this error.

I have added to the bugs database as #751. Please post any follow-up there.

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
Some fallen angels have their good reasons.


>From janmailing@gmx.de Date: Wed,  5 Sep 2001 23:31:44 +0200
Return-Path: <janmailing@gmx.de>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 7453 invoked from network); 5 Sep 2001 21:35:00 -0000
Received: from mailout00.sul.t-online.com (HELO mailout00.sul.t-online.de) (194.25.134.16)
  by horde.org with SMTP; 5 Sep 2001 21:35:00 -0000
Received: from fwd01.sul.t-online.de 
	by mailout00.sul.t-online.de with smtp 
	id 15ekK1-00010A-04; Wed, 05 Sep 2001 23:34:57 +0200
Received: from linux.wg.de (320034214675-0001@[217.80.111.58]) by fmrl01.sul.t-online.com
	with esmtp id 15ekJv-1yKYxkC; Wed, 5 Sep 2001 23:34:51 +0200
Received: from localhost (localhost [127.0.0.1])
	by linux.wg.de (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id f85LVjV27267
	for <dev@lists.horde.org>; Wed, 5 Sep 2001 23:31:45 +0200
Received: from 192.168.60.1 ( [192.168.60.1])
	as user jan@mail.wg.de by linux.wg.de with HTTP;
	Wed,  5 Sep 2001 23:31:44 +0200
Message-ID: <999725504.3b9699c0c2e2a@linux.wg.de>
Date: Wed,  5 Sep 2001 23:31:44 +0200
From: Jan Schneider <janmailing@gmx.de>
To: "dev@lists.horde.org" <dev@lists.horde.org>
MIME-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 2.3.7-cvs
X-Sender: 320034214675-0001@t-dialin.net
Subject: Segfault in imap_sort

OK, I did another try and now I get a bt with symbols.
To remember: This happens if resorting or searching a folder with a lot of 
messages.

Program received signal SIGSEGV, Segmentation fault.
0x4010d55c in realloc () at malloc.c:3135
3135    malloc.c: No such file or directory.
(gdb) bt
#0  0x4010d55c in realloc () at malloc.c:3135
#1  0x81de067 in fs_resize (block=0x8559b98, size=2048) at fs_unix.c:46
#2  0x81ef766 in imap_sort (stream=0x84f8e60, charset=0x0, spg=0x851da98, 
pgm=0x83ca1f0, flags=1) at imap4r1.c:1629
#3  0x81d37d6 in mail_sort (stream=0x84f8e60, charset=0x0, spg=0x851da98, 
pgm=0x83ca1f0, flags=1) at mail.c:3557
#4  0x80aa5b9 in zif_imap_sort (ht=5, return_value=0x8525594, this_ptr=0x0, 
return_value_used=1) at php_imap.c:2532
#5  0x817f0ba in execute (op_array=0x8445090) at ./zend_execute.c:1590
#6  0x817f298 in execute (op_array=0x83c6874) at ./zend_execute.c:1630
#7  0x815a274 in zend_execute_scripts (type=8, file_count=3) at zend.c:807
#8  0x80893cf in php_execute_script (primary_file=0xbffff3c8) at main.c:1310
#9  0x816620c in apache_php_module_main (r=0x831bdac, display_source_mode=0) at 
sapi_apache.c:90
#10 0x808589e in send_php ()
#11 0x8085906 in send_parsed_php ()
#12 0x8189aa9 in ap_invoke_handler ()
#13 0x819f01f in process_request_internal ()
#14 0x819f092 in ap_process_request ()
#15 0x8195c96 in child_main ()
#16 0x8195e55 in make_child ()
#17 0x8195fd6 in startup_children ()
#18 0x819665c in standalone_main ()
#19 0x8196e8c in main ()
#20 0x400d3a8e in __libc_start_main () at ../sysdeps/generic/libc-start.c:93

I hope somone can make use of it.

Jan.

:::::::::::::::::::::::::::::::::::::::: 
AMMMa AG - discover your knowledge
:::::::::::::::::::::::::::
Detmolder Str. 25-33 :: D-33604 Bielefeld
fon +49.521.96878-0 :: fax  +49.521.96878-20
http://www.ammma.de
::::::::::::::::::::::::::::::::::::::::::::::


>From janmailing@gmx.de Date: Thu,  6 Sep 2001 00:24:26 +0200
Return-Path: <janmailing@gmx.de>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 8903 invoked from network); 5 Sep 2001 22:25:02 -0000
Received: from mailout04.sul.t-online.com (HELO mailout04.sul.t-online.de) (194.25.134.18)
  by horde.org with SMTP; 5 Sep 2001 22:25:02 -0000
Received: from fwd02.sul.t-online.de 
	by mailout04.sul.t-online.de with smtp 
	id 15el6Q-0005A5-08; Thu, 06 Sep 2001 00:24:58 +0200
Received: from linux.wg.de (320034214675-0001@[217.80.111.58]) by fmrl02.sul.t-online.com
	with esmtp id 15el6I-2Kn4d6C; Thu, 6 Sep 2001 00:24:50 +0200
Received: from localhost (localhost [127.0.0.1])
	by linux.wg.de (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id f85MOSV28527
	for <dev@lists.horde.org>; Thu, 6 Sep 2001 00:24:28 +0200
Received: from 192.168.60.1 ( [192.168.60.1])
	as user jan@mail.wg.de by linux.wg.de with HTTP;
	Thu,  6 Sep 2001 00:24:26 +0200
Message-ID: <999728666.3b96a61aec63b@linux.wg.de>
Date: Thu,  6 Sep 2001 00:24:26 +0200
From: Jan Schneider <janmailing@gmx.de>
To: dev@lists.horde.org
References: <999703403.3b96436b8320f@marina.horde.org>
In-Reply-To: <999703403.3b96436b8320f@marina.horde.org>
MIME-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 2.3.7-cvs
X-Sender: 320034214675-0001@t-dialin.net
Subject: Re: [dev] Identities javascript

Fixed in CVs.

Jan.

Zitat von Chuck Hagenbuch <chuck@horde.org>:

> In NS4, when I switch identities to an identity that has no signature, I get
> a
> garbage character (it looks like a square; pasting it elsewhere makes it
> seem
> like it's a newline) that doesn't go away when I switch back. Jan, can you
> take
> a look at this?
> 
> -chuck
> 
> --
> Charles Hagenbuch, <chuck@horde.org>
> Some fallen angels have their good reasons.
> 
> -- 
> Horde Developers mailing list: http://horde.org/
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: dev-unsubscribe@lists.horde.org
> 
> 


:::::::::::::::::::::::::::::::::::::::: 
AMMMa AG - discover your knowledge
:::::::::::::::::::::::::::
Detmolder Str. 25-33 :: D-33604 Bielefeld
fon +49.521.96878-0 :: fax  +49.521.96878-20
http://www.ammma.de
::::::::::::::::::::::::::::::::::::::::::::::


>From janmailing@gmx.de Date: Thu,  6 Sep 2001 01:19:41 +0200
Return-Path: <janmailing@gmx.de>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 10536 invoked from network); 5 Sep 2001 23:24:55 -0000
Received: from mailout03.sul.t-online.com (HELO mailout03.sul.t-online.de) (194.25.134.81)
  by horde.org with SMTP; 5 Sep 2001 23:24:55 -0000
Received: from fwd01.sul.t-online.de 
	by mailout03.sul.t-online.de with smtp 
	id 15em2P-0002dD-04; Thu, 06 Sep 2001 01:24:53 +0200
Received: from linux.wg.de (320034214675-0001@[217.80.111.58]) by fmrl01.sul.t-online.com
	with esmtp id 15em2M-0fgHdAC; Thu, 6 Sep 2001 01:24:50 +0200
Received: from localhost (localhost [127.0.0.1])
	by linux.wg.de (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id f85NJfV28931
	for <dev@lists.horde.org>; Thu, 6 Sep 2001 01:19:41 +0200
Received: from 192.168.60.1 ( [192.168.60.1])
	as user jan@mail.wg.de by linux.wg.de with HTTP;
	Thu,  6 Sep 2001 01:19:41 +0200
Message-ID: <999731981.3b96b30d4b41b@linux.wg.de>
Date: Thu,  6 Sep 2001 01:19:41 +0200
From: Jan Schneider <janmailing@gmx.de>
To: dev@lists.horde.org
References: <20010901163631.76237.qmail@horde.org> <999364591.3b9117ef77a6b@mail.lsit.ucsb.edu>
In-Reply-To: <999364591.3b9117ef77a6b@mail.lsit.ucsb.edu>
MIME-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 2.3.7-cvs
X-Sender: 320034214675-0001@t-dialin.net
Subject: Re: [dev] Re: [cvs] commit: imp/lib IMP.php imp/templates common-header.inc         imp/templates/menu menu.inc imp/templates/folders row.inc         imp/templates/identities manage.inc

Zitat von Max Kalika <max@lsit.ucsb.edu>:

> Quoting Max Kalika <max@horde.org>:
> 
> >     templates/identities manage.inc 
> 
> Jan, I hope I didn't break anything but I made two changes to your stuff.  

You did break something. ;-)

> First I replaced the <noscript> section with our server-side client sniffer

The <noscript> section wasn't intended for browsers that aren't capable of 
JavaScript but for browsers that have javascript deactivated.

> if ($browser->hasFeature('javascript')).  I also removed the small javascript
> that did a document.write for the delete button.  Validator didn't like
> either 
> of these and I couldn't see a reason to have them.  Let me know if something
> explodes.

The reason for this was that it appeared otherwise at no-javascript-browsers 
but didn't work. Even worse: it deleted another identity than the selected. 
What did the validator complain? Perhaps we can handle this another way.

Jan.


>From max@lsit.ucsb.edu Date: Wed,  5 Sep 2001 18:48:54 -0700
Return-Path: <max@lsit.ucsb.edu>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 14644 invoked from network); 6 Sep 2001 01:48:54 -0000
Received: from stan.lsit.ucsb.edu (128.111.222.4)
  by horde.org with SMTP; 6 Sep 2001 01:48:54 -0000
Received: (from http@localhost)
	by stan.lsit.ucsb.edu (8.11.6/8.11.6) id f861msV07645
	for dev@lists.horde.org; Wed, 5 Sep 2001 18:48:54 -0700
Received: from 65.5.157.45 ( [65.5.157.45])
	as user max@mail.lsit.ucsb.edu by mail.lsit.ucsb.edu with HTTP;
	Wed,  5 Sep 2001 18:48:54 -0700
Message-ID: <999740934.3b96d606c0e4c@mail.lsit.ucsb.edu>
Date: Wed,  5 Sep 2001 18:48:54 -0700
From: Max Kalika <max@lsit.ucsb.edu>
To: dev@lists.horde.org
References: <20010901163631.76237.qmail@horde.org> <999364591.3b9117ef77a6b@mail.lsit.ucsb.edu> <999731981.3b96b30d4b41b@linux.wg.de>
In-Reply-To: <999731981.3b96b30d4b41b@linux.wg.de>
MIME-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 2.3.7-cvs
X-Originating-IP: 65.5.157.45
Subject: Re: [dev] Re: [cvs] commit: imp/lib IMP.php imp/templates common-header.inc         imp/templates/menu menu.inc imp/templates/folders row.inc         imp/templates/identities manage.inc

Quoting Jan Schneider <janmailing@gmx.de>:

> The <noscript> section wasn't intended for browsers that aren't capable of 
> JavaScript but for browsers that have javascript deactivated.

Are we still catering to this?  I thought it was generally agreed that we are 
so tied to javascript in other parts that making it a requirement was essential 
(and developing weird workarounds like these wasn't worth it).  Please correct 
me if I'm wrong.

> The reason for this was that it appeared otherwise at no-javascript-browsers
> but didn't work. Even worse: it deleted another identity than the selected.
> What did the validator complain? Perhaps we can handle this another way.

Well other than a document.write being there looked odd to me, there was no 
html comment hiding the javascript.

-- 
---max kalika
--max@lsit.ucsb.edu
-lsit systems administrator


>From janmailing@gmx.de Date: Thu,  6 Sep 2001 10:26:07 +0200
Return-Path: <janmailing@gmx.de>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 23308 invoked from network); 6 Sep 2001 08:35:10 -0000
Received: from mailout02.sul.t-online.com (HELO mailout02.sul.t-online.de) (194.25.134.17)
  by horde.org with SMTP; 6 Sep 2001 08:35:10 -0000
Received: from fwd00.sul.t-online.de 
	by mailout02.sul.t-online.de with smtp 
	id 15eucu-0004bu-0O; Thu, 06 Sep 2001 10:35:08 +0200
Received: from linux.wg.de (320034214675-0001@[217.0.157.110]) by fmrl00.sul.t-online.com
	with esmtp id 15eucr-19LuoyC; Thu, 6 Sep 2001 10:35:05 +0200
Received: from localhost (localhost [127.0.0.1])
	by linux.wg.de (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id f868Q8V31388
	for <dev@lists.horde.org>; Thu, 6 Sep 2001 10:26:08 +0200
Received: from 192.168.60.1 ( [192.168.60.1])
	as user jan@mail.wg.de by linux.wg.de with HTTP;
	Thu,  6 Sep 2001 10:26:07 +0200
Message-ID: <999764767.3b97331fb33f2@linux.wg.de>
Date: Thu,  6 Sep 2001 10:26:07 +0200
From: Jan Schneider <janmailing@gmx.de>
To: dev@lists.horde.org
References: <20010901163631.76237.qmail@horde.org> <999364591.3b9117ef77a6b@mail.lsit.ucsb.edu> <999731981.3b96b30d4b41b@linux.wg.de> <999740934.3b96d606c0e4c@mail.lsit.ucsb.edu>
In-Reply-To: <999740934.3b96d606c0e4c@mail.lsit.ucsb.edu>
MIME-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 2.3.7-cvs
X-Sender: 320034214675-0001@t-dialin.net
Subject: Re: [dev] Re: [cvs] commit: imp/lib IMP.php imp/templates common-header.inc         imp/templates/menu menu.inc imp/templates/folders row.inc         imp/templates/identities manage.inc

Zitat von Max Kalika <max@lsit.ucsb.edu>:

> Quoting Jan Schneider <janmailing@gmx.de>:
> 
> > The <noscript> section wasn't intended for browsers that aren't capable of
> 
> > JavaScript but for browsers that have javascript deactivated.
> 
> Are we still catering to this?  I thought it was generally agreed that we are
> 
> so tied to javascript in other parts that making it a requirement was
> essential 
> (and developing weird workarounds like these wasn't worth it).  Please
> correct 
> me if I'm wrong.

I'm not sure we really have a consensus about this. The last statements I read 
about this were: Make use of scripting if it's comfortable for the user but if 
it works without: even better.
I have no problem with it if we abandon support for non javasript browsers 
completely but we should all agree about this.
 
> > The reason for this was that it appeared otherwise at
> no-javascript-browsers
> > but didn't work. Even worse: it deleted another identity than the
> selected.
> > What did the validator complain? Perhaps we can handle this another way.
> 
> Well other than a document.write being there looked odd to me, there was no
> 
> html comment hiding the javascript.

That's an issue, thanks. If it becomes common sense that we don't take care of 
non javascript browsers at all we should just reapply your patch and kick all 
non javascript code off.

Jan.