Coder Social home page Coder Social logo

Comments (13)

zoechi avatar zoechi commented on August 19, 2024

Seems to be the same issue I run into

Missing entry point: web/forms/selecting_many_items_using_checkboxes/index.dart
Exhausted heap space, trying to allocate 586272 bytes.
Exhausted heap space, trying to allocate 96 bytes.
in ShutdownIsolate: Unhandled exception:
Uncaught Error: Out of Memory
Stack Trace:
#0 _AllMatchesIterator.moveNext (dart:core-patch/regexp_patch.dart:268)
#1 _StringBase.replaceFirst (dart:core-patch/string_patch.dart:573)
#2 getErrorMessage (package:$pub/utils.dart:20)
#3 CrossIsolateException.serialize (package:$pub/serialize/exception.dart:45)
#4 serializeException (package:$pub/serialize/exception.dart:88)
#5 respond. (package:$pub/serialize.dart:164)
#6 _RootZone.runBinary (dart:async/zone.dart:1170)
#7 _Future._propagateToListeners.handleError (dart:async/future_impl.dart:529)
#8 _Future._propagateToListeners (dart:async/future_impl.dart:588)
#9 _Future._completeError (dart:async/future_impl.dart:384)
#10 _SyncCompleter._completeError (dart:async/future_impl.dart:56)
#11 _Completer.completeError (dart:async/future_impl.dart:27)
#12 TransformerImplementation.apply.<apply_async_body> (package:reflectable/src/transformer_implementation.dart:2008)
#13 _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:670)
#14 _Future._propagateToListeners (dart:async/future_impl.dart)
#15 _Future._asyncComplete. (dart:async/future_impl.dart:376)
#16 _microtaskLoopEntry (dart:async/schedule_microtask.dart)
#17 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart)

#0 _rootHandleUncaughtError. (dart:async/zone.dart:894)
#1 _microtaskLoop (dart:async/schedule_microtask.dart:43)
#2 _microtaskLoopEntry (dart:async/schedule_microtask.dart:52)
#3 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)
#4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)

After about 10-20 reloads I get this exception.

name: polymer_dart_samples
description: Port of https://github.com/PolymerLabs/polymer-snippets
environment:
  sdk: '>=1.2.0 <2.0.0'
dependencies:
  polymer_elements:
    git: [email protected]:dart-lang/polymer_elements.git
  web_components: ^0.12.0
  polymer: ^0.17.0
transformers:
- web_components:
    entry_points:
    - web/forms/binding_a_boolean_field_to_a_checkbox/index.html
    - web/forms/binding_to_a_text_input/index.html
    - web/forms/binding_to_a_textarea/index.html
    - web/forms/implementing_simple_autocompletion/index.html
    - web/forms/implementing_simple_validation/index.html
    - web/forms/selecting_one_item_using_radio_buttons/index.html
    - web/forms/selecting_many_items_using_checkboxes/index.html
   # - web/events/using_custom_events/index.html
    - web/styling_elements/applying_styles_by_piercing_shadow_dom_boundaries/index.html
    - web/styling_elements/defining_styles_inside_a_polymer_element/index.html
    - web/styling_elements/programmatically_changing_the_styles_of_an_element/index.html
    - web/styling_elements/styling_distributed_nodes/index.html
    - web/styling_elements/using_host_context_to_theme_an_element/index.html
    - web/styling_elements/using_host_with_a_css_selector/index.html
    - web/styling_elements/using_host_with_pseudo_classes/index.html
    - web/layout_attributes/nesting_flex_layouts/index.html
    - web/layout_attributes/using_flex/index.html
    - web/layout_attributes/using_layout_attributes/index.html
    - web/polymer_elements/paper_toolbar/adding_a_menu_button/index.html
    - web/polymer_elements/paper_toolbar/adding_button_rows/index.html
    - web/polymer_elements/paper_toolbar/changing_the_toolbar_size/index.html
    - web/polymer_elements/paper_toolbar/using_paper_toolbar/index.html
