# \[BUG?\] Vector creates "NaN" in linear repeater

**URL:** <https://tech-community.robotics.abb.com/t/bug-vector-creates-nan-in-linear-repeater/10196>\
**Category:** UpFeed\
**Tags:** robotstudio, smart-components\
**Created:** [May 25, 2021, 8:23am UTC](https://tech-community.robotics.abb.com/t/bug-vector-creates-nan-in-linear-repeater/10196 "2021-05-25T08:23:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kkNielsen](https://avatars.discourse-cdn.com/v4/letter/k/c89c15/32.png) [@kkNielsen](https://tech-community.robotics.abb.com/u/kkNielsen)\
**Post date:** [May 25, 2021, 8:23am UTC](https://tech-community.robotics.abb.com/t/bug-vector-creates-nan-in-linear-repeater/10196/1 "2021-05-25T08:23:17Z")

</div>

Hi, I think i have found a bug in the smartcomponent system. I have a linear repeater called “stackspawn”, which i use to make a stack of my parts. However, I have found that when setting all the values in the vector to zero (see image). The offset of the linear repeater becomes NaN.

Is this a feature or a bug?

 ![image.png](https://europe1.discourse-cdn.com/flex005/uploads/robotics1/original/2X/d/d2b6033e84a9bbdb5f18f5d8f7c5e6142c7deb7e.png)

---

<div class="post-metadata">

**Author:** ![Maxim](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/maxim/32/4429_2.png) [@Maxim](https://tech-community.robotics.abb.com/u/Maxim)\
**Post date:** [September 9, 2021, 12:03pm UTC](https://tech-community.robotics.abb.com/t/bug-vector-creates-nan-in-linear-repeater/10196/2 "2021-09-09T12:03:55Z")

</div>

Hi [kkNielsen](https://forums.robotstudio.com/profile/kkNielsen),

Why would it be meaningful with an offset of [0,0,0]mm?

Do you have any use cases where this feature would be useful?

Thanks!

---

<div class="post-metadata">

**Author:** ![Tompanhuhu](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/tompanhuhu/32/3366_2.png) [@Tompanhuhu](https://tech-community.robotics.abb.com/u/Tompanhuhu)\
**Post date:** [September 26, 2021, 7:45pm UTC](https://tech-community.robotics.abb.com/t/bug-vector-creates-nan-in-linear-repeater/10196/3 "2021-09-26T19:45:38Z")

</div>

> [@Maxim Riabichev](#):
>

Would you consider 0 to be a number or “Not A Number” ?

---

<div class="post-metadata">

**Author:** ![Maxim](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/maxim/32/4429_2.png) [@Maxim](https://tech-community.robotics.abb.com/u/Maxim)\
**Post date:** [September 27, 2021, 7:31am UTC](https://tech-community.robotics.abb.com/t/bug-vector-creates-nan-in-linear-repeater/10196/4 "2021-09-27T07:31:00Z")

</div>

Hello Tompan,

Please consider that the SmartComponent in question is a LinearRepeater. The reason 0 isn’t an acceptable number, in this case, is because that would make the LinearRepeater into a Source SC.

That’s why I asked if there perhaps was some case where a 0 on a LinearRepeater would be useful.

---

<div class="post-metadata">

**Author:** ![kkNielsen](https://avatars.discourse-cdn.com/v4/letter/k/c89c15/32.png) [@kkNielsen](https://tech-community.robotics.abb.com/u/kkNielsen)\
**Post date:** [October 5, 2021, 7:49am UTC](https://tech-community.robotics.abb.com/t/bug-vector-creates-nan-in-linear-repeater/10196/5 "2021-10-05T07:49:14Z")

</div>

@Maxim Thanks for answering.  
I would not consider 0 to be NaN. It took quite a few hours of debugging to figure out that the LinearRepeater was the cause of my problems.  
In my case there were use cases where I only had 1 object in my stack and then I would not specify the offset, If I have more than 1 object in my stack i would add an offset based on the amount of objects.
