Home All Groups Group Topic Archive Search About

programm crashs when instancing new object

Author
7 Apr 2006 3:34 PM
Marcus Schaefer
Hello,

I have a queer problem in my project (Visual Basic Express 2005):

When I create a new Instance of one of my classes

dim data as new CData(fname)   <-- crash !
Dim frm as new CMDIChild()
frm.Data = Data

my program crashs without any further error message. Debugging results in no
additional information. To extend the problem I can fix this bug, if i swap
the two above lines

Dim frm as new CMDIChild()
dim data as new CData(fname)  
frm.Data = Data

BUT this fix doesn't work on all computers I'm testing my project.
=========

The class CData  doesn't access the CMDIChild class.

Do you have any ideas?? I fear it is an error in the Visual Basic Express
compiler.

Thank you for any ideas / hints,

Marcus

Author
7 Apr 2006 9:40 PM
tommaso.gastaldi
see this:
http://msdn2.microsoft.com/en-us/library/microsoft.clradmin.cdata(VS.80).aspx

are you sure you are instantiating a class of yours?

-tom

Marcus Schaefer ha scritto:

Show quoteHide quote
> Hello,
>
> I have a queer problem in my project (Visual Basic Express 2005):
>
> When I create a new Instance of one of my classes
>
> dim data as new CData(fname)   <-- crash !
> Dim frm as new CMDIChild()
> frm.Data = Data
>
> my program crashs without any further error message. Debugging results in no
> additional information. To extend the problem I can fix this bug, if i swap
> the two above lines
>
> Dim frm as new CMDIChild()
> dim data as new CData(fname)
> frm.Data = Data
>
> BUT this fix doesn't work on all computers I'm testing my project.
> =========
>
> The class CData  doesn't access the CMDIChild class.
>
> Do you have any ideas?? I fear it is an error in the Visual Basic Express
> compiler.
>
> Thank you for any ideas / hints,
>
> Marcus
Author
8 Apr 2006 6:05 AM
Marcus Schaefer
Hi Tom,

I changed the class names, to clearify the purpose of the classes. But as
you pointed out the correct names may be important:

The real name of "CData" is "CSpectrum"
and of "CMDIChild" is "frm_Document".

Therefore an accidental mix-up with CLRAdmin.CData is out of question.
But thank you for your idea.

Marcus


Show quoteHide quote
"tommaso.gasta***@uniroma1.it" wrote:

> see this:
> http://msdn2.microsoft.com/en-us/library/microsoft.clradmin.cdata(VS.80).aspx
>
> are you sure you are instantiating a class of yours?
>
> -tom
>