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

Internal IDs appended instead of summed, causing severe bug #378

Closed
Mkellyeng opened this issue Mar 16, 2021 · 2 comments
Closed

Internal IDs appended instead of summed, causing severe bug #378

Mkellyeng opened this issue Mar 16, 2021 · 2 comments

Comments

@Mkellyeng
Copy link
Contributor

Context: If the internal ID exceeds 16 digits, floorspace enters a severely bugged state where you can't modify the file any further. 16 digits is a lot though, so it should never be a problem

Problem: When you save, close, and reopen a floorspace JSON, the internal ID counter appends "1" to the highest ID, and continues counting from that new number, adding a digit. In practice this means you can only save, close, reopen a finite number of times.

I've attached 3 floorspace JSON files, in which I've replicated the issue on the web version of floorspace (https://nrel.github.io/floorspace.js/).
Floorspace ID Test 01.json - Created the file, added one space, and saved.
Floorspace ID Test 02.json - Closed and reopened previous, added a second space, and saved.
Floorspace ID Test 03.json - Closed and reopened previous, added a second story, and saved.

Floorspace ID Test 01.json - Highest ID is "13"
Floorspace ID Test 02.json - IDs continue counting from is "131", highest ID is "138"
Floorspace ID Test 03.json - IDs continue counting from is "1381", highest ID is "1384"

Floorspace ID Test.zip

The bugged state:
I don't have an example on hand, but this issue (#377) appears to be in this state, based on what I've seen in the past. You basically can't create anything that uses an ID, so adding a new story or space has the strange double highlighting effect, and you can't draw any new spaces.

@Mkellyeng
Copy link
Contributor Author

Mkellyeng commented Mar 17, 2021

I've tried saving without closing and reopening each time. This did not cause the IDs to append. So it looks like it happens on the 'open'
Floorspace ID Test b.zip

@bgschiller
Copy link
Collaborator

Fixed with #379

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

No branches or pull requests

2 participants