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.Scrollabl eControl.WndPro c(Message& 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.NullRefe renceException: Object reference not set to an instance of an
object.
at System.Windows. Forms.UnsafeNat iveMethods.Call WindowProc(IntP tr
wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows. Forms.NativeWin dow.DefWndProc( Message& m)
at System.Windows. Forms.Control.D efWndProc(Messa ge& m)
at System.Windows. Forms.Control.W mUpdateUIState( Message& m)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.Scrollabl eControl.WndPro c(Message& m)
at System.Windows. Forms.Container Control.WndProc (Message& m)
at System.Windows. Forms.ParkingWi ndow.WndProc(Me ssage& m)
at System.Windows. Forms.ControlNa tiveWindow.OnMe ssage(Message& m)
at System.Windows. Forms.ControlNa tiveWindow.WndP roc(Message& m)
at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
Thanks,
Renzska 6 1757
Could you provide some sample code?
Thanks, Sebastian Dau
"Renzska" <Re*****@discus sions.microsoft .com> wrote in message
news:E4******** *************** ***********@mic rosoft.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.Scrollabl eControl.WndPro c(Message& 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.NullRefe renceException: Object reference not set to an instance of an object.
at System.Windows. Forms.UnsafeNat iveMethods.Call WindowProc(IntP tr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows. Forms.NativeWin dow.DefWndProc( Message& m)
at System.Windows. Forms.Control.D efWndProc(Messa ge& m)
at System.Windows. Forms.Control.W mUpdateUIState( Message& m)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.Scrollabl eControl.WndPro c(Message& m)
at System.Windows. Forms.Container Control.WndProc (Message& m)
at System.Windows. Forms.ParkingWi ndow.WndProc(Me ssage& m)
at System.Windows. Forms.ControlNa tiveWindow.OnMe ssage(Message& m)
at System.Windows. Forms.ControlNa tiveWindow.WndP roc(Message& m)
at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Thanks,
Renzska
Could you provide some sample code?
Thanks, Sebastian Dau
"Renzska" <Re*****@discus sions.microsoft .com> wrote in message
news:E4******** *************** ***********@mic rosoft.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.Scrollabl eControl.WndPro c(Message& 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.NullRefe renceException: Object reference not set to an instance of an object.
at System.Windows. Forms.UnsafeNat iveMethods.Call WindowProc(IntP tr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows. Forms.NativeWin dow.DefWndProc( Message& m)
at System.Windows. Forms.Control.D efWndProc(Messa ge& m)
at System.Windows. Forms.Control.W mUpdateUIState( Message& m)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.Scrollabl eControl.WndPro c(Message& m)
at System.Windows. Forms.Container Control.WndProc (Message& m)
at System.Windows. Forms.ParkingWi ndow.WndProc(Me ssage& m)
at System.Windows. Forms.ControlNa tiveWindow.OnMe ssage(Message& m)
at System.Windows. Forms.ControlNa tiveWindow.WndP roc(Message& m)
at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Thanks,
Renzska
public void setSelected(int track)
{
listFormPlayLis t.SetSelected(t rack, 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*****@discus sions.microsoft .com> wrote in message news:E4******** *************** ***********@mic rosoft.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.Scrollabl eControl.WndPro c(Message& 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.NullRefe renceException: Object reference not set to an instance of an object.
at System.Windows. Forms.UnsafeNat iveMethods.Call WindowProc(IntP tr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows. Forms.NativeWin dow.DefWndProc( Message& m)
at System.Windows. Forms.Control.D efWndProc(Messa ge& m)
at System.Windows. Forms.Control.W mUpdateUIState( Message& m)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.Scrollabl eControl.WndPro c(Message& m)
at System.Windows. Forms.Container Control.WndProc (Message& m)
at System.Windows. Forms.ParkingWi ndow.WndProc(Me ssage& m)
at System.Windows. Forms.ControlNa tiveWindow.OnMe ssage(Message& m)
at System.Windows. Forms.ControlNa tiveWindow.WndP roc(Message& m)
at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Thanks,
Renzska
public void setSelected(int track)
{
listFormPlayLis t.SetSelected(t rack, 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*****@discus sions.microsoft .com> wrote in message news:E4******** *************** ***********@mic rosoft.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.Scrollabl eControl.WndPro c(Message& 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.NullRefe renceException: Object reference not set to an instance of an object.
at System.Windows. Forms.UnsafeNat iveMethods.Call WindowProc(IntP tr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows. Forms.NativeWin dow.DefWndProc( Message& m)
at System.Windows. Forms.Control.D efWndProc(Messa ge& m)
at System.Windows. Forms.Control.W mUpdateUIState( Message& m)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.Scrollabl eControl.WndPro c(Message& m)
at System.Windows. Forms.Container Control.WndProc (Message& m)
at System.Windows. Forms.ParkingWi ndow.WndProc(Me ssage& m)
at System.Windows. Forms.ControlNa tiveWindow.OnMe ssage(Message& m)
at System.Windows. Forms.ControlNa tiveWindow.WndP roc(Message& m)
at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Thanks,
Renzska
Hello,
NullReferenceEx ceptions 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
listFormPlayLis t.SetSelected(t rack, true);
is not set to some value out of range?
Greets, Sebastian Dau
"Renzska" <Re*****@discus sions.microsoft .com> wrote in message
news:DF******** *************** ***********@mic rosoft.com... public void setSelected(int track) { listFormPlayLis t.SetSelected(t rack, 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*****@discus sions.microsoft .com> wrote in message news:E4******** *************** ***********@mic rosoft.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.Scrollabl eControl.WndPro c(Message& 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.NullRefe renceException: Object reference not set to an instance > of > an > object. > > at System.Windows. Forms.UnsafeNat iveMethods.Call WindowProc(IntP tr > wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam) > > at System.Windows. Forms.NativeWin dow.DefWndProc( Message& m) > > at System.Windows. Forms.Control.D efWndProc(Messa ge& m) > > at System.Windows. Forms.Control.W mUpdateUIState( Message& m) > > at System.Windows. Forms.Control.W ndProc(Message& m) > > at System.Windows. Forms.Scrollabl eControl.WndPro c(Message& m) > > at System.Windows. Forms.Container Control.WndProc (Message& m) > > at System.Windows. Forms.ParkingWi ndow.WndProc(Me ssage& m) > > at System.Windows. Forms.ControlNa tiveWindow.OnMe ssage(Message& m) > > at System.Windows. Forms.ControlNa tiveWindow.WndP roc(Message& m) > > at System.Windows. Forms.NativeWin dow.Callback(In tPtr 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,
NullReferenceEx ceptions 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
listFormPlayLis t.SetSelected(t rack, true);
is not set to some value out of range?
Greets, Sebastian Dau
"Renzska" <Re*****@discus sions.microsoft .com> wrote in message news:DF******** *************** ***********@mic rosoft.com... public void setSelected(int track) { listFormPlayLis t.SetSelected(t rack, 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*****@discus sions.microsoft .com> wrote in message news:E4******** *************** ***********@mic rosoft.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.Scrollabl eControl.WndPro c(Message& 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.NullRefe renceException: Object reference not set to an instance > of > an > object. > > at System.Windows. Forms.UnsafeNat iveMethods.Call WindowProc(IntP tr > wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam) > > at System.Windows. Forms.NativeWin dow.DefWndProc( Message& m) > > at System.Windows. Forms.Control.D efWndProc(Messa ge& m) > > at System.Windows. Forms.Control.W mUpdateUIState( Message& m) > > at System.Windows. Forms.Control.W ndProc(Message& m) > > at System.Windows. Forms.Scrollabl eControl.WndPro c(Message& m) > > at System.Windows. Forms.Container Control.WndProc (Message& m) > > at System.Windows. Forms.ParkingWi ndow.WndProc(Me ssage& m) > > at System.Windows. Forms.ControlNa tiveWindow.OnMe ssage(Message& m) > > at System.Windows. Forms.ControlNa tiveWindow.WndP roc(Message& m) > > at System.Windows. Forms.NativeWin dow.Callback(In tPtr 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 problem. The program may crash
unexpectedly while writing to the file. If so, my program should
detect this during startup, and then (during startup) probably delete the
data added to the file and redo the writing operation.
|
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 memory leaks too. How can i track
these down ?
|
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 some paras of code from lines previous to this line, the
program run fine and does not crash. So I think that this has to do
with some kind of overflow. It seems to me that if the number of lines
of code accessed by my program goes above a limit, it...
|
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 when we are debugging and when the applicationis running after an install. I have been stepping through codeand then just had the application stop and VS just goes back tonormal, like I had told it to exit the code. I have read abouta couple of other...
| |
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 assuming that is has to do with
the listbox because of this line:
"at System.Windows.Forms.ScrollableControl.WndProc(Message& m)"
and the listbox is the only part of my program that has a scrollable control.
|
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 write
information into a log file. The problem is, i'm not confident that
information i write to the log gets saved onto the hard drive before
the crash occurs.
My understanding of hard drives and OS are that because hard drives are
so slow,...
|
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: 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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |