I am getting a random crash in my program. I think it has to do with the
only listbox I have. It uses the WMP to play songs and when a song completes
I set the selected item in the listbox. I am assuming that is has to do with
the listbox because of this line:
"at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)"
and the listbox is the only part of my program that has a scrollable control.
Any help in fixing this would be greatly appreciated.
Here is the debug info:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an
object.
at System.Windows.Forms.UnsafeNativeMethods.CallWindo wProc(IntPtr
wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.NativeWindow.DefWndProc(Messa ge& m)
at System.Windows.Forms.Control.DefWndProc(Message& m)
at System.Windows.Forms.Control.WmUpdateUIState(Messa ge& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
at System.Windows.Forms.ContainerControl.WndProc(Mess age& m)
at System.Windows.Forms.ParkingWindow.WndProc(Message & m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
Thanks,
Renzska 6 1740
Could you provide some sample code?
Thanks, Sebastian Dau
"Renzska" <Re*****@discussions.microsoft.com> wrote in message
news:E4**********************************@microsof t.com... I am getting a random crash in my program. I think it has to do with the only listbox I have. It uses the WMP to play songs and when a song completes I set the selected item in the listbox. I am assuming that is has to do with the listbox because of this line:
"at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)"
and the listbox is the only part of my program that has a scrollable control.
Any help in fixing this would be greatly appreciated.
Here is the debug info:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Windows.Forms.UnsafeNativeMethods.CallWindo wProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.NativeWindow.DefWndProc(Messa ge& m)
at System.Windows.Forms.Control.DefWndProc(Message& m)
at System.Windows.Forms.Control.WmUpdateUIState(Messa ge& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
at System.Windows.Forms.ContainerControl.WndProc(Mess age& m)
at System.Windows.Forms.ParkingWindow.WndProc(Message & m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Thanks,
Renzska
Could you provide some sample code?
Thanks, Sebastian Dau
"Renzska" <Re*****@discussions.microsoft.com> wrote in message
news:E4**********************************@microsof t.com... I am getting a random crash in my program. I think it has to do with the only listbox I have. It uses the WMP to play songs and when a song completes I set the selected item in the listbox. I am assuming that is has to do with the listbox because of this line:
"at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)"
and the listbox is the only part of my program that has a scrollable control.
Any help in fixing this would be greatly appreciated.
Here is the debug info:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Windows.Forms.UnsafeNativeMethods.CallWindo wProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.NativeWindow.DefWndProc(Messa ge& m)
at System.Windows.Forms.Control.DefWndProc(Message& m)
at System.Windows.Forms.Control.WmUpdateUIState(Messa ge& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
at System.Windows.Forms.ContainerControl.WndProc(Mess age& m)
at System.Windows.Forms.ParkingWindow.WndProc(Message & m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Thanks,
Renzska
public void setSelected(int track)
{
listFormPlayList.SetSelected(track, true);
}
That is what I am doing. But I call it in a lot of different places. Could
that be the cause of my problem?
Thanks,
Renzska
"Sebastian Dau" wrote: Could you provide some sample code?
Thanks, Sebastian Dau
"Renzska" <Re*****@discussions.microsoft.com> wrote in message news:E4**********************************@microsof t.com...I am getting a random crash in my program. I think it has to do with the only listbox I have. It uses the WMP to play songs and when a song completes I set the selected item in the listbox. I am assuming that is has to do with the listbox because of this line:
"at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)"
and the listbox is the only part of my program that has a scrollable control.
Any help in fixing this would be greatly appreciated.
Here is the debug info:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Windows.Forms.UnsafeNativeMethods.CallWindo wProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.NativeWindow.DefWndProc(Messa ge& m)
at System.Windows.Forms.Control.DefWndProc(Message& m)
at System.Windows.Forms.Control.WmUpdateUIState(Messa ge& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
at System.Windows.Forms.ContainerControl.WndProc(Mess age& m)
at System.Windows.Forms.ParkingWindow.WndProc(Message & m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Thanks,
Renzska
public void setSelected(int track)
{
listFormPlayList.SetSelected(track, true);
}
That is what I am doing. But I call it in a lot of different places. Could
that be the cause of my problem?
Thanks,
Renzska
"Sebastian Dau" wrote: Could you provide some sample code?
Thanks, Sebastian Dau
"Renzska" <Re*****@discussions.microsoft.com> wrote in message news:E4**********************************@microsof t.com...I am getting a random crash in my program. I think it has to do with the only listbox I have. It uses the WMP to play songs and when a song completes I set the selected item in the listbox. I am assuming that is has to do with the listbox because of this line:
"at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)"
and the listbox is the only part of my program that has a scrollable control.
Any help in fixing this would be greatly appreciated.
Here is the debug info:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Windows.Forms.UnsafeNativeMethods.CallWindo wProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.NativeWindow.DefWndProc(Messa ge& m)
at System.Windows.Forms.Control.DefWndProc(Message& m)
at System.Windows.Forms.Control.WmUpdateUIState(Messa ge& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
at System.Windows.Forms.ContainerControl.WndProc(Mess age& m)
at System.Windows.Forms.ParkingWindow.WndProc(Message & m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Thanks,
Renzska
Hello,
NullReferenceExceptions in this native methods mostly happen
when own code mixes something up while running inside
of the native window thread.
Are your sure that track in your method call
listFormPlayList.SetSelected(track, true);
is not set to some value out of range?
Greets, Sebastian Dau
"Renzska" <Re*****@discussions.microsoft.com> wrote in message
news:DF**********************************@microsof t.com... public void setSelected(int track) { listFormPlayList.SetSelected(track, true); }
That is what I am doing. But I call it in a lot of different places. Could that be the cause of my problem?
Thanks,
Renzska
"Sebastian Dau" wrote:
Could you provide some sample code?
Thanks, Sebastian Dau
"Renzska" <Re*****@discussions.microsoft.com> wrote in message news:E4**********************************@microsof t.com... >I am getting a random crash in my program. I think it has to do with >the > only listbox I have. It uses the WMP to play songs and when a song > completes > I set the selected item in the listbox. I am assuming that is has to > do > with > the listbox because of this line: > > "at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)" > > and the listbox is the only part of my program that has a scrollable > control. > > > Any help in fixing this would be greatly appreciated. > > Here is the debug info: > > See the end of this message for details on invoking > > just-in-time (JIT) debugging instead of this dialog box. > > > > ************** Exception Text ************** > > System.NullReferenceException: Object reference not set to an instance > of > an > object. > > at System.Windows.Forms.UnsafeNativeMethods.CallWindo wProc(IntPtr > wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam) > > at System.Windows.Forms.NativeWindow.DefWndProc(Messa ge& m) > > at System.Windows.Forms.Control.DefWndProc(Message& m) > > at System.Windows.Forms.Control.WmUpdateUIState(Messa ge& m) > > at System.Windows.Forms.Control.WndProc(Message& m) > > at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m) > > at System.Windows.Forms.ContainerControl.WndProc(Mess age& m) > > at System.Windows.Forms.ParkingWindow.WndProc(Message & m) > > at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m) > > at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m) > > at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, > IntPtr wparam, IntPtr lparam) > > > Thanks, > > Renzska >
Shouldn't be, but I'll check it out just to make sure.
Thanks,
Renzska
"Sebastian Dau" wrote: Hello,
NullReferenceExceptions in this native methods mostly happen when own code mixes something up while running inside of the native window thread.
Are your sure that track in your method call
listFormPlayList.SetSelected(track, true);
is not set to some value out of range?
Greets, Sebastian Dau
"Renzska" <Re*****@discussions.microsoft.com> wrote in message news:DF**********************************@microsof t.com... public void setSelected(int track) { listFormPlayList.SetSelected(track, true); }
That is what I am doing. But I call it in a lot of different places. Could that be the cause of my problem?
Thanks,
Renzska
"Sebastian Dau" wrote:
Could you provide some sample code?
Thanks, Sebastian Dau
"Renzska" <Re*****@discussions.microsoft.com> wrote in message news:E4**********************************@microsof t.com... >I am getting a random crash in my program. I think it has to do with >the > only listbox I have. It uses the WMP to play songs and when a song > completes > I set the selected item in the listbox. I am assuming that is has to > do > with > the listbox because of this line: > > "at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)" > > and the listbox is the only part of my program that has a scrollable > control. > > > Any help in fixing this would be greatly appreciated. > > Here is the debug info: > > See the end of this message for details on invoking > > just-in-time (JIT) debugging instead of this dialog box. > > > > ************** Exception Text ************** > > System.NullReferenceException: Object reference not set to an instance > of > an > object. > > at System.Windows.Forms.UnsafeNativeMethods.CallWindo wProc(IntPtr > wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam) > > at System.Windows.Forms.NativeWindow.DefWndProc(Messa ge& m) > > at System.Windows.Forms.Control.DefWndProc(Message& m) > > at System.Windows.Forms.Control.WmUpdateUIState(Messa ge& m) > > at System.Windows.Forms.Control.WndProc(Message& m) > > at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m) > > at System.Windows.Forms.ContainerControl.WndProc(Mess age& m) > > at System.Windows.Forms.ParkingWindow.WndProc(Message & m) > > at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m) > > at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m) > > at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, > IntPtr wparam, IntPtr lparam) > > > Thanks, > > Renzska > This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Oin Zea |
last post by:
Is it possible for to program to access a random file at the same time and
perform actions like create a new record?
|
by: Joseph |
last post by:
Hi
I'm writing a commercial program which must be reliable. It has to do
some basic reading and writing to and from files on the hard disk,
and also to a floppy.
I have foreseen a potential...
|
by: greeningster |
last post by:
I have written an application in Visual C++ for a customer but it seems
to crash randomly.
Could anyone give me any help on how I could track this down ?
Also, there appears there might be...
|
by: arizvi |
last post by:
Hi,
My program crashes when it reaches a certain line. There is nothing
wrong with that particular line as I have changed it to something
simple like i=0, and it still crashes.
If I remove...
|
by: Jared Kitcher via .NET 247 |
last post by:
I am working on a .Net project and our application randomlycrashes with no exception being thrown. The application justdisappears, like someone would have clicked the exit button. This occurs both...
|
by: Renzska |
last post by:
I am getting a random crash in my program. I think it has to do with the
only listbox I have. It uses the WMP to play songs and when a song completes
I set the selected item in the listbox. I am...
|
by: NewToCPP |
last post by:
Hi,
Why does a C/C++ programs crash?
When there is access to a null pointer or some thing like that programs
crash, but why do they crash?
Thanks.
|
by: benjamin.krulewitch |
last post by:
I'm debugging an issue with a C program that causes the computer to
crash, and I'm attempting to log information immediately before the
crash occurs. I us my BKprintLog function (see below) to...
|
by: Mike Langworthy |
last post by:
i can not seem to get this code to work. someone please help
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |