Closed Bug 496336 Opened 15 years ago Closed 15 years ago

Assertion: "not a UTF8 string: 'Error'" and "Input wasn't UTF8 or incorrect length was calculated" [@ AppendUTF8toUTF16]

Categories

(Core :: XPCOM, defect)

1.9.1 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 436006

People

(Reporter: whimboo, Unassigned)

References

()

Details

(Keywords: assertion, testcase)

Attachments

(1 file)

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090604 Minefield/3.6a1pre ID:20090604133456

Loading the website http://www.mtv3.fi/ causes a couple of those assertions:

###!!! ASSERTION: not a UTF8 string: 'Error', file ../../../dist/include/nsUTF8Utils.h, line 130

###!!! ASSERTION: Input wasn't UTF8 or incorrect length was calculated: 'Error', file /Volumes/data/build/minefield/xpcom/string/src/nsReadableUtils.cpp, line 287

The full stack can be seen in attachment 381490 [details] and attachment 381493 [details].
Saving this website to the local disk doesn't show the assertions on load. So what can cause this problem?
Keywords: testcase-wanted
(gdb) frame 6
#6  0x03b1cbc4 in AppendUTF8toUTF16 (aSource=0xb301d48 "\nV?liotsikon+linkkiBikini-Anette+paljastaa:+taasyll?tysasu+Kreikan+rallissa", aDest=@0xbfffd504) at /Volumes/data/build/minefield/xpcom/string/src/nsReadableUtils.cpp:318
318	      AppendUTF8toUTF16(nsDependentCString(aSource), aDest);
(gdb) p aSource
$1 = 0xb301d48 "\nV?liotsikon+linkkiBikini-Anette+paljastaa:+taasyll?tysasu+Kreikan+rallissa"
(gdb) p aDest
$2 = (nsAString_internal &) @0xbfffd504: {
  mData = 0xb301dd8, 
  mLength = 71, 
  mFlags = 65541
}
Both assertions seems to be related to the wonky input string:

(gdb) frame 5
#5  0x03b1c87a in AppendUTF8toUTF16 (aSource=@0xbfffd494, aDest=@0xbfffd504) at /Volumes/data/build/minefield/xpcom/string/src/nsReadableUtils.cpp:287
287	                NS_ERROR("Input wasn't UTF8 or incorrect length was calculated");
(gdb) p aSource
$3 = (const nsACString_internal &) @0xbfffd494: {
  mData = 0xb301d48 "\nV?liotsikon+linkkiBikini-Anette+paljastaa:+taasyll?tysasu+Kreikan+rallissa", 
  mLength = 75, 
  mFlags = 1
}
(gdb) p aDest
$4 = (nsAString_internal &) @0xbfffd504: {
  mData = 0xb301dd8, 
  mLength = 71, 
  mFlags = 65541
}
Attached file testcase
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: