Bug report : Collaborative Mode. Remote Terminal Changes Not Registered


#1

OK, problem recreated as follows : 1) I opened up hello world on terminal 1, make and run …no errors. 2) opened up terminal 2 and I see the same code. 3) I removed ; at the end of the printf on terminal 1, make gives compile error, flagging the missing ;. 4)terminal 2 also removed the ;. 5) Both programs now have that error and neither passes compile. 6) I replace ; on terminal 1, it shows up on terminal 2 also, terminal 1 compiles and runs code. 7) I remove ; again at terminal 2, that removal is reflected on terminal 1 also. 8) I shut down terminal 2, without saving… I used the X in the window to shut it down. 9) I look at terminal 1 code and the ; is still missing. I run hello and it works fine, with the ; still absent. So I save that program, make it and run it. … It passes the compile fine and runs fine BUT WITH THE ; MISSING !! Further insights into the problem. When i ran Make on terminal 1, in step 9 above , the compiler reported back :“make: `hello’ is up to date.”. So, if the last Make was problem free, but an error is introduced into the program, from another computer, in collaborative mode and that first computer code is saved and Make again, it just remembers the last make was good and there were no code changes using that particular terminal, it just basically says “Hey dude, you didn’t change any code and the last make worked fine so I’m giving it a pass again and I’m going to use the same machine code program to run it.” That is to say when code is changed on one terminal, via a second terminal, it fails to note the change in code, on the first terminal and just says the next save and make is to be ignored, the code was never changed therefore it’s “up to date”. In fact it was changed but using a remote terminal.


#2

I opened up hello world on terminal 1

how do you open hello world on terminal? do you use vim or nano?


#3

I’m using the Cloud 9 IDE for my Harvard CS50 course.


#4

Here’s the code that compiles and runs fine:

#include <cs50.h>
#include <stdio.h>

int main (void)
{
printf(“hello, world\n”) // Note the required semicolon is missing here.

}


#5

Sorry, I should have been more specific, I’m using the Cloud 9 “ide50 - CS50 IDE”. The bug appears to be in your menu item : File >> Save. Rather than save what is actually on the screen, I believe your IDE keeps track of keystrokes or something. Since I used Collaborative mode and removed that semicolon from a remote terminal, yes the ; did disappear from the local computer’s screen, but the Save function is still detecting it as being present, thus it compiles and runs without error. Alternatively, it could be a bug in the Make command. Since the local terminal was not used to remove the ;, it thinks nothing has been changed, it’s not looking at the code at all for errors, it just thinks " Hey, last Make was fine, nothing got changed on this local terminal, I will report back ““Make is up to date”” afterall last Make was fine and I didn’t detect any local keystrokes" Are you following me on this ?


#6

Sorry i don’t quite understand how do you open a file in terminal 1 and terminal 2.
What command do you type in terminal to open the file?
Also could you tell us the url you are using to open the ide. That would help us to debug the issue.


#7

Harvard University has some sort of arrangement with Cloud 9, that tens of thousands of their online students, via EDX, are going to use what they are calling the cs50 IDE. It’s a Cloud 9 product. Ask around your office and someone would surely know about it. At the beginning of the course, the students log on to this Linux environment. They then do an initialization that loads all the folders and files for the course. So we are working on these files , sometimes creating them from scratch, sometimes modifying existing code. They are written in C. If the file already exists , I use linux commands to get to it’s folder and then open it using your File menu. If not, I still go to the directory I wish to work in and make my own C language source file. Maybe ask your colleagues. I’m sure you will find someone within your ranks that know all about it.


#8

Are you or anyone else working on this problem ?


#9

Are you or anyone else working on this problem ?

I am trying to find the exact steps to reproduce the problem:)

If you see the issue when editing code with cloud9 editor (the top pane in the image above) it may be a bug in cloud9, and we’ll investigate it if you could tell us your workspace url.

If you are seeing the issue when editing file by launching some other editor in the terminal (the bottom pane), then it is not a bug in cloud9 and same would happen with any other linux terminal