Bad memory could be a possible cause since the laptop worked for a short while after swapping the memory around in the slots. It would help to know what model Sony Laptop you have. Some Sony laptops had a problem with memory retention. The memory sticks would not remain tightly seated in the slots. Try removing the cover over the memory (should be on the bottom of the laptop) and power up the laptop while GENTLY pressing the memory up and toward the slot. If the laptop boots, release the pressure on the memory and see if the laptop freezes or shuts down. I attached a small piece of non-conductive foam padding on the inside of the memory cover to put slight pressure on the memory on one Sony and the laptop has worked fine ever since. If the laptop is still under warranty return it and demand they fix it properly.