Got error while trying to compile a code, tells me to notify devs


#1

Welp, while trying to upload code to an arduino micro, I came across a weird problem. Whenever I try to upload the code, the program window (not the border, like where the minimise and close buttons are) becomes unresponsive. Then, after about 30 seconds or so, I get a it saying Transpiling, followed immediately by a big ol’ red error box saying:

Error
UNEXPECTED_ERROR {“message”: “Maximum call stack size exceeded”}
The error has no formatted, which is a bug. Report the issue to XOD developers.

I’ve tried restarting the computer and program and both yield no different results.

So, here I am like the error message said. I do hope this can be solved soon. I’m excited for this code to work!

I would upload code…but it says I can’t as a new user…


#2

Hello!

Yes, it’s definitely a bug. What version of XOD do you use? Can you try to attach a xodball of the program that fails again? I think the forum platform will pass it now.


#3

You got is boss.

I am using version v0.22.0 (2018-07-11)

I actually uninstalled the program and then reinstalled the latest version, and the problem still persisted. I even tried uploading it to a Mega 2560, same problem. I also tried deleting certain segments of the code to see if I can generate a different error message, but nothing.

Anyways, here’s the file: Kapkan Mine build 0.0.1.xodball (5.5 KB)


#4

Hi!
Could you please also attach a screenshot of how your patch looks?

When I opened it, I got this:


which is quite weird.

Does this kapkan-fixed.xodball (5.0 KB) version work ok?


#5

@evgenykochetkov I see the same behavior on the latest dev version. But 0.22.0 refuses to open the xodball at all. It shows a gray screen with an error in the console:

