Problem trying to connect DS1307 time clock and SSD1306 OLED screen using i2c

I am trying to connect a DS1307 time clock and an SSD1306_128X32 OLED screen with my arduino mega using i2c protocol. I am not familiar with i2c protocol and I am facing an problem as after few execution steps arduino freezes and stops working. Any help it would be appreciated. My code is:

#define CIN 9//pins definitions for the driver
#define DIN 8
RGBdriver Driver(CIN,DIN);
int R=0;
int G=0;
int B=0;
int m=1; // metriths
int k=0;

//u8g2----------------------------------------------------------------------------------------
#include <Arduino.h>
#include <U8g2lib.h>
U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0,SCL,SDA);

//---------------------------------------------------------------------------------------------
int Xronos[]={23,59,59,0}; //Xronos
char buffer[10];

void setup () {
 //Serial.begin(9600);
 Wire.begin();

// DS1307-------------------------------------------------------------------------------------
 rtc.begin();


 //RGB-----------------------------------------------------------------------------------------
Driver.begin();
Driver.SetColor(0, 0, 0);
Driver.end();

//Fan-----------------------------------------------------------------------------------------
pinMode(10,OUTPUT);

//u8g2----------------------------------------------------------------------------------------
u8g2.begin();
u8g2.clearBuffer();         // clear the internal memory
u8g2.clearDisplay();
}

void loop () {
Serial.begin(9600);
Timee();
Screen();
digitalWrite(10, HIGH);
delay(900);
//Serial.end();
}

void Screen(){
  u8g2.clearBuffer();         // clear the internal memory
  u8g2.setFont(u8g2_font_fur30_tr   );  // choose a suitable font
  u8g2.setCursor(20, 31);
  sprintf(buffer, "%02d:%02d", Xronos[1], Xronos[2] );
  u8g2.print(buffer);
  u8g2.sendBuffer();          // transfer internal memory to the display
  }

void Timee(){
 DateTime now = rtc.now();
 Serial.print(now.hour());
 Serial.print(':');
 Serial.print(now.minute());
 Serial.print(':');
 Serial.print(now.second());
 Serial.println();

Xronos[0]=now.hour();
delay (30);
Xronos[1]=now.minute();
delay (30);
Xronos[2]=now.second();
delay (30);
if (Xronos[2]==0 ||Xronos[2]==20||Xronos[2]==40){
R=(R+m);
Fos();
k=Xronos[1];
}
}

void Fos(){

Serial.print(k);
Serial.print('/');
Serial.print(R);
Serial.print("   ");

//Driver.begin(); // begin
Driver.SetColor(R, G, B);
delay (25);
Driver.end();

}

I'm surprised it worked at all, and maybe it didn't. You have not defined the I2C address for the RTC or the display, so I can't see how you can possibly get a result.

DS1307 is usually at 0x68
my OLED is at 0x3C I understand some are at 0x3D

You appear to have no begin command for OLED either. Further, the serial.begin should be in setup. I'm sure there is no point in asking why you have commented it out.

I suggest you check the library examples for the RTC and OLED and start over with each. No comment on the RGB driver, other than forget about it for the moment.