Handling multiple Browsers using Selenium

While accessing multiple browser windows with selenium webdriver at times the driver generates memory dump error while switching between browser windows where multiple browsers are opened as a result of some operation of the main window. When we use the following code to switch between the windows it generates a memory dump error.

from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()

# click on New Booking - Opens a new browser
element=driver.find_element(By.XPATH, '/html/body/form/table/tbody/tr[2]/td/div/table/tbody/tr/td[2]/ul/li[1]/a').click()

handles = driver.window_handles
no_of_windows = len(handles)
for intlpcnt in range(0, size):