Inheriting from an interface with a namespace produces bad typelib

RESOLVED WONTFIX

Status

()

P5
normal
RESOLVED WONTFIX
20 years ago
10 years ago

People

(Reporter: frankm, Assigned: dbradley)

Tracking

Trunk
Future
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

20 years ago
If an interface defined in an IDL file has a namespace attribute, and another
interface in the same file inherits from it, the typelib will have a bogus extra
record, which causes both xpt_dump and nsIInterfaceInfoManager to crash.

For example:

====================
#include "nsISupports.idl"

[ scriptable, uuid(57ecad90-ae1a-11d1-b66c-00805f8a2676), namespace(test) ]
interface nsIHam : nsISupports
{
    void ham();
};

[ scriptable, uuid(57ecad90-ae1a-11d1-b66c-00805f8a2677), namespace(test) ]
interface nsISpam : nsIHam /* if this were nsISupports, we'd be fine */
{
    void eggs();
};
====================

xpt_dump on Solaris produces the following output:
-------------------
Header:
   Major version:         1
   Minor version:         0
   Number of interfaces:  4
   Annotations:
      Annotation #0:
         Creator:      xpidl 0.99.9
         Private Data: Created from test_namespace.idl
Creation date: Wed Sep  1 13:15:00 1999
Interfaces: nsIHam nsISpam

Interface Directory:
   - ::nsISupports (00000000-0000-0000-c000-000000000046):
      [Unresolved]
   - test::nsIHam (57ecad90-ae1a-11d1-b66c-00805f8a2676):
      Parent: ::nsISupports
      Flags:
         Scriptable: TRUE
      Methods:
         uint32 spam();
      Constants:
         No Constants
   - test::nsISpam (57ecad90-ae1a-11d1-b66c-00805f8a2677):
      Parent: test::nsIHam
      Flags:
         Scriptable: TRUE
      Methods:
         uint32 eggs();
      Constants:
         No Constants
Segmentation Fault (core dumped)
--------------------

I've tested on Solaris and NT, and seen similar behavior on both.

Comment 1

20 years ago
Mass accept as ASSIGNED of xpidl bugs
I gotta ask: why are you using a namespace there?  What does it do?

Comment 3

19 years ago
[SPAM] Marking milestone 'future' as part of nsbeta3 triage.
Target Milestone: --- → Future

Comment 4

18 years ago
Mass-reassigning mccabe's non-JS, non-Rhino bugs to jband (34 total). 

Would like to cc mccabe; but the mass-reassign page does not allow this. 
I'll leave it up to mccabe to decide if he wants to be cc'ed on these - 
Assignee: mike+mozilla → jband
Status: ASSIGNED → NEW

Comment 5

18 years ago
mass reassign of xpidl bugs to dbradley@netscape.com
Assignee: jband → dbradley
(Assignee)

Updated

18 years ago
Status: NEW → ASSIGNED
Priority: P3 → P5

Comment 6

16 years ago
this also happens if i inherit from a different interface from a different file
xpt_dump.exe does not crash here but the nsiinterfaceInfoManager
sourcecode is 1.4 system is w2k

Updated

11 years ago
Component: xpidl → XPCOM
QA Contact: mike+mozilla → xpcom

Updated

10 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.