If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

[OS/2] horked by bug 168553 (filter fork)

VERIFIED FIXED

Status

SeaMonkey
MailNews: Message Display
--
major
VERIFIED FIXED
15 years ago
13 years ago

People

(Reporter: Felix Miata, Assigned: mkaply)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

15 years ago
2002110615 OS/2 trunk. OK in 20021105 OS/2 trunk.

Summary as per lack of better idea.

To recreate #1:
1-Open existing profile
2-Open mailnews
3-Click Get Msgs

Actual results:
1-Alert - Your filters do no work because the msgFilterRules.dat file, which
contains your filters, could not be read. A new msgFilterRules.dat file will be
created and a backup of the old file, called rulesbackup.dat, will be created in
the same directory.
2-Existing rules.dat file is unchanged
3-Empty (except ID lines) msgFilterRules.dat file created

Expected results:
1-Normal mail fetch, using existing rules.dat file(s), converted to new name if
necessary first

To recreate #2:
1-Open mailnews
2-Click the diamond to expand a mail account
3-Click inbox

Actual results:
1-trap/abend
(Reporter)

Comment 1

15 years ago
Created attachment 105502 [details]
POPUPLOG.OS2
17483 is the news filter bug.  

what you are describing sounds like a result of the filter forking that just
happened.

see bug 168553.  

over to naving, but since OS/2, my guess is mkaply would take it.
Assignee: sspitzer → naving
Summary: horked by bug 17483 → [os/2] horked by bug 168553 (filter fork)
(Assignee)

Comment 3

15 years ago
I can recreate this and it is OS/2 only.

Weird.

On Windows, the filters come up fine, on OS/2 I get the error.

Also on OS/2 I get a crash clicking on folders once filters are processed.
Assignee: naving → mkaply
(Assignee)

Comment 4

15 years ago
Created attachment 105586 [details] [diff] [review]
Fix for problem

You can't just compare chars to values - the char might be signed or unsigned
or get promoted to an int for comparison.

Need a cast here.
(Reporter)

Comment 5

15 years ago
A "cast"?
(Assignee)

Comment 6

15 years ago
cast is when you tell the compiler to treat one type as another.

In this case, we expicitly tell the compiler to treat -1 as a char by saying
(char) -1  - that way when it compares it to the other char value, it will be
comparing apples to apples.
(Assignee)

Comment 7

15 years ago
I have an answer for the crashes as well. Working on a fix.
(Assignee)

Comment 8

15 years ago
Created attachment 105596 [details] [diff] [review]
Fix for problem

NS_LITERAL_STRINGs were getting prematurely destructed.

Fix is to break them out.

Comment 9

15 years ago
Comment on attachment 105586 [details] [diff] [review]
Fix for problem

sr=jag
Attachment #105586 - Flags: superreview+

Comment 10

15 years ago
Comment on attachment 105596 [details] [diff] [review]
Fix for problem

sr=jag
Attachment #105596 - Flags: superreview+

Updated

15 years ago
Attachment #105586 - Flags: review+

Comment 11

15 years ago
Comment on attachment 105586 [details] [diff] [review]
Fix for problem

r=naving

Comment 12

15 years ago
bienvenu checked in that other code. 
(Reporter)

Comment 13

15 years ago
Did this miss today's OS/2 trunk build?
(Assignee)

Comment 14

15 years ago
Yes. I am trying to get it in for the second daily build.
(Assignee)

Comment 15

15 years ago
*** Bug 179173 has been marked as a duplicate of this bug. ***
(Assignee)

Comment 16

15 years ago
I checked both these in.

Without the second one, OS/2 mail is DOA - I hope bienvenu doesn't mind.
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED

Comment 17

15 years ago
No, I don't mind - thx for fixing it. I'm surprised that mail would be doa,
though - I would have thought that code didn't get called unless the folder size
column was visible.
Comment on attachment 105596 [details] [diff] [review]
Fix for problem

>+    /* On OS/2, we have an issue where temporaries get destructed in */
>+    /* conditionals. Solution is to break it out */
>+    nsAutoString units;
>+    if (sizeInMB) {
>+      units = NS_LITERAL_STRING(" MB");
>+    } else {
>+      units = NS_LITERAL_STRING(" kb");
>+    }
>+    sizeString.Append(units);

It would have been better to avoid paying the extra cost for constructing an
nsAutoString and double-copying by doing:

if (sizeInMB) {
  sizeString.Append(NS_LITERAL_STRING(" MB");
} else {
  sizeString.Append(NS_LITERAL_STRING(" kb");
}
(Assignee)

Comment 19

15 years ago
bienvenu:

Your code is also called when a folder that does not have an msf file is clicked
on for the first time.
(Assignee)

Comment 20

15 years ago
*** Bug 179444 has been marked as a duplicate of this bug. ***
(Reporter)

Comment 21

15 years ago
Verified in 2002111108 trunk.
Status: RESOLVED → VERIFIED
Summary: [os/2] horked by bug 168553 (filter fork) → [OS/2] horked by bug 168553 (filter fork)
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.