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

web app + List.map + breakpoint => bug? #19549

Closed
DartBot opened this issue Jun 19, 2014 · 6 comments
Closed

web app + List.map + breakpoint => bug? #19549

DartBot opened this issue Jun 19, 2014 · 6 comments
Assignees
Labels
P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@DartBot
Copy link

DartBot commented Jun 19, 2014

This issue was originally filed by kiuhnm...@gmail.com


  1. run the Dart Editor
  2. create a web application
  3. replace main with

  void main() {
    int count = 0;
    f(x) {
      print("v($count) = $x"); // <--- breakpoint here
      count++;
    }
 
    [1,2,3].map(f).toList();
  }

  1. put a breakpoint where indicated in the code above
  2. run

Before the breakpoint is hit, the program outputs

  v(0) = 1 (:438)
  v(1) = 1 (:438)
  v(2) = 3 (:438)
  v(3) = 3 (:438)
  v(4) = 1 (:438)
  v(5) = 1 (:438)
  v(6) = 3 (:438)
  v(7) = 3 (:438)

Note that if you create a command-line application everything works fine.

@peter-ahe-google
Copy link
Contributor

Removed Area-TryDart label.
Added Area-Editor label.

@clayberg
Copy link

cc @keertip.
Set owner to @devoncarew.
Added this to the Later milestone.
Removed Priority-Unassigned label.
Added Priority-Medium label.

@devoncarew
Copy link
Member

I can repo this in Dartium but not in the command-line. I think the Dartium debugger is evaluating f when it hits a breakpoint and causes the print statement to execute.


Set owner to @jacob314.
Removed Area-Editor label.
Added Area-Dartium label.

@jacob314
Copy link
Member

We aren't evaluating f. That would be a catastrophic bug.
The issue is we are evaluating toString() on the object which isn't good either but has more limited negative consequences. I'm working on getting rid of the toString calls as well as obviously we shouldn't be triggering side effects without the user at least triggering that they want to expand out all properties for an object.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the Later milestone.
Added Oldschool-Milestone-Later label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-Later label.

@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed triaged labels Mar 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

8 participants