Skip to content
New issue

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

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

Already on GitHub? # to your account

Dart_CreateSnapshot fails if the current isolate was originally from a snapshot #3233

Closed
DartBot opened this issue May 25, 2012 · 4 comments
Closed
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
Milestone

Comments

@DartBot
Copy link

DartBot commented May 25, 2012

This issue was originally filed by sammcca...@google.com


Currently if I create an isolate from a snapshot (the standard snapshot_gen.cc) then load another library and try to create a new snapshot, I get an assertion:

/Users/sammccall/dart/source/dart/runtime/vm/raw_object_snapshot.cc:448: error: expected: kind != Snapshot::kMessage && !IsCreatedFromSnapshot()

This seems to indicate that you can't re-snapshot objects loaded from a snapshot.
This is unfortunate and at least should be documented - is there a reason it can't be supported?

Use case 1: My embedding wants to expose the standard libaries (dart:io etc) plus dart:mylib to user code.
I load the standard snapshot, load dart:mylib, make a new snapshot, and use this to prepare all user isolates.

Use case 2: My embedding wants to snapshot the user code for quick loading.
I load the standard snapshot, load the user library, and create a new snapshot. On each invocation I use this snapshot to prepare an isolate.

Workaround: link in the source code to all libraries and load each from source.

@iposva-google
Copy link
Contributor

cc @a-siva.
Added Area-VM, Triaged labels.

@iposva-google
Copy link
Contributor

Siva, please check if this is something we want to support.


Set owner to @a-siva.
Added Accepted label.

@a-siva
Copy link
Contributor

a-siva commented Jun 13, 2012

Yes, it probably makes sense to allow creating a snapshot from scripts that were loaded initially from a snapshot. I will look into loosening the ASSERT that we have now.

@a-siva
Copy link
Contributor

a-siva commented May 22, 2013

https://codereview.chromium.org//15640002
https://codereview.chromium.org/15736011/


Added this to the M5 milestone.
Added Fixed label.

@DartBot DartBot added Type-Defect area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. labels May 22, 2013
@DartBot DartBot added this to the M5 milestone May 22, 2013
copybara-service bot pushed a commit that referenced this issue Oct 31, 2022
Revisions updated by `dart tools/rev_sdk_deps.dart`.

dartdoc (https://github.com/dart-lang/dartdoc/compare/4902bea..3273437):
  32734372  2022-10-30  Sam Rawlins  Move Warnable.enclosingElement to ModelElement (#3236)
  1ff17d8e  2022-10-28  Sam Rawlins  Make ContainerMember.canonicalEnclosingContainer late final (#3234)
  c32e09ee  2022-10-28  Sam Rawlins  Support displaying record types (#3233)
  9d194476  2022-10-26  Sam Rawlins  Update the text in test/README (#3232)

mockito (https://github.com/dart-lang/mockito/compare/02ad6c7..094d07c):
  094d07c  2022-10-25  Sam Rawlins  Require analyzer 5.2.0

test (https://github.com/dart-lang/test/compare/f704d5a..b82fc0b):
  b82fc0b5  2022-10-27  Jacob MacDonald  Experimental wasm support (#1777)
  262bc7bd  2022-10-26  Nate Bosch  Bump to the latest matcher and prepare to publish (#1778)
  fa81b45d  2022-10-26  Nate Bosch  Expand test_api pubspec description (#1775)

web_socket_channel (https://github.com/dart-lang/web_socket_channel/compare/4b46c0c..eba1541):
  eba1541  2022-10-27  Siva  Remove language version from spawnHybrid code (#232)

webdriver (https://github.com/google/webdriver.dart/compare/f56cc6a..c28cf51):
  c28cf51  2022-10-26  Devon Carew  misc updates and rev in prep for publishing (#256)

Change-Id: I3876e957ffa21333ced4ad3f6df4ef35103674a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266720
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
This issue was closed.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
Projects
None yet
Development

No branches or pull requests

3 participants