PuzzleScript icon indicating copy to clipboard operation
PuzzleScript copied to clipboard

"there are type errors and exceptions triggered by some scripts that really should not happen."

Open increpare opened this issue 1 year ago • 1 comments

awaiting further comment

increpare avatar Mar 10 '23 10:03 increpare

Simply run the tests and watch the console. There are 14 exceptions (see below).

One is a throw from too many errors, one is a failure in multiple ellipses. These exceptions should be caught and reported, not sent to the console.

The rest are reasonably simple type errors. See #954, and I've tracked down the rest. The fix is simple enough, but too invasive to do without consultation.

compiler.js:2914 aborting compilation
testingFrameWork.js:83 TypeError: Cannot read properties of undefined (reading 'STRIDE_MOV')
    at setGameState (engine.js:604:23)
    at compile (compiler.js:2959:9)
    at runCompilationTest (testingFrameWork.js:81:3)
    at Object.<anonymous> (tests.js:57:8)
    at Test.run (qunit-1.12.0.js:203:18)
    at qunit-1.12.0.js:361:10
    at process (qunit-1.12.0.js:1453:24)
    at next (qunit-1.12.0.js:1446:3)
compiler.js:2914 Error: Too many errors/warnings; aborting compilation.
    at TooManyErrors (parser.js:32:11)
    at logError (parser.js:67:17)
    at checkObjectsAreLayered (compiler.js:2203:17)
    at loadFile (compiler.js:2847:5)
    at compile (compiler.js:2911:21)
    at runCompilationTest (testingFrameWork.js:81:3)
    at Object.<anonymous> (tests.js:57:8)
    at Test.run (qunit-1.12.0.js:203:18)
    at qunit-1.12.0.js:361:10
    at process (qunit-1.12.0.js:1453:24)
compiler.js:2914 TypeError: Cannot read properties of undefined (reading 'layer')
    at generateExtraMembers (compiler.js:358:51)
    at loadFile (compiler.js:2817:5)
    at compile (compiler.js:2911:21)
    at runCompilationTest (testingFrameWork.js:81:3)
    at Object.<anonymous> (tests.js:57:8)
    at Test.run (qunit-1.12.0.js:203:18)
    at qunit-1.12.0.js:361:10
    at process (qunit-1.12.0.js:1453:24)
    at next (qunit-1.12.0.js:1446:3)
testingFrameWork.js:83 TypeError: Cannot read properties of undefined (reading 'STRIDE_MOV')
    at setGameState (engine.js:604:23)
    at compile (compiler.js:2959:9)
    at runCompilationTest (testingFrameWork.js:81:3)
    at Object.<anonymous> (tests.js:57:8)
    at Test.run (qunit-1.12.0.js:203:18)
    at qunit-1.12.0.js:361:10
    at process (qunit-1.12.0.js:1453:24)
    at next (qunit-1.12.0.js:1446:3)
compiler.js:2914 TypeError: Cannot read properties of undefined (reading 'push')
    at generateSoundData (compiler.js:2699:56)
    at loadFile (compiler.js:2853:5)
    at compile (compiler.js:2911:21)
    at runCompilationTest (testingFrameWork.js:81:3)
    at Object.<anonymous> (tests.js:57:8)
    at Test.run (qunit-1.12.0.js:203:18)
    at qunit-1.12.0.js:361:10
    at process (qunit-1.12.0.js:1453:24)
    at next (qunit-1.12.0.js:1446:3)
compiler.js:2914 TypeError: Cannot read properties of undefined (reading 'anyBitsInCommon')
    at levelFromString (compiler.js:476:34)
    at levelsToArray (compiler.js:505:21)
    at loadFile (compiler.js:2819:5)
    at compile (compiler.js:2911:21)
    at runCompilationTest (testingFrameWork.js:81:3)
    at Object.<anonymous> (tests.js:57:8)
    at Test.run (qunit-1.12.0.js:203:18)
    at qunit-1.12.0.js:361:10
    at process (qunit-1.12.0.js:1453:24)
    at next (qunit-1.12.0.js:1446:3)
testingFrameWork.js:83 TypeError: Cannot read properties of undefined (reading 'STRIDE_MOV')
    at setGameState (engine.js:604:23)
    at compile (compiler.js:2959:9)
    at runCompilationTest (testingFrameWork.js:81:3)
    at Object.<anonymous> (tests.js:57:8)
    at Test.run (qunit-1.12.0.js:203:18)
    at qunit-1.12.0.js:361:10
    at process (qunit-1.12.0.js:1453:24)
    at next (qunit-1.12.0.js:1446:3)
compiler.js:2914 TypeError: Cannot read properties of undefined (reading 'groupNumber')
    at processRuleString (compiler.js:678:73)
    at rulesToArray (compiler.js:897:23)
    at loadFile (compiler.js:2820:5)
    at compile (compiler.js:2911:21)
    at runCompilationTest (testingFrameWork.js:81:3)
    at Object.<anonymous> (tests.js:57:8)
    at Test.run (qunit-1.12.0.js:203:18)
    at qunit-1.12.0.js:361:10
    at process (qunit-1.12.0.js:1453:24)
    at next (qunit-1.12.0.js:1446:3)
testingFrameWork.js:83 TypeError: Cannot read properties of undefined (reading 'STRIDE_MOV')
    at setGameState (engine.js:604:23)
    at compile (compiler.js:2959:9)
    at runCompilationTest (testingFrameWork.js:81:3)
    at Object.<anonymous> (tests.js:57:8)
    at Test.run (qunit-1.12.0.js:203:18)
    at qunit-1.12.0.js:361:10
    at process (qunit-1.12.0.js:1453:24)
    at next (qunit-1.12.0.js:1446:3)
compiler.js:2914 TypeError: Cannot read properties of undefined (reading 'reverse')
    at rewriteUpLeftRules (compiler.js:991:25)
    at rulesToArray (compiler.js:933:9)
    at loadFile (compiler.js:2820:5)
    at compile (compiler.js:2911:21)
    at runCompilationTest (testingFrameWork.js:81:3)
    at Object.<anonymous> (tests.js:57:8)
    at Test.run (qunit-1.12.0.js:203:18)
    at qunit-1.12.0.js:361:10
    at process (qunit-1.12.0.js:1453:24)
    at next (qunit-1.12.0.js:1446:3)
testingFrameWork.js:83 TypeError: Cannot read properties of undefined (reading 'STRIDE_MOV')
    at setGameState (engine.js:604:23)
    at compile (compiler.js:2959:9)
    at runCompilationTest (testingFrameWork.js:81:3)
    at Object.<anonymous> (tests.js:57:8)
    at Test.run (qunit-1.12.0.js:203:18)
    at qunit-1.12.0.js:361:10
    at process (qunit-1.12.0.js:1453:24)
    at next (qunit-1.12.0.js:1446:3)
compiler.js:2914 aborting compilation
testingFrameWork.js:83 TypeError: Cannot read properties of undefined (reading 'STRIDE_MOV')
    at setGameState (engine.js:604:23)
    at compile (compiler.js:2959:9)
    at runCompilationTest (testingFrameWork.js:81:3)
    at Object.<anonymous> (tests.js:57:8)
    at Test.run (qunit-1.12.0.js:203:18)
    at qunit-1.12.0.js:361:10
    at process (qunit-1.12.0.js:1453:24)
    at next (qunit-1.12.0.js:1446:3)

david-pfx avatar Mar 10 '23 12:03 david-pfx