Closed Bug 136936 Opened 22 years ago Closed 15 years ago

TestInterfaceInfo is out of date - nsIServiceManager

Categories

(Core :: XPConnect, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: timeless, Assigned: dougt)

References

()

Details

(Keywords: assertion, crash, Whiteboard: [needs 1.9.1.x landing, after checking it works there])

Attachments

(2 files, 3 obsolete files)

QNX6.0a & FreeBSD4.4

I'm going to attach my logging info because I don't think I'll have time to 
figure this one out today and I don't want to flood the report with three 
stacks.
This is an XPCOM issue. Basically the code is triggering recursion that begins
with XPTI_GetInterfaceInfoManager which gets called a second time by NS_InitXPCOM2.

I wonder if the test should not initialize XPCOM before making this call?
Assignee: dbradley → dougt
Component: XPConnect → XPCOM
the problem is that you are NOT init'ing xpcom before calling
XPTI_GetInterfaceInfoManager().

see
http://lxr.mozilla.org/seamonkey/source/xpcom/reflect/xptinfo/tests/TestInterfaceInfo.cpp#54
Component: XPCOM → XPConnect
timeless, can you try adding the NS_InitXPCOM2 call and see if that takes care
of the problem?
that fixes assert #1. and leaves me with assert #2 and crash.
Keywords: assertion, crash
The test is broken, nsIServiceManager has changed but no one updated the test.
The test assumes 7 methods but there are only 6 now. Changing summary to reflect.
Summary: TestInterfaceInfo crashes → TestInterfaceInfo is out of date - nsIServiceManager
david, can you post a fix?  If not, bounce it back to me and I will add it to my
plate.
Assignee: dougt → dbradley
Attached patch Fixes the test (obsolete) — Splinter Review
This patch makes the test current. It's not ideal, but gets us back to a
working test.

Timeless can you verify this fixes the problem. It did on my system, but needs
a double check.
Comment on attachment 79269 [details] [diff] [review]
Fixes the test

This didn't work for me
I get an assert from
#7  0x08048da3 in main (argc=1, argv=0xbfbff808) at
/home/timeless/mozilla/xpcom/reflect/xptinfo/tests/TestInterfaceInfo.cpp:127
and i crash at
#1  0x08048db5 in main (argc=1, argv=0xbfbff808) at
/home/timeless/mozilla/xpcom/reflect/xptinfo/tests/TestInterfaceInfo.cpp:129
0x2816640c in nsID::ToString (this=0x1) at
/home/timeless/mozilla/xpcom/base/nsID.cpp:136
Attachment #79269 - Flags: needs-work+
Ok, this doesn't quite test the same thing as the original test, but it does
test a bit more. So I think it's as good. If anyone has a better interface to
test than nsIComponentManager let me know and I'll use it instead.
Attachment #79269 - Attachment is obsolete: true
Setting milestone and priority.
Status: NEW → ASSIGNED
Priority: -- → P4
Target Milestone: --- → mozilla1.2alpha
*** Bug 157699 has been marked as a duplicate of this bug. ***
Taking suggestions on better interfaces to use on this test. If you feel my last
patch is ok, then looking for an r/sr=
Priority: P4 → P2
Blocks: 160540
Moving out to 1.3. If this needs to be in before 1.3 please comment.
Target Milestone: mozilla1.2alpha → mozilla1.3alpha
Moving to 1.4 Alpha
Target Milestone: mozilla1.3alpha → mozilla1.4alpha
By the definitions on <http://bugzilla.mozilla.org/bug_status.html#severity> and
<http://bugzilla.mozilla.org/enter_bug.cgi?format=guided>, crashing and dataloss
bugs are of critical or possibly higher severity.  Only changing open bugs to
minimize unnecessary spam.  Keywords to trigger this would be crash, topcrash,
topcrash+, zt4newcrash, dataloss.
Severity: minor → critical
*** Bug 11809 has been marked as a duplicate of this bug. ***
Moving out
Target Milestone: mozilla1.4alpha → mozilla1.5alpha
Target Milestone: mozilla1.5alpha → mozilla1.5beta
Moving out, speak up if you believe this needs to be considered for 1.5b
Target Milestone: mozilla1.5beta → mozilla1.6alpha
Moving out
Target Milestone: mozilla1.6alpha → mozilla1.7alpha
Comment on attachment 79611 [details] [diff] [review]
Patch that uses nsIComponentManager

still applies w/o even line mismatches, and fixes the crash.
Attachment #79611 - Flags: review?(dougt)
QA Contact: pschwartau → xpconnect
Attachment #79611 - Flags: review?(doug.turner) → review-
Comment on attachment 79611 [details] [diff] [review]
Patch that uses nsIComponentManager

no longer applies.  sorry for the delay.
Attached patch patch v.2 (obsolete) — Splinter Review
timeless, this is your patch, updated to the tip.  It looks fine.
Assignee: dbradley → doug.turner
Attachment #79611 - Attachment is obsolete: true
Comment on attachment 367048 [details] [diff] [review]
patch v.2

sorry.  not this patch. :-)
Attachment #367048 - Attachment is obsolete: true
Attachment #367048 - Flags: review-
for realz this time.
Attachment #367049 - Flags: review?
Severity: critical → normal
Priority: P2 → --
Hardware: x86 → All
Target Milestone: mozilla1.7alpha → ---
Comment on attachment 367049 [details] [diff] [review]
patch v.2
[Checkin: Comment 27]

this doesn't improve the test, it just makes it so that it doesn't crash against an old interface assumption.
Attachment #367049 - Flags: review? → review?(benjamin)
Attachment #367049 - Flags: review?(benjamin) → review+
Keywords: checkin-needed
Attachment #367049 - Attachment description: patch v.2 → patch v.2 [Checkin: Comment 27]
You may want to file a follow-up bug to make this test be automatically executed by |make check|...
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Whiteboard: [needs 1.9.1.x landing]
Target Milestone: --- → mozilla1.9.2a1
This test could be rewritten as an xpcshell-test, couldn't it?
Whiteboard: [needs 1.9.1.x landing] → [needs 1.9.1.x landing, after checking it works there]
Keywords: checkin-needed
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: