Closed
Bug 55384
Opened 24 years ago
Closed 19 years ago
Memory leak, when try to invoke method with nsCIDRef parameter
Categories
(Core Graveyard :: Java to XPCOM Bridge, defect, P3)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: avm, Assigned: blackconnect)
References
Details
Attachments
(1 file)
When try to call some method with argument of type "in nsCIDRef", mozilla crashes. How to reproduce: Please apply attached diff to files in mozilla/java/xpcom/java/test directory. (This diff add one parameter of type nsCIDRef to method test1 of bcIJavaSample interface) then compile test,run mozilla and note, that mozilla crashed. Reproduced with BC sources from 05/10/2000, Mozilla PR3 build, Windows NT4.0
Reporter | ||
Comment 1•24 years ago
|
||
Assignee | ||
Comment 3•23 years ago
|
||
I think it is working. Reporter will you please verify the bug?
Assignee | ||
Comment 4•23 years ago
|
||
I am suggesting to close this bug as a dupe for 71951 Reporter what do you say?
Reporter | ||
Comment 5•23 years ago
|
||
Will verify this bug with fresh build. This bug can't be dup of 71951, but of course, it may be already fixed by fix for some other bug
Assignee | ||
Comment 6•23 years ago
|
||
Reporter, did you verify the bug?
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 7•23 years ago
|
||
Reasingn to myself. reporter will you please update the bug?
Assignee: sdv → idk
Status: ASSIGNED → NEW
Assignee | ||
Comment 8•23 years ago
|
||
Reporter, will you please update the bug? I am going to close the bug as invalid
Reporter | ||
Comment 9•23 years ago
|
||
verified under Linux with latest sources. Crash isn't more reproduced. Method with "in nsCIDRef aClass" parameter ("const nsCID & aClass" in CPP and "CID aClass" in Java). If this method is implemented in CPP component and invoked from Java component, then all works well. When this method is implemeted in Java and invoked from CPP component, then exception thrown in console(please see below) and nothing more. --bcJavaComponentFactory::CreateInstance endDEbug:avm:bcJavaSample.test3(Object,CID) java.lang.IllegalArgumentException: argument type mismatch at java.lang.reflect.Method.invoke(Native Method) at org.mozilla.xpcom.Utilities.callMethodByIndex(Utilities.java:57) at org.mozilla.xpcom.Utilities.callMethodByIndex(Native Method) at org.mozilla.xpcom.Utilities.callMethod(Utilities.java:75) at org.mozilla.xpcom.ProxyHandler.invoke(ProxyHandler.java:53) at $Proxy2.test3(Unknown Source) at bcJavaSample.test2(bcJavaSample.java:54) at java.lang.reflect.Method.invoke(Native Method) at org.mozilla.xpcom.Utilities.callMethodByIndex(Utilities.java:57) Think, that this may be *other* bug. Original crash (due to bad memory managment ?) isn't reproduced
Reporter | ||
Comment 10•23 years ago
|
||
Change summary. Mozilla isn't crashed on invokation of such method, but memory leak occurs.
Summary: Can't call method , if it has parameter of "in nsCIDRef" type → Memory leak, when try to invoke method with nsCIDRef parameter
Assignee | ||
Comment 11•23 years ago
|
||
I created bug 81122 for all memory problems closing this on as dup *** This bug has been marked as a duplicate of 81122 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Reporter | ||
Comment 12•23 years ago
|
||
Reopened and removed Geetha from CC
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Comment 13•23 years ago
|
||
The current version of the xpidl compiler has the problem that it ignores the [ref] modifier, treating parameters with [ref] as pass-by-value ones. xpidl_header.c generates an indirect pointer (nsISupports **). We could emulate this in java by using holder classes. So a parameter of type [ref] (in|out|inout) nsISupports x would be mapped to nsISupportsHolder x See the Java-IDL-Specification http://java.sun.com/j2se/1.3/docs/guide/idl/mapping/jidlMapping.html for further details.
Comment 14•20 years ago
|
||
mlk keyword needed?
Comment 15•19 years ago
|
||
Blackconnect no longer builds and hasn't been worked on since 2001. -> WONTFIX
Status: REOPENED → RESOLVED
Closed: 23 years ago → 19 years ago
Resolution: --- → WONTFIX
Updated•10 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•