
When I go into the product tab in admin panel, it becomes like this. (the whole page) None of the buttons are functional and when I click 2-7, it becomes normal:

When I try to go back to the first page, it gives me a:
ErrorOops, something went wrong (Internal Server Error). Please try again.
Also, I'm getting this error:
<!-- PHP Fatal Error Message Allowed memory size of 268435456 bytes exhausted (tried to allocate 72058049 bytes) Error at app/lib/vendor/imagine/imagine/lib/Imagine/Gd/Image.php, line: 617 Backtrace -->
It goes away and comes back every few minutes. I do not know what the problem is.
EDIT: It seems like there is a ghost product in one of my categories I will try to remove it.
I deleted the product within the database and all seems ok now.
CONCLUSION
Uploading a large image ex:5000x5000 causes crashes.