Arm Mbed OS support forum

Mbed simulator freezing when I compile code

I just recently started working with the Mbed Platform. As part of a course requirement, I was required to test some code using the simulator. After editing the Blink code, I added components and then ran the code.
After running the code, it successfully compiles and then the simulator freezes and the page becomes unresponsive. I’ve tried this on both the online simulator and offline.

Here is the code:
#include “mbed.h”

    #define BUTTON_1 p5
#define BUTTON_2 p6
#define BUTTON_3 p7
#define BUTTON_4 p8

#define RED_LED p9
#define YELLOW_LED p10
#define BLUE_LED p11

// Define the Input pins
DigitalIn start_btn(BUTTON_1);
DigitalIn stop_btn(BUTTON_2);
DigitalIn guard_sensor(BUTTON_3);
DigitalIn temp_sensor(BUTTON_4);

//Define the Output pins
DigitalOut rled(RED_LED);
DigitalOut yled(YELLOW_LED);
DigitalOut bled(BLUE_LED);

int main()
    while(1) {
        if (start_btn == 1){
            if ((guard_sensor == 1) && (temp_sensor == 0)){
                yled = 1;
                yled = 0;
                bled = 1;