- reflectable:
    entry_points:
    - web/forms/binding_a_boolean_field_to_a_checkbox/index.dart
    - web/forms/binding_to_a_text_input/index.dart
    - web/forms/binding_to_a_textarea/index.dart
    - web/forms/implementing_simple_autocompletion/index.dart
    - web/forms/implementing_simple_validation/index.dart
    - web/forms/selecting_one_item_using_radio_buttons/index.dart
    - web/forms/selecting_many_items_using_checkboxes/index.dart
    - web/styling_elements/applying_styles_by_piercing_shadow_dom_boundaries/index.dart
    - web/styling_elements/defining_styles_inside_a_polymer_element/index.dart
    - web/styling_elements/programmatically_changing_the_styles_of_an_element/index.dart
    - web/styling_elements/styling_distributed_nodes/index.dart
    - web/styling_elements/using_host_context_to_theme_an_element/index.dart
    - web/styling_elements/using_host_with_a_css_selector/index.dart
    - web/styling_elements/using_host_with_pseudo_classes/index.dart
    - web/layout_attributes/nesting_flex_layouts/index.dart
    - web/layout_attributes/using_flex/index.dart
    - web/layout_attributes/using_layout_attributes/index.dart
- $dart2js:
    $include: '**/*.bootstrap.initialize.dart'
dependency_overrides:
  polymer:
    git:
      ref: aea190df60e6c9d20078d89919443dea8e1b1997
      url: https://github.com/dart-lang/polymer-dart.git
  polymer_interop:
    git:
      ref: 0.2.0-dev
      url: https://github.com/dart-lang/polymer_interop.git
  reflectable: 0.2.0

from reflectable.dart.

sigurdm avatar sigurdm commented on August 19, 2024

Thanks for the bug report.
This might be some caching gone astray.
But from the provided information it is hard to say exactly where the problem is.
Are you able to provide the program itself that causes the leak so we can investigate further?

from reflectable.dart.

zoechi avatar zoechi commented on August 19, 2024

I had this a few times when I worked on https://github.com/bwu-dart-contributing/polymer-dart-patterns/tree/0.17.0/web/forms/implementing_simple_autocompletion
I haven't tried if simply reloading without changing anything leads to OOM.

from reflectable.dart.

zoechi avatar zoechi commented on August 19, 2024

I updated the link, I forgot to link to the right branch (0.17.0).

from reflectable.dart.

wienczny avatar wienczny commented on August 19, 2024

I don't think that reloading unchanged files causes this because the transformer is not running. I did a lot of reloads and nothing happens. If you want to trigger it even small changes to the code like add/removing a comment to a print statement will cause this behavior after some iterations.
If it's still necessary I will try to provide a stripped down example but that will take some time for preparation.

from reflectable.dart.

eernstg avatar eernstg commented on August 19, 2024

I tried to perform a small experiment: I ran pub serve in polymer-dart-patterns and loaded http://localhost:8080/layout_attributes/nesting_flex_layouts/index in dartium, and then did touch web/layout_attributes/nesting_flex_layouts/index.dart every 20 seconds. This causes pub serve to re-transform at each touch for a while (saying 'Build completed successfully' about 9 times, then just '[Info from Reflectable..]' without 'Build'), and then it stopped (no more output in the terminal, anyway). At the same time we have a growing process (ps shows 10GB, 19GB, 28GB).

I'll experiment a little more with that.

from reflectable.dart.

zoechi avatar zoechi commented on August 19, 2024

Looks similar to my experience. At first Dartium starts to time out and after a few more retries it crashes with OOM.

from reflectable.dart.

wienczny avatar wienczny commented on August 19, 2024

@eernstg This should be the issue I'm experiencing.
@zoechi Is the OOM in Dartium, too?

from reflectable.dart.

zoechi avatar zoechi commented on August 19, 2024

@wienczny I'm not sure what you mean by "in Dartium".
pub serve crashes with OOM and I use the reflectable transfomer only with Polymer 1.0.0-rc1 (client-side with Dartium).

from reflectable.dart.

wienczny avatar wienczny commented on August 19, 2024

@zoechi I was not sure whether the "it" from your post referred to pub or Dartium.

from reflectable.dart.

zoechi avatar zoechi commented on August 19, 2024

I found a similar issue. Might be related dart-archive/polymer-dart#401

from reflectable.dart.

eernstg avatar eernstg commented on August 19, 2024

I just landed a commit (8fbd269) that changes the transformer in a tiny way syntactically, but it makes a difference in practice: The test scenario that I ran yesterday where pub serve serving 'http://localhost:8080/iron_validatable_behavior/index.html' to dartium could run 9 transformations before it started to fail now runs 150 transformations with no signs of trouble. The process still grows over time, but much less. The point is that we now use a single Resolvers instance rather than one per transformation.

from reflectable.dart.

zoechi avatar zoechi commented on August 19, 2024

Sounds great!

from reflectable.dart.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.