nsMsgDBFolder.cpp:180: error: cannot convert ‘const char*’ to ‘nsStringBuffer*’ in initialization (port bug 534136)

RESOLVED FIXED in Thunderbird 3.3a1

Status

defect
--
blocker
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: standard8, Assigned: standard8)

Tracking

Trunk
Thunderbird 3.3a1
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Assignee

Description

9 years ago
Bug 534136 did some changes to the way nsAtoms work, therefore we need to port that across to mailnews.

Typical error message:

ccache /tools/gcc-4.3.3/bin/g++ -o nsMsgDBFolder.o -c -I../../../mozilla/dist/system_wrappers -include /buildbot/comm-central-trunk-bloat-linux/build/mozilla/config/gcc_hidden.h -D_IMPL_NS_MSG_BASE -DMOZILLA_INTERNAL_API -DMOZ_THUNDERBIRD=1 -DOSTYPE=\"Linux2.6.18-164.11.1\" -DOSARCH=Linux  -I/buildbot/comm-central-trunk-bloat-linux/build/mailnews/base/util -I. -I../../../mozilla/dist/include/xpcom -I../../../mozilla/dist/include/string -I../../../mozilla/dist/include/msgbase -I../../../mozilla/dist/include/rdf -I../../../mozilla/dist/include/necko -I../../../mozilla/dist/include/msgdb -I../../../mozilla/dist/include/intl -I../../../mozilla/dist/include/mork -I../../../mozilla/dist/include/locale -I../../../mozilla/dist/include/pref -I../../../mozilla/dist/include/rdfutil -I../../../mozilla/dist/include/mime -I../../../mozilla/dist/include/caps -I../../../mozilla/dist/include/msgcompose -I../../../mozilla/dist/include/addrbook -I../../../mozilla/dist/include/docshell -I../../../mozilla/dist/include/uriloader -I../../../mozilla/dist/include/msgimap -I../../../mozilla/dist/include/msglocal -I../../../mozilla/dist/include/msgnews -I../../../mozilla/dist/include/txmgr -I../../../mozilla/dist/include/uconv -I../../../mozilla/dist/include/unicharutil -I../../../mozilla/dist/include/nkcache -I../../../mozilla/dist/include/mimetype -I../../../mozilla/dist/include/windowwatcher -I../../../mozilla/dist/include/htmlparser -I../../../mozilla/dist/include/content -I../../../mozilla/dist/include/layout -I../../../mozilla/dist/include/loginmgr -I../../../mozilla/dist/include/pipnss -I../../../mozilla/dist/include/zlib -I../../../mozilla/dist/include   -I../../../mozilla/dist/include/msgbaseutil `/buildbot/comm-central-trunk-bloat-linux/build/objdir-tb/mozilla/dist/bin/nspr-config --prefix=/buildbot/comm-central-trunk-bloat-linux/build/objdir-tb/mozilla/dist --includedir=/buildbot/comm-central-trunk-bloat-linux/build/objdir-tb/mozilla/dist/include/nspr --cflags` -I/buildbot/comm-central-trunk-bloat-linux/build/objdir-tb/mozilla/dist/include/nss      -fPIC  -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -Wno-long-long -pedantic -gstabs+ -fno-strict-aliasing -fshort-wchar -pthread -pipe  -DDEBUG -D_DEBUG -DDEBUG_cltbld -DTRACING -g -fno-inline   -DMOZILLA_CLIENT -include ../../../comm-config.h -Wp,-MD,.deps/nsMsgDBFolder.pp /buildbot/comm-central-trunk-bloat-linux/build/mailnews/base/util/nsMsgDBFolder.cpp
/buildbot/comm-central-trunk-bloat-linux/build/mailnews/base/util/nsMsgDBFolder.cpp:180: error: cannot convert ‘const char*’ to ‘nsStringBuffer*’ in initialization

(repeated lots of times).

Updated

9 years ago
Severity: normal → blocker
You probably just need to using the new macros introduced in attachment 419641 [details] [diff] [review]
Assignee

Comment 2

9 years ago
Posted patch The fix (obsolete) — Splinter Review
This basically copies the style of attachment 419641 [details] [diff] [review] for our static atoms. Builds on trunk and 1.9.2, should fix the compilation bustage, and hopefully tests should be fine as well (currently running a subset).
Assignee

Comment 3

9 years ago
Posted patch The fix v2Splinter Review
This one really does compile on 1.9.2.
Attachment #431179 - Attachment is obsolete: true
Comment on attachment 431180 [details] [diff] [review]
The fix v2

>+ * The Initial Developer of the Original Code is
>+ * Netscape Communications Corporation.
>+ * Portions created by the Initial Developer are Copyright (C) 1999
>+ * the Initial Developer. All Rights Reserved.

Not sure if this is what you want on the new file.

Looks good otherwise, though I don't understand why you need to support both branches in the same patch.

consider this as r=sicking if that is answered/needed.
Assignee

Comment 5

