Closed
Bug 151406
Opened 22 years ago
Closed 22 years ago
ASSERTION ON STARTUP: NS_CopyNativeToUnicode: 'Not Reached', file nsNativeCharsetUtils.cpp, line 752
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: beos, Assigned: darin.moz)
Details
Attachments
(2 files)
573 bytes,
patch
|
Details | Diff | Splinter Review | |
573 bytes,
patch
|
timeless
:
review+
|
Details | Diff | Splinter Review |
It seems that the fix for bug#147333 is now causing an Assertion during startup under BeOS! Console output: nsSplashScreenBeOS::nsSlpashScreenBeOS() nsSplashScreenBeOS::Show() SplashRect (605.000000, 469.500000) - (994.000000, 729.500000) Type Manifest File: /boot/home/Projects/mozilla/mozilla/dist/bin/components/xpti.dat nsNativeComponentLoader: autoregistering begins. nsNativeComponentLoader: autoregistering succeeded nNCL: registering deferred (0) ###!!! ASSERTION: NS_CopyNativeToUnicode: 'Not Reached', file nsNativeCharsetUtils.cpp, line 752 Break: at file nsNativeCharsetUtils.cpp, line 752 ###!!! ASSERTION: NS_CopyNativeToUnicode: 'Not Reached', file nsNativeCharsetUtils.cpp, line 752 Break: at file nsNativeCharsetUtils.cpp, line 752 nsSplashScreenBeOS::~nsSlpashScreenBeOS() nsSplashScreenBeOS::Hide()
this also seems to prevent the proper registration of components
I just checked the latest nightly build as well, to make sure it isn't just me, and it hangs on startup. It does not crash, and nothing is outputted to the console. The splash screen is stuck, with the registration message: Registering JS Component (no name) So, in other words, the BeOS port is dead, at the moment.
Severity: major → blocker
Comment 3•22 years ago
|
||
Paul, add a || defined(XP_BEOS) to the first XP_UNIX ifdef in that file and see what happens. I thought that I had added that in the patch that I submitted to bug 147333.
Assignee: dougt → darin
Attachment #87512 -
Flags: review+
Patch has been checked in. r=timeless
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 7•22 years ago
|
||
Just worked here at nsNativeCharsetUtils.cpp. In reality we need instead #else -#elif defiend XP_BEOS and there implementation of two functions consisting of about two strings - something like : #elif defined(XP_BEOS) #include "nsDebug.h" #include "nsAString.h" #include "nsReadableUtils.h" #include <UTF8.h> NS_COM nsresult NS_CopyNativeToUnicode(const nsACString &input, nsAString &output) { output.Assign(ToNewUnicode(input)); // XXX not sure here. Tried to ask on #mozilla but nobobdy answered return NS_OK; } NS_COM nsresult NS_CopyUnicodeToNative(const nsAString &input, nsACString &output) { output.Assign(ToNewUTF8String(input)); return NS_OK; } void NS_StartupNativeCharsetUtils() { } void NS_ShutdownNativeCharsetUtils() { } #else
Comment 8•22 years ago
|
||
additional notice. As i said (bug 155374 and bug 155373) , BeOS hasn't locales in traditional sences. Only proper native encoding is UTF-8 (despite we can see 8-bit encoded file names using Terminal reencoding properties or specially hacked fonts - but hacks are hacks). And Unix charset utilities, as far as i know, tend to fallback to ISO-****-1 (UTF-8 fallback needs special #define). Which is definitely wrong for BeOS, but is transparent for english (or latin - if they exists) users.
Assignee | ||
Comment 9•22 years ago
|
||
reopening... output.Assign(ToNewUnicode(input)); ToNewUnicode returns allocated memory that will be leaked by this expression. moreover, ToNewUnicode simply zero-pad expands |input|, which is not at all what you want if |input| is UTF-8. instead you should be using NS_ConvertUTF8toUCS2 and NS_ConvertUCS2toUTF8. ToNewUTF8String similarly returns allocated memory.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 10•22 years ago
|
||
whoops... i forgot to check which patch actually got checked in. the one in comment #7 didn't seem to go into the tree (thankfully). marking FIXED again. sorry about the SPAM.
Status: REOPENED → RESOLVED
Closed: 22 years ago → 22 years ago
Resolution: --- → FIXED
Comment 11•22 years ago
|
||
Darin - you're right - but patch with proper functions is already (18-07-2002) attached to bug 158092.Hope you will look at it too.
You need to log in
before you can comment on or make changes to this bug.
Description
•