Uncaught TypeError: Cannot read property 'length' of undefined
    at file:///home/nailxx/devel/xod-latest/packages/xod-client-electron/src-babel/bundle.js:11447:49
    at args.(anonymous function) (file:///home/nailxx/devel/xod-latest/packages/xod-client-electron/src-babel/bundle.js:90997:27)
    at _map (file:///home/nailxx/devel/xod-latest/packages/xod-client-electron/src-babel/bundle.js:28829:19)
    at map (file:///home/nailxx/devel/xod-latest/packages/xod-client-electron/src-babel/bundle.js:4199:14)
    at file:///home/nailxx/devel/xod-latest/packages/xod-client-electron/src-babel/bundle.js:2023:15
    at f2 (file:///home/nailxx/devel/xod-latest/packages/xod-client-electron/src-babel/bundle.js:396:16)
    at file:///home/nailxx/devel/xod-latest/packages/xod-client-electron/src-babel/bundle.js:91001:15
    at file:///home/nailxx/devel/xod-latest/packages/xod-client-electron/src-babel/bundle.js:28814:27
    at file:///home/nailxx/devel/xod-latest/packages/xod-client-electron/src-babel/bundle.js:9495:49
    at file:///home/nailxx/devel/xod-latest/packages/xod-client-electron/src-babel/bundle.js:11444:41

The crash is in

var upsertDeadPins = exports.upsertDeadPins = (0, _types.def)('upsertDeadPins :: Node -> Patch -> Map PinKey Pin -> Map PinKey Pin', function (node, currentPatch, pins) {
  var nodeId = Node.getNodeId(node);

  var pinsByDir = R.compose(R.groupBy(Pin.getPinDirection), R.values)(pins);

  var rejectNondeadLinks = R.reject(R.either(R.both(Link.isLinkInputNodeIdEquals(nodeId), R.pipe(Link.getLinkInputPinKey, R.has(R.__, pins))), R.both(Link.isLinkOutputNodeIdEquals(nodeId), R.pipe(Link.getLinkOutputPinKey, R.has(R.__, pins)))));

  return R.compose(R.merge(pins), R.indexBy(Pin.getPinKey), R.unless(R.isEmpty, R.compose(R.map(R.apply(Pin.createDeadPin)), R.unnest, R.values, R.mapObjIndexed(function (group, direction) {
    return (0, _xodFuncTools.mapIndexed)(
    // Adds a correct order as a third element of each Array
    function (data, idx) {
      return R.append(idx + pinsByDir[direction].length, data);
    }, group);
  }), R.groupBy(R.nth(1)), R.map(R.ifElse(Link.isLinkInputNodeIdEquals(nodeId), function (link) {
    return [Link.getLinkInputPinKey(link), CONST.PIN_DIRECTION.INPUT];
  }, function (link) {
    return [Link.getLinkOutputPinKey(link), CONST.PIN_DIRECTION.OUTPUT];
  })))), rejectNondeadLinks, listLinksByNode)(nodeId, currentPatch);
});

Looks like it was fixed in https://github.com/xodio/xod/pull/1399

@magic-mallet Do you ever see the same picture? I mean, do you have a red input pin above the constant node? Can you attach a screenshot of what you see on the patch?


#6

Thanks for the speedy Replys peeps. So first off is @evgenykochetkov

That is how it should look. Nasty I know, but I couldn’t think of a way to have the equal compare a reading it just got to the last one it took. Maybe that created some weird loop? And as for the Random Val node, I decided to eventually scrap it and try to work something else out (I want it to activate when it comes back as false.

Unfortunately, it gives me the same error report. I altered the code a small bit to remove some (what I now see as) redundant parts that might be causing issue, but the problem persists. Also, the fixed code you uploaded does not work as well…

And now @nkrkv

Aside from the error message I recieve, I don’t see any other errors or messages. If it helps at all, I’m currently running windows 8.1 (eck). Might that have some negative results on the uploading process in patch 0.22.0?
Also, here is the screenshot of the current code (with the constant value and an extra ultrasonic sensor signal node removed).

I honestly don’t know what is causing it, as even using the tutorial code and using a different micro controller, it still doesn’t work.

I thank you both for your help.


#7

That’s very-very weird. Something really strange happens. The screenshot you’ve posted is very different from what we see when opening the xodball you’ve shared. Notably, I don’t see a delay node in your screenshot, however, I see it on ours and it is positioned quite carefully (does not seems like a trash).

I also tried to reproduce the program on your screenshot as is and then hit Deploy → Show code for Arduino. All worked fine.

May I ask you to try to make a blank project and re-build the program node by node, link by link? Do you still get the awkward behavior?


#8

Greetings,

Sorry for the delayed response, Job related stuff and whatnot.

Anyways, I have actually tried to use the tutorial code from a fresh open and install, only to have it fail in the same way. I do however have one idea that might be causing this issue.

Because I don’t really use this laptop for much (since I have my main rig elsewhere), It is not up to date on windows 8.1 updates. Before, I didn’t need to do these updates, as all programs I use in the small time I did use the laptop worked fine. Because of the extreme humidity and thus heat, I have been forced to live in the basement like a troglodyte. I have yet to update the windows 8.1 OS, and since it might be substantially out of date, maybe there is an error where XOD is relying on code or compatibility from a windows update. Could this be an issue?

In any case, I will keep picking at the problem in my spare time and see if I can get anything to happen.
Thank you for the help you’ve given me, I really do appreciate it.

-Magic Mallet


#9

I don’t think Windows update state can affect XOD anyhow. Seems like the data is messed somehow. I have no ideas but uninstall XOD, remove directory C:\Users\<user>\AppData\Roaming\xod-client-electron, and install again.

By the way, have you tried the web version of the IDE? Are you getting a correct program there?


#10

Greetings,

So, I have done as you said, and the error persists. At this point, it might be something to do with my machine more than anything, as this is a new install with a new version. Might it also be the micro controller that’s causing the issue? Maybe the program is being corrupted by an old or maybe corrupt itself arduino? At any rate, I have not a clue. I will be away from the 21st to the 24th on vacation. I hope someone finds an answer to this extremely unusual problem.

-Magic Mallet