When a custom webpart gives the runtime exception while loading , you can slove by two ways
1) standard way ( retracting the solution)
2) adding ?contents=1 in the url and later delete the custom webpart
Sharepoint smoking...............