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

dart2js: Uncaught TypeError #9481

Closed
markhats opened this issue Mar 28, 2013 · 13 comments
Closed

dart2js: Uncaught TypeError #9481

markhats opened this issue Mar 28, 2013 · 13 comments
Labels
closed-obsolete Closed as the reported issue is no longer relevant needs-info We need additional information from the issue author (auto-closed after 14 days if no response) P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) web-dart2js

Comments

@markhats
Copy link

With the latest Editor update (v0.4.3_r20602) I now get the following error when using the dart2js output:

Uncaught TypeError: Object #<Point2DObject> has no method 'get$xposition'

The line in the dart code that causes this is:

Point screenpoint = new Point(drawpoint.xposition, drawpoint.yposition);

where drawpoint is type Point2DObject and has members xposition and yposition.

This worked fine in v0.4.2_r20259.

@dgrove
Copy link
Contributor

dgrove commented Mar 28, 2013

Can you please provide exact reproduction steps for this?


Added NeedsInfo label.

@dgrove
Copy link
Contributor

dgrove commented Mar 28, 2013

We don't have enough info in this bug to take action. Can you please provide exact reproduction steps?


Added NeedsInfo label.

@markhats
Copy link
Author

markhats commented Apr 2, 2013

Having trouble getting this to happen in a small sample for you to test. It only seems to occur in quite a big app I am working on. I will keep trying but have had to go back to the previous editor version for now.

@markhats
Copy link
Author

markhats commented Apr 2, 2013

A bit more info:

The Javascript, generated by Dart2js, that causes the error is of the following form:

var t1, t2, screenpoint;
    t1 = this.grid;
    t2 = this.point;
    screenpoint = $.Point$(t1.MathToScreenX$1(t2.get$xposition()), t1.MathToScreenY$1(t2.get$yposition()));

If I manually change the t2.get$xposition() and t2.get$yposition() to t2.xposition and t2.yposition, the error is eliminated.

@kasperl
Copy link

kasperl commented Apr 3, 2013

This issue could be caused by our new type inferrer. One thing we may be able to do is to provide a flag for turning off certain optimizations. However, a reproduction would really be helpful.

@anders-sandholm
Copy link
Contributor

Added Area-Dart2JS label.

@kasperl
Copy link

kasperl commented Apr 22, 2013

Added this to the Later milestone.

@DartBot
Copy link

DartBot commented Apr 29, 2013

This comment was originally written by ngeoffray@google.com


Mark, do you have any update for this bug?

@markhats
Copy link
Author

Sorry, no. I've tried but I can't seem to reproduce it in a small example project.

For now, I have just added getters and setters for xposition and yposition, even though all they do is retrieve/set private data members _xposition and _yposition.

This seems to work around the problem.

@kasperl
Copy link

kasperl commented May 23, 2013

Added TriageForM5 label.

@kasperl
Copy link

kasperl commented May 28, 2013

Removed TriageForM5 label.

@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.

@markhats markhats added Type-Defect web-dart2js needs-info We need additional information from the issue author (auto-closed after 14 days if no response) labels Aug 4, 2014
@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 Priority-Medium labels Mar 1, 2016
@sigmundch sigmundch added the closed-obsolete Closed as the reported issue is no longer relevant label Jun 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-obsolete Closed as the reported issue is no longer relevant needs-info We need additional information from the issue author (auto-closed after 14 days if no response) P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) web-dart2js
Projects
None yet
Development

No branches or pull requests

7 participants