amir100 Posted August 30, 2004 Posted August 30, 2004 Hi, Anyone ever stumbled into System.OutOfMemoryException? Mind sharing why it happened and how to handle it? Thx. Quote Amir Syafrudin
Administrators PlausiblyDamp Posted August 30, 2004 Administrators Posted August 30, 2004 Could you post the code that is causing this problem? Much easier than people guessing as to the problem. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
wessamzeidan Posted August 30, 2004 Posted August 30, 2004 I used to get this exception when I use System.Drawing.Image.FromFile() to load an image from a file, and the file is not an image...... Quote Proudly a Palestinian Microsoft ASP.NET MVP My Blog: wessamzeidan.net
amir100 Posted August 30, 2004 Author Posted August 30, 2004 Could you post the code that is causing this problem? Much easier than people guessing as to the problem. I wish I could. It's just that I can't find the exact cause of why the exception occured. I don't have a clue why the exception occured, that's why I'm asking in a general manner. So, anything to share? :D Quote Amir Syafrudin
Administrators PlausiblyDamp Posted August 30, 2004 Administrators Posted August 30, 2004 Does it not crash on a particular line? Or in a particular routine? If you step through the code in a debugger does that not help you identify the problem? Also are you allocating any large arrays? Or using unmanaged resources? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
amir100 Posted August 30, 2004 Author Posted August 30, 2004 Does it not crash on a particular line? Or in a particular routine? If you step through the code in a debugger does that not help you identify the problem? Also are you allocating any large arrays? Or using unmanaged resources? Oh yea, I just remembered. It has something to do about a query ... and I left my code at my office :D. Well, when a friend :D fixed it, he just fixed the query. He only adds an alias to one of the columnName for the select query. Then abracadabra, the exception is taken care of. But I don't think he really knows why exactly the System.OutOfMemoryException occured. Actually, I'm trying to find out the exact reason why that kind of exception occured. Eventhough my program now works fine (thx to my friend that is :D), I still want to know what's behind the flaw. That's all I can tell you :D. Quote Amir Syafrudin
Administrators PlausiblyDamp Posted August 30, 2004 Administrators Posted August 30, 2004 (edited) Probably the best thing to do is post the relevant code (before and after) when you get back to the office. Edited February 28, 2007 by PlausiblyDamp Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
amir100 Posted August 31, 2004 Author Posted August 31, 2004 The code ... Well, since my office is not connected to the internet :D, this is a part of the code that I remembered. The exception occured at the second line of the code below. form = new Form1 form.Show() So, I guess the source would be inside the Load event of Form1. Then the debugging continues inside the Form1_Load(bla .. bla ..). The error occured when I'm trying to retrieve a Dataset through a WebService. ds = service.getData(param1) ds is a Dataset. service is an instance of the WebService I mentioned above. The function getData was supposed to query some data from the database. But I can't post the query yet. Maybe tomorrow. Thx for the help. I'll be back with more code :). Quote Amir Syafrudin
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.