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

instance_id for new objects in rooms is incorrect if there are gaps. #180

Closed
sorlok opened this issue Dec 13, 2014 · 5 comments
Closed

instance_id for new objects in rooms is incorrect if there are gaps. #180

sorlok opened this issue Dec 13, 2014 · 5 comments

Comments

@sorlok
Copy link
Contributor

sorlok commented Dec 13, 2014

Steps to reproduce:

  1. Create a new project. Create 1 room and 1 object.
  2. Create 10 instances of the object in the room.
  3. Delete (right-click) instances 7,8,9.
  4. Save, close the editor.
  5. Re-open the editor and the project.
  6. Create 4 instances of the object in the room. You will now have two instances with the same ID (the 10th object).

Any ideas?

@egofree71
Copy link
Collaborator

One way to fix this problem is to call 'Defrags Ids' menu ('Resources->Defrag Ids').

@sorlok
Copy link
Contributor Author

sorlok commented Dec 15, 2014

This is a good short-term fix, thanks. But I think we need to fix this at the editor level too; it's no fun having two instances with the same id (one will just silently overwrite the other).

@RobertBColton
Copy link
Collaborator

This ticket is an extension of #188 and we will get it resolved @sorlok

@RobertBColton
Copy link
Collaborator

@sorlok If you do not mind I am going to close this actually because it is a duplicate of #82 but I think I may fix it in this next LGM release I am going to make within the next few months. I am linking the ticket still because you have the steps to reproduce it. It should be easy to fix, but we don't need two tickets.

@RobertBColton
Copy link
Collaborator

RobertBColton commented Apr 15, 2016

This was finally corrected in 1.8.7 by properly reading and writing the instance names in the GMX format. I was only able to reproduce sorlok's issue with the GMX file handlers. I also discovered that I was not updating the lastId properly which caused the issue.

// NOTE: Because LGM still supports GMK, we attempt to preserve the ID which Studio

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

No branches or pull requests

3 participants