Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Pub on windows throws error #6513

Closed
DartBot opened this Issue · 13 comments
@DartBot
Collaborator

This issue was originally filed by @bp74


What steps will reproduce the problem?
1. create a new application
2. add a dependence like this:

dependencies:
  dartflash:
    git:
      url: https://github.com/bp74/dartflash.git
      ref: latest

  1. run "pub install"

What is the expected output? What do you see instead?

The package is downloaded and install, but in the end you get this error:

Running pub install ...
Pub install fail, Resolving dependencies...
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 _NonInteractiveProcess._NonInteractiveProcess.<anonymous closure>.<anonymous closure> (dart:io-patch:302:38)
#­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)

What version of the product are you using? On what operating system?

Windows 7 64 bit
Dart Editor version 0.1.2_r14508
Dart SDK version 0.1.2.0_r14508

Please provide any additional information below.

@iposva-google
Collaborator

Added Area-Pub, Triaged labels.

@munificent
Collaborator

I'm still getting my Windows box set up, but I'll take a look at this as soon as I can.


Set owner to @munificent.
Removed Priority-Medium label.
Added Priority-High label.

@munificent
Collaborator

Added this to the M2 milestone.

@munificent
Collaborator

Added Started label.

@munificent
Collaborator

It appears that StringDecoder doesn't correctly handle decoding UTF-8 strings that have characters outside of the BMP. My guess is that this is related to the string encoding change. I can repro this issue with:

import 'dart:io';

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();
}

This crashes on Windows for me 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)

So I'm reassigning this over to dart:io.


cc @dgrove.
Set owner to @madsager.
Removed Area-Pub label.
Added Area-IO, Triaged labels.

@munificent
Collaborator

I just tested the above example on my Mac and it crashes there too, so this is not a Windows-specific issue.

@munificent
Collaborator
@sgjesse
Collaborator

Bob has a CL for this: https://codereview.chromium.org/11364115/.


Set owner to @munificent.
Added Started label.

@munificent
Collaborator

I believe the underlying issue (decoding UTF-8 streams containing non-BMP Unicode) is fixed now.


Added Fixed label.

@DartBot
Collaborator

This comment was originally written by @bp74


Thank you Bob! A small step for man a giant ... okay, it helps a lot ;)

@a-siva
Collaborator

Issue #6600 has been merged into this issue.


cc @madsager.

@keertip
Collaborator

Issue #6604 has been merged into this issue.

@kevmoo
Owner

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

@munificent munificent was assigned by DartBot
@DartBot DartBot added this to the M2 milestone
@DartBot DartBot referenced this issue in dart-lang/pub
Closed

Web components not quite there #266

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.