Error occurs at the beginning

jdy0803

Well-known member
Joined
Sep 9, 2012
Messages
73
Location
Santa Clarita
Programming Experience
10+
My VB.NET program work fine from Win XP/7/8.
However error occurs at runtime when this program is run in Windows server 2008 R2 standard and some form is opened.
I added msgbox like following at the beginning of form_load event to investigate where this error occurs but error occurs prior to display msgbox.
VB.NET:
Private Sub form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 
    MsgBox "---- 1 ----"
    .
    .
    .
    MsgBox "---- 2 ----"
    .
    .
    .
    MsgBox "---- 3 ----"
    .
    .
    .
    MsgBox "---- 4 ----"
End Sub

I attatched screen capture.
How could I find the cause of this error?
Can anybody give me any advice? error.png
 
The error details includes a stack trace, which is basically the list of methods that were being executed when the exception was thrown. That call stack can often be very informative and is in this case. It tells us that you have clicked the PreferenceToolStripMenuItem in formMain and in the Click event handler you have created a formPreference object. During the creation of that object, which occurs before the Load event handler is executed, the Description property of a Leadtools.Multimedia.WMProfile is being set and that's where the NullReferenceException is being thrown, i.e. that property setter is trying to use some object that is Nothing. I'm guessing that that component is assuming something about Windows Media Player that is not the case on Windows Server.
 
Back
Top