-
Notifications
You must be signed in to change notification settings - Fork 5
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
CT: Assertion failed: scale should be finite #321
Comments
Not immediately reproducible after 5 minutes running unbuilt with Manually mapping the FramedImageNode.js assertion to FramedImageNode.ts, it's failing at line 88: const scaleX = ( viewBounds.width / initialWidth ) || GOConstants.MIN_SCALE; // prevent zero scale
const scaleY = ( viewBounds.height / initialHeight ) || GOConstants.MIN_SCALE; // prevent zero scale
88 parentNode.scale( scaleX, scaleY ); Node.js is failing at line 2120: // eslint-disable-line
scale(x, y, prependInstead) {
// eslint-disable-line
if (typeof x === 'number') {
2120 assert && assert(isFinite(x), 'scales should be finite'); ... which maps to Node.ts line 2285: scale( s: number, prependInstead?: boolean ): void;
scale( s: Vector2, prependInstead?: boolean ): void; // eslint-disable-line
scale( x: number, y: number, prependInstead?: boolean ): void; // eslint-disable-line
scale( x: number | Vector2, y?: number | boolean, prependInstead?: boolean ) { // eslint-disable-line
if ( typeof x === 'number' ) {
2285 assert && assert( isFinite( x ), 'scales should be finite' ); |
This has not occurred in the 4 most-recent CT cycles. It has not occurred since 2/20/2022 @ 1:30:34 AM. And CT seems to have restarted, so I can't tell how many times it occurred since the first occurrence on 2/19/2022 @ 3:31:37. So before spending more time on this, I'm going to wait to see if it reoccurs, or was perhaps some transient common-code issue. |
Still nothing in CT, so closing. |
Reopening. This occurred once:
Manually mapping from .js to .ts, this is occurring on line 87 of FramedImageNode.ts: const initialWidth = parentNode.width;
const initialHeight = parentNode.height;
const scaleX = ( viewBounds.width / initialWidth ) || GOConstants.MIN_SCALE; // prevent zero scale
const scaleY = ( viewBounds.height / initialHeight ) || GOConstants.MIN_SCALE; // prevent zero scale
87 parentNode.scale( scaleX, scaleY ); |
I suspect that parentNode has zero bounds because the Image node that it wraps does not have valid bounds -- for some reason. In the above commit, I've added assertions with messages that will help me (dis)prove this theory. EDIT: I've tried to reproduce this locally with |
I haven't seen this failure since 3/1/2022. |
I fuzzed tested the unbuilt sim for 30 minutes and did not encounter this problem. |
This is a non-blocking error. It won't cause the sim to crash, and is unlikely to result in any noticeable problems in practice. 1.1 was published with this as a known issue. |
Can you confirm if this issue is still needed? I don't see it in CT right now, but it is noted as rare. For phetsims/qa#832 |
Yes, please keep this open. |
It is not necessary to address this for #278, the 1.3 PhET-iO release. |
Still occurring occassionally, last seen 5/4/23 @ 10:56AM. |
Still occurring occassionally, last seen 9/25/2023, 11:16:26 PM. I still cannot reproduce locally.
|
After addressing #487, this is occurring again in CT, see below. The problem is that
|
Addressed in the above commit by testing for both zero and non-finite scale. I'll leave this open for a few cycles to verify that CT is happy. |
CT is happy. Closing. |
The first time that this occurred in CT was Saturday 2/19/2022 @ 3:31:37 AM. I hadn't touched the code since Thu 2/18/2022 @ 8:57PM. So I'm wondering if this is a common-code regression.
The text was updated successfully, but these errors were encountered: