GithubHelp home page GithubHelp logo

Comments (5)

hqkirkland avatar hqkirkland commented on June 27, 2024

Ah and here's the full error.

Uncaught TypeError: argList.shift is not a function at Object.callobj (projectorrays.js:87) at Bytecode.translate (projectorrays.js:87) at Handler.translate (projectorrays.js:67) at LingoScript.translate (projectorrays.js:50) at OpenShockwaveMovie.linkScripts (projectorrays.js:16) at FileReader.reader.onload.e (projectorrays.js:13) callobj @ projectorrays.js:87 Bytecode.translate @ projectorrays.js:87 Handler.translate @ projectorrays.js:67 LingoScript.translate @ projectorrays.js:50 OpenShockwaveMovie.linkScripts @ projectorrays.js:16 reader.onload.e @ projectorrays.js:13 FileReader (async) OpenShockwaveMovie.readFile @ projectorrays.js:13 OpenShockwaveMovie @ projectorrays.js:12 createNewOpenShockwaveMovie @ projectorrays.js:93 onclick @ left.htm:15

from openshockwave.

Brian151 avatar Brian151 commented on June 27, 2024

idk why we never replied to this @hqkirkland

idr if we discussed it on the discord server or not, but i'll bring it up!
sry for the not most particularly swift of replies...

that is a strange bug...
I honestly have no idea what's going there

as for the debugging of javascript, there's no proper way
you have to use the web console and hope that it displays something meaningful
console.log(obj.supposedMethod);

function(stuff){code;}
that's what you hope
JS is also especially bad at dealing with null/undefined (although, tbh, I side with the guy who said they're a[n expensive] mistake)
For example, when starting to write a parser for PFR, I miss-typed "length" as "lenth", and JS was so kind as to not throw an error until I tried to use the value I had supposedly read. The actual source of the error was in the code that gets said value from the arraybuffer (said value is an ascii string).
so, here's what happened:

  1. a for loop had an incorrect variable name, but 'worked' cuz NaN
  2. a function returned null
  3. a DOM manipulation failed because the value it was adding to the element was null
  4. execution halted
  5. an error was thrown
    So, this logical program flow caused me quite a hassle tracking down the exact bug. While this is possible in any language, JS is especially notorious for it, and that happens even in strict mode. (speaking of which, i should enable)

anyways, I'll mention this [again???] on the discord server

from openshockwave.

MrBrax avatar MrBrax commented on June 27, 2024

isn't this just because the argslist is empty?

from openshockwave.

hqkirkland avatar hqkirkland commented on June 27, 2024

Well thanks for the response! I haven't been able to use this since decommissioning my home server, but I may put it on a workstation my co. bought me.

from openshockwave.

Brian151 avatar Brian151 commented on June 27, 2024

some quick messing around in the JS console:

var test = []
undefined
test.shift()
undefined
var test2 = null;
undefined
test2.shift()
TypeError: test2 is null
var test3 = new Uint8Array(16)
undefined
test3.shift()
TypeError: test3.shift is not a function

empty array still has shift()
null is null, does nothing
a typed array does NOT have shift()

But, I still don't know what's going on here...

from openshockwave.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.