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

bboxFromPath expected pathData to be nonempty #1629

Open
Johnicholas opened this issue Aug 31, 2023 · 1 comment
Open

bboxFromPath expected pathData to be nonempty #1629

Johnicholas opened this issue Aug 31, 2023 · 1 comment

Comments

@Johnicholas
Copy link

I saw a freeze and in the javascript console:

index-b4db132c.js:252 Uncaught (in promise) Error: bboxFromPath expected pathData to be nonempty
at R7t (index-b4db132c.js:252:89885)
at vle (index-b4db132c.js:252:95912)
at nu (index-b4db132c.js:252:82752)
at Hpt (index-b4db132c.js:264:4558)
at Object.body (index-b4db132c.js:236:29374)
at uAt (index-b4db132c.js:266:715)
at fAt (index-b4db132c.js:266:2864)
at mAt (index-b4db132c.js:266:3457)
at wFe (index-b4db132c.js:308:7821)
at NZ (index-b4db132c.js:313:1190349)

I wasn't intentionally using bboxFromPath?

.domain empty, .substance empty, .style:

canvas {
    width = 1000
    height = 1000
}

GLOBAL {
    COLOR_TRANSPARENT = #00000000
    COLOR_BLACK = #000000ff
    COLOR_DEBUG = #ff0000ff

    vec2 leftTangency = (?, ?)
    shape leftTangencyDebug = Circle {
        center: leftTangency
        r: 6
        fillColor: COLOR_DEBUG
    }
    vec2 leftCircleCenter = (?, ?)
    shape leftCircleCenterDebug = Circle {
        center: leftCircleCenter
        r: 6
        fillColor: COLOR_DEBUG
    }
    vec2 middleTangency = (?, ?)
    shape middleTangencyDebug = Circle {
        center: middleTangency
        r: 6
        fillColor: COLOR_DEBUG
    }
    vec2 rightCircleCenter = (?, ?)
    shape rightCircleCenterDebug = Circle {
        center: rightCircleCenter
        r: 6
        fillColor: COLOR_DEBUG
    }
    vec2 rightTangency = (?, ?)
    shape rightTangencyDebug = Circle {
        center: rightTangency
        r: 6
        fillColor: COLOR_DEBUG
    }

    shape leftLine = Line {
        start: (-1000, leftTangency[1])
        end: leftTangency
        strokeWidth: 2
    }
    shape leftCircle = Circle {
        center: leftCircleCenter
        r: vdist(leftTangency, leftCircleCenter)
        fillColor: COLOR_TRANSPARENT
        strokeColor: COLOR_DEBUG
        strokeWidth: 1
    }
    ensure leftCircleCenter[0] == leftTangency[0]
    ensure vdist(leftCircleCenter, leftTangency) == vdist(leftCircleCenter, middleTangency)

    shape rightCircle = Circle {
        center: rightCircleCenter
        r: vdist(middleTangency, rightCircleCenter)
        fillColor: COLOR_TRANSPARENT
        strokeColor: COLOR_DEBUG
        strokeWidth: 1
    }
    ensure collinearOrdered(leftCircleCenter, middleTangency, rightCircleCenter)
    ensure vdist(middleTangency, rightCircleCenter) == vdist(rightCircleCenter, rightTangency)
    ensure rightCircleCenter[0] == rightTangency[0]
    shape rightLine = Line {
        start: rightTangency
        end: (1000, rightTangency[1])
        strokeWidth: 2
    }
    ensure leftCircleCenter[0] < middleTangency[0]
    shape leftArc = Path {
        d: arc("open", leftTangency, middleTangency, [leftCircle.r, leftCircle.r], 0, 0, 0)
        strokeWidth: 2
    }
    shape rightArc = Path {
        -- d: arc("open", middleTangency, rightTangency, [rightCircle.r, rightCircle.r], 0, 0, 0)
        strokeWidth: 2
    }
}

Screenshot:
image

  • OS: Windows 10
  • Browser: Chrome 116.0.5845.140 (Official Build) (64-bit) (cohort: M116_Respin)
@wodeni
Copy link
Member

wodeni commented Feb 27, 2024

repro: https://penrose.cs.cmu.edu/try/?gist=5ff635673bbc999340c62722cb8c86e3

Looks like this error is not caught even in the current version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Investigate
Development

No branches or pull requests

2 participants