9 years ago
(In reply to comment #4)
> (From update of attachment 431180 [details] [diff] [review])
> >+ * The Initial Developer of the Original Code is
> >+ * Netscape Communications Corporation.
> >+ * Portions created by the Initial Developer are Copyright (C) 1999
> >+ * the Initial Developer. All Rights Reserved.
> 
> Not sure if this is what you want on the new file.

Well I copied those attributes from the .h I copied from - just as you had done with some headers in your patch (well, at least you hadn't reset the dates on them).

> Looks good otherwise, though I don't understand why you need to support both
> branches in the same patch.

TB 3.1 builds off of comm-central plus mozilla-1.9.2, TB trunk does comm-central plus mozilla-central (we've not branched comm-central yet).

Comment 6

9 years ago
Comment on attachment 431180 [details] [diff] [review]
The fix v2

my build is still going, but as a tentative build bustage fix, this looks fine (other than the copyright date). And as Neil says, we need to get rid of these for external linkage anyway, so it's somewhat temporary.
Attachment #431180 - Flags: superreview+
Attachment #431180 - Flags: review+
I believe the following is somehow related:
TB 3.1 is fine, but SM+TB on trunk are not:

{
http://tinderbox.mozilla.org/showlog.cgi?log=Thunderbird/1268088967.1268093878.19662.gz
Linux comm-central check on 2010/03/08 14:56:07

Running TestStaticAtoms tests...
TEST-PASS | foo is a static atom
TEST-PASS | foo is the right pointer
TEST-PASS | do_GetAtom and NS_GetStaticAtom returned the same atom.
/bin/sh: line 1: 17323 Segmentation fault      XPCOM_DEBUG_BREAK=stack-and-abort ../../dist/bin/run-mozilla.sh ../../dist/bin/$f
gmake[3]: *** [check] Error 139
}

{
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1268087159.1268088503.4895.gz
OS X 10.5 comm-central-trunk leak test build on 2010/03/08 14:25:59

Running TestStaticAtoms tests...
TEST-PASS | foo is a static atom
TEST-PASS | foo is the right pointer
TEST-PASS | do_GetAtom and NS_GetStaticAtom returned the same atom.
###!!! ASSERTION: Static atoms must be ASCII!: 'nsCRT::IsAscii((PRUnichar*)aAtoms[i].mStringBuffer->Data())', file /builds/slave/comm-central-trunk-macosx-debug/build/mozilla/xpcom/ds/nsAtomTable.cpp, line 442
NS_RegisterStaticAtoms(nsStaticAtom const*, unsigned int)+0x0000014E [/builds/slave/comm-central-trunk-macosx-debug/build/objdir/mozilla/xpcom/build/libxpcom_core.dylib +0x0002223E]
start+0x000001E9 [/builds/slave/comm-central-trunk-macosx-debug/build/objdir/mozilla/xpcom/tests/../../dist/bin/TestStaticAtoms +0x00000C75]
start+0x000004A3 [/builds/slave/comm-central-trunk-macosx-debug/build/objdir/mozilla/xpcom/tests/../../dist/bin/TestStaticAtoms +0x00000F2F]
start+0x00000036 [/builds/slave/comm-central-trunk-macosx-debug/build/objdir/mozilla/xpcom/tests/../../dist/bin/TestStaticAtoms +0x00000AC2]
/bin/sh: line 1: 54134 Abort trap              XPCOM_DEBUG_BREAK=stack-and-abort ../../dist/bin/run-mozilla.sh ../../dist/bin/$f
make[3]: *** [check] Error 134
}
Assignee

Comment 8

9 years ago
The additional test bustage was an issue with the test code, bug 534136 comment 75 covers that.

This should now be fixed, once the tree cycles green I'll reopen in an hour or two.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3.2a1
Depends on: 549100
Comment 7 assertion is fixed :-)

SeaMonkey (only) has another assertion in the next test:
{
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1268128956.1268131514.24122.gz&fulltext=1
Linux comm-central-trunk leak test build on 2010/03/09 02:02:36

[...]
Finished running TestStaticAtoms tests.

               test_valid : SUCCESS
           test_invalid16 : SUCCESS
            test_invalid8 : SUCCESS
###!!! ASSERTION: Not a UTF-8 string. This code should only be used for converting from known UTF-8 strings.: 'Error', file ../../dist/include/nsUTF8Utils.h, line 100
UNKNOWN [../../dist/bin/libxpcom_core.so +0x0004B6C5]
nsCRT::HashCodeAsUTF16(char const*, unsigned int, int*)+0x00000042 [../../dist/bin/libxpcom_core.so +0x0004AFFE]
UNKNOWN [../../dist/bin/TestUTF +0x00000FBC]
UNKNOWN [../../dist/bin/TestUTF +0x00000D2E]
__libc_start_main+0x000000DC [/lib/libc.so.6 +0x00015DEC]
/bin/sh: line 1: 17722 Aborted                 XPCOM_DEBUG_BREAK=stack-and-abort ../../dist/bin/run-mozilla.sh ../../dist/bin/$f
gmake[3]: *** [check] Error 134
}
Assignee

Comment 10

9 years ago
(In reply to comment #9)
> Comment 7 assertion is fixed :-)
> 
> SeaMonkey (only) has another assertion in the next test:

Whatever that assertion is, it certainly isn't this bug. It wasn't even this bug for the comment 7 assertion.
No longer depends on: 549100
Keywords: assertion

Comment 11

9 years ago
Right, I'm pretty sure it's a result of the core patch itself, and has nothing to do with mailnews, SeaMonkey seems to run some core tests that Firefox doesn't run. Please file a new bug blocking bug 534136 on this.
You need to log in before you can comment on or make changes to this bug.