Script Source is Randomly Replaced with another Script's Source

Issue Type: Other
Impact: High
Frequency: Sometimes
Date First Experienced:
Date Last Experienced: 2021-04-24 20:04:00 (-04:00)

Reproduction Steps:
I am not sure how this is reproduced. I noticed this issue in place 6715580319 today but have had similar issues in other places in the past.

I did notice a weird collaborative editing thing about merging from the server. No one else has access to team create for this place except me.

Expected Behavior:
I do not expect Roblox Studio to replace script contents with other scripts.

Actual Behavior:
Roblox Studio will replace the contents of my scripts with other scripts.

Workaround:
Files:
https://devforum.roblox.com/t/script-source-is-randomly-replaced-with-another-script-s-source/1187261?u=colesquared

6 Likes

IIRC I have heard more than one person complain about this.

It would be good if more information could be provided from people who have had this issue.

E.g.

  • Log files DMed privately to @bug-files and linked in your reply
  • The ID of your affected place
  • If you were using Team Create
  • If you were using Collaborative Editing
  • What beta features you have turned on.
3 Likes

Yeah, I complained about this as well. It’s annoying and it seems to only do it when you switch between script windows quickly.

3 Likes

Hi all,

Would you help to check the “Script Editor Linting” beta feature is on? If yes, try to turn off, restart and see that issue will happen again?

I also want know more detail about it. @ColeSquared how do you know it’s replaced by other scripts? Did Studio just don’t save your script after editing? Or you found the content of some scripts are changed to exactly the same with other scripts of your place when you reload it?

4 Likes

This beta feature was enabled. I’m not sure how to check if disabling it solved the issue because I do not know how to reproduce it.

I had 2 scripts open when this was happening. Board and GameAi. I’ve wrote both of these so I know what each look like. Multiple times the contents of the Board script would be replaced with the contents of GameAi. The only way to get the previous source of Board was using previous saves if available. I never saw the contents of GameAi get replaced with Board. Usually the script would just be replaced with nothing else, but a few times there was a strange message in the Drafts widget about merging from the server. When opening the merge modal, I saw that the draft had the contents of Board which is normal, but the server had the contents of GameAi, which I do not expect to happen.

Edit: Minutes after posting this, I went to Roblox Studio and I was able to reproduce this issue with the beta feature disabled.

I have attached log files here.
https://devforum.roblox.com/t/script-source-is-randomly-replaced-with-another-script-s-source/1187261?u=colesquared

2 Likes

Do you remember what you did before you saw the issue:

  • Did you try to commit something?
  • Did you try merge something from server?
  • You was the only one who was editing the place?
2 Likes

The issue seems to be related to switching tabs in the IDE. I usually commit my scripts often. I never had to merge from the server except for the strange cases mentioned earlier. I am the only one editing the place.

I do recall having this issues occasionally in the past few months in non-team create places, but it was pretty rare and I just assumed that I must’ve copy and pasted something else. Since posting this bug report it has happened a lot more often though.

I’ve encountered this issue again with strange merges from the server in Team Create. No one else is in this team create. This is in place ID 6682188119.


could you provide the Studio log from that session as well?

possible steps to reproduce, I assume you have something like this:

  1. you have 2 scripts in drafts and have 2 editors open
  2. you commit one of the scripts
  3. shortly after you see merge state on the script you’ve just committed
  4. when you try to do a merge, you see the script content is from the second script which was never committed

could you confirm this is the case?

can you recall the exact combination what scripts you had in drafts, what editors where open, which script you have committed, and how did you commit them (through drafts widget, or through editor tab)?

also could you list all the beta features you have enabled

I’m not sure if this issue is related to collaborative editing other than the strange merges. I’ve noticed it in non-team create places before. I have all betas except the physics pipeline and script editor listing.

I’m not sure on exact steps, but you need at least 2 scripts open. It happens when switching tabs usually.

I attached log files to the private message.

@ColeSquared, could you confirm if you still see the issue happening for you?

  • in Team Create with collaborative editing
  • in regular Team Create
  • in non-Team Create places
1 Like

I haven’t used Roblox Studio much recently, and I am unable to check because it is hard to reproduce this issue. If I do experience it in the future I’ll update this thread.