Closed Bug 57779 Opened 24 years ago Closed 24 years ago

char array doesn't pass from C++ to Java

Categories

(Core Graveyard :: Java to XPCOM Bridge, defect, P3)

x86
Windows NT
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: ovk, Assigned: blackconnect)

Details

When an array of chars is transferred from C++ xpcom object to Java xpcom object only the first element is transferred correctly. Platform: WinNT 4.0 with SP 4. Mozilla PR3. BlackConnect source from 10/22/00.
Not only the first element is transferred correctly, but: 1. When char array is transferred from C++ xpcom object to Java xpcom object (java method is invoked from C++ via in parameter), then every fourth element is transferred: original array = {'1', '2', '3', '4', '5', '6', '7', '8', '9', '0', 'a', 'b', 'c', 'd', 'e', 'f', 'g'}; result array = {'1','5','9','c','g','garbage','garbage',...} 2. When char array is transferred from Java xpcom object to C++ xpcom object (c++ method is invoked from java via in parameter), then result array is: result array = {'1', 'garbage', 'garbage', 'garbage', '2', 'garbage', 'garbage', 'garbage', '3', 'garbage', ...} It seems than 4 bytes are used for every element of array.
I can not reproduce the bug on linux on my own tests. What platform are you using? May I have tests you are using? Thanks, -Igor
Did you test it only on winNT?
fixed, integrated into the trunc
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
I mark it as verified.
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.