Click here to Skip to main content
15,923,789 members
Home / Discussions / C#
   

C#

 
GeneralRe: Problem deserialising JSON data Pin
Richard MacCutchan18-Jul-19 4:05
mveRichard MacCutchan18-Jul-19 4:05 
AnswerRe: Problem deserialising JSON data Pin
Richard Deeming18-Jul-19 4:42
mveRichard Deeming18-Jul-19 4:42 
GeneralRe: Problem deserialising JSON data Pin
Richard MacCutchan18-Jul-19 6:02
mveRichard MacCutchan18-Jul-19 6:02 
QuestionGetting Exception Window Class Name is not Valid in Windows Application using vb.net Pin
Member 1453381917-Jul-19 11:29
Member 1453381917-Jul-19 11:29 
AnswerRe: Getting Exception Window Class Name is not Valid in Windows Application using vb.net Pin
Luc Pattyn17-Jul-19 11:49
sitebuilderLuc Pattyn17-Jul-19 11:49 
GeneralRe: Getting Exception Window Class Name is not Valid in Windows Application using vb.net Pin
Member 1453381917-Jul-19 12:00
Member 1453381917-Jul-19 12:00 
GeneralRe: Getting Exception Window Class Name is not Valid in Windows Application using vb.net Pin
Luc Pattyn17-Jul-19 12:13
sitebuilderLuc Pattyn17-Jul-19 12:13 
AnswerRe: Getting Exception Window Class Name is not Valid in Windows Application using vb.net Pin
Eddy Vluggen17-Jul-19 13:51
professionalEddy Vluggen17-Jul-19 13:51 
AnswerRe: Getting Exception Window Class Name is not Valid in Windows Application using vb.net Pin
phil.o17-Jul-19 22:13
professionalphil.o17-Jul-19 22:13 
AnswerRe: Getting Exception Window Class Name is not Valid in Windows Application using vb.net Pin
Richard Deeming17-Jul-19 22:52
mveRichard Deeming17-Jul-19 22:52 
QuestionOutOfMemoryException help please Pin
DTGeek17-Jul-19 5:07
DTGeek17-Jul-19 5:07 
AnswerRe: OutOfMemoryException help please Pin
OriginalGriff17-Jul-19 5:21
mveOriginalGriff17-Jul-19 5:21 
AnswerRe: OutOfMemoryException help please Pin
Gerry Schmitz17-Jul-19 6:07
mveGerry Schmitz17-Jul-19 6:07 
GeneralRe: OutOfMemoryException help please Pin
DTGeek17-Jul-19 6:11
DTGeek17-Jul-19 6:11 
AnswerRe: OutOfMemoryException help please Pin
Luc Pattyn17-Jul-19 7:42
sitebuilderLuc Pattyn17-Jul-19 7:42 
Hmm.

Great puzzle. "Doctor I'm ill" without any detailed symptoms.

Nevertheless I've been looking for the most common sources of OutOfMemoryException:
- properties that get or set themselves recursively; I did not see any user-defined Property.
- functions that call themselves recursively; I did not see any of them (I may have missed one though).

The next suspect would be event handlers that modify something causing ever more events, possibly resulting in an avalanche. Without any description of this beast, that is hard to find.

I have some more comments though:

1.
I see a lot of new Font statements; most if not all of them only generate two different fonts, so I suggest you generate them once, keep them around in two variables, and assign them to a local variable as appropriate.

Now whenever that approach would be impossible, keep in mind that objects offering a Dispose method require that method being called when done to free up unmanaged data; and most graphic objects (including Font) fall in that category.

2.
And now for a big issue:
you are swallowing exceptions; there are lots of try/catch blocks, and yes they always store the exception message (why only the message?) but then that magic secondLevelMsg variable is never looked at??? The author of this is making life extremely hard, exceptions are there to help you in finding what is going wrong. The current code is very good at hiding what might go wrong. Also, exceptions should not be used as the normal way out. Their occurence should be, well, exceptional.

Hope this helps.

Smile | :)
Luc Pattyn [My Articles] Nil Volentibus Arduum

GeneralRe: OutOfMemoryException help please Pin
DTGeek17-Jul-19 8:17
DTGeek17-Jul-19 8:17 
GeneralRe: OutOfMemoryException help please Pin
Luc Pattyn17-Jul-19 8:20
sitebuilderLuc Pattyn17-Jul-19 8:20 
GeneralRe: OutOfMemoryException help please Pin
Luc Pattyn17-Jul-19 12:53
sitebuilderLuc Pattyn17-Jul-19 12:53 
AnswerRe: OutOfMemoryException help please Pin
Eddy Vluggen17-Jul-19 13:50
professionalEddy Vluggen17-Jul-19 13:50 
QuestionQuick Question - Data Validation Range with DateTime Pin
Kevin Marois16-Jul-19 7:05
professionalKevin Marois16-Jul-19 7:05 
AnswerRe: Quick Question - Data Validation Range with DateTime Pin
OriginalGriff16-Jul-19 8:16
mveOriginalGriff16-Jul-19 8:16 
AnswerRe: Quick Question - Data Validation Range with DateTime Pin
Richard Deeming16-Jul-19 9:15
mveRichard Deeming16-Jul-19 9:15 
AnswerRe: Quick Question - Data Validation Range with DateTime Pin
BillWoodruff16-Jul-19 20:34
professionalBillWoodruff16-Jul-19 20:34 
AnswerRe: Quick Question - Data Validation Range with DateTime Pin
Eddy Vluggen16-Jul-19 23:22
professionalEddy Vluggen16-Jul-19 23:22 
GeneralRe: Quick Question - Data Validation Range with DateTime Pin
BillWoodruff17-Jul-19 0:43
professionalBillWoodruff17-Jul-19 0:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.