Skip to content

Pub: Spawning isolate it transformer not possible #7

Closed
@DartBot

Description

@DartBot

<img src="https://avatars.githubusercontent.com/u/648527?v=3" align="left" width="96" height="96"hspace="10"> Issue by Fox32
Originally opened as dart-lang/sdk#23105


What steps will reproduce the problem?

  1. Create an own pub transformer
  2. Spawn a isolate using Isolate.spawn in Transformer.apply

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

I would like to spawn a new isolate but instead I get the following exception:

in ShutdownIsolate: Unhandled exception:
Uncaught Error: IsolateSpawnException: Unhandled exception:
Uncaught Error: Load Error: FileSystemException: Cannot open file, path = 'C:\Users\Oliver\AppData\Local\Temp\pub_2d41cbb2-dc5b-11e4-bec2-90e6ba20879e\runInIsolate.dart' (OS Error: Das System kann den angegebenen Pfad nicht finden., errno = 3)
Stack Trace:

­0 _asyncLoadErrorCallback (dart:_builtin:268)

­1 _asyncLoadError (dart:_builtin:287)

­2 _loadDataAsyncLoadPort.<anonymous closure> (dart:_builtin:304)

­3 _RootZone.runUnary (dart:async/zone.dart:1155)

­4 _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:494)

­5 _Future._propagateToListeners (dart:async/future_impl.dart:577)

­6 _Future._complete (dart:async/future_impl.dart:358)

­7 _cancelAndValue (dart:async/stream_pipe.dart:62)

­8 Stream.first.<anonymous closure> (dart:async/stream.dart:911)

­9 _RootZone.runUnaryGuarded (dart:async/zone.dart:1093)

­10 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341)

­11 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:270)

­12 _StreamController&&_SyncStreamControllerDispatch._sendData (dart:async/s

tream_controller.dart:698)

­13 _StreamController._add (dart:async/stream_controller.dart:570)

­14 _StreamController.add (dart:async/stream_controller.dart:516)

­15 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:142)

­0 _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:886)

­1 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)

­2 _asyncRunCallback (dart:async/schedule_microtask.dart:48)

­3 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)

­4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:143)

Stack Trace:

­0 Isolate._spawnFunction (dart:isolate-patch/isolate_patch.dart:347)

­1 Isolate.spawn (dart:isolate-patch/isolate_patch.dart:277)

­2 ImageTransformer.apply.<apply_async_body> (package:image_transformer/image_transformer.dart:76:15)

­3 _RootZone.runUnary (dart:async/zone.dart:1155)

­4 _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:494)

­5 _Future._propagateToListeners (dart:async/future_impl.dart:577)

­6 _Future._completeWithValue (dart:async/future_impl.dart:368)

­7 _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:422)

­8 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)

­9 _asyncRunCallback (dart:async/schedule_microtask.dart:48)

­10 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)

­11 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:143)

­0 _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:886)

­1 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)

­2 _asyncRunCallback (dart:async/schedule_microtask.dart:48)

­3 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)

­4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:143)

What version of the product are you using?
Dart Editor version 1.10.0.dev_00_01 (DEV)
Dart SDK version 1.10.0-dev.0.1

On what operating system?
Windows 8.1 64bit

Please provide any additional information below.

Sometimes it would be useful to spawn an additional isolate to do multiple computation heavy operations in parallel. I think this problem is known and currently by design, but it the future it would be a nice addition.
Maybe it would work if pub wouldn't delete the runInIsolate.dart file in the temp folder intermediately, but on exiting pub?

Metadata

Metadata

Assignees

No one assigned

    Labels

    closed-not-plannedClosed as we don't intend to take action on the reported issuestatus-blockedBlocked from making progress by another (referenced) issuetype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions