Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String encoding change causes StringInputStream failures #6600

Closed
iposva-google opened this issue Nov 7, 2012 · 2 comments
Closed

String encoding change causes StringInputStream failures #6600

iposva-google opened this issue Nov 7, 2012 · 2 comments
Assignees
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-duplicate Closed in favor of an existing report library-io

Comments

@iposva-google
Copy link
Contributor

From "New Dart Editor build 0.2.2.1_r14458" on misc@dartlang.org:

I did a little investigation. It looks like this is neither a pub, nor a Windows issue. Instead it looks likely to be related to the recent string encoding changes. You can get a crash with a similar stack trace by running:

void main() {
  var input = new ListInputStream();
  var stream = new StringInputStream(input);
  stream.onData = () => print(stream.read());

  input.write([0xF0, 0xA4, 0xAD, 0xA2]); // U+24B62 in UTF-8.
  input.markEndOfStream();
}
Which bails with:
Unhandled exception:
Illegal argument(s): negative length -1

­0 Arrays.rangeCheck (dart:collection:65:7)

­1 List.getRange (dart:core-patch:765:22)

­2 _StringDecoderBase.decoded (dart:io:6132:59)

­3 _StringInputStream.read (dart:io:6360:37)

­4 main.<anonymous closure> (file:///C:/Users/rnystrom/dev/temp/stream.dart:6:42)

­5 _StringInputStream._checkScheduleCallback.issueDataCallback (dart:io:6450:27)

­6 _Timer._createTimerHandler._handleTimeout (dart:io:6597:28)

­7 _Timer._createTimerHandler._handleTimeout (dart:io:6605:7)

­8 _Timer._createTimerHandler.<anonymous closure> (dart:io:6613:23)

­9 _ReceivePortImpl._handleMessage (dart:isolate-patch:37:92)

I can repro this on Mac and Windows.

My guess is that this is showing up in pub because pub is spawning a process which, for some users has Unicode output that goes outside of the BMP.

@a-siva
Copy link
Contributor

a-siva commented Nov 7, 2012

Added Duplicate label.
Marked as being merged into #6513.

@kevmoo
Copy link
Member

kevmoo commented May 14, 2014

Removed Area-IO label.
Added Area-Library, Library-IO labels.

@iposva-google iposva-google added Type-Defect area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-io closed-duplicate Closed in favor of an existing report labels May 14, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-duplicate Closed in favor of an existing report library-io
Projects
None yet
Development

No branches or pull requests

3 participants