Click here to Skip to main content
15,908,111 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: Managed C++ & Shrink Wrapped Software Pin
Wesner Moise19-May-03 9:43
Wesner Moise19-May-03 9:43 
GeneralRe: Managed C++ & Shrink Wrapped Software Pin
Paul Selormey22-May-03 5:26
Paul Selormey22-May-03 5:26 
GeneralRe: Managed C++ & Shrink Wrapped Software Pin
Nick Parker25-May-03 3:44
protectorNick Parker25-May-03 3:44 
GeneralRe: Managed C++ & Shrink Wrapped Software Pin
Paul Selormey25-May-03 14:12
Paul Selormey25-May-03 14:12 
GeneralRe: Managed C++ & Shrink Wrapped Software Pin
Nick Parker25-May-03 17:24
protectorNick Parker25-May-03 17:24 
GeneralRe: Managed C++ & Shrink Wrapped Software Pin
Paul Selormey25-May-03 18:01
Paul Selormey25-May-03 18:01 
GeneralRe: Managed C++ & Shrink Wrapped Software Pin
Nick Parker29-May-03 19:00
protectorNick Parker29-May-03 19:00 
QuestionPossible bug in .net when calling managed c++ .dll? Pin
Member 969-May-03 6:05
Member 969-May-03 6:05 
Hello everyone, I've been working with a developer of a commercial email component written in managed c++ for the past three weeks trying to pin down a problem.

We think we've found a bug in .net (problem happens with both 1.0 and 1.1). I would like to know if anyone has seen anything similar or heard of a bug that might be related to this. (I've scoured the net for weeks now but nothing)

Here are the details:
.Net reports a null reference exception very randomly and intermittently, (sometimes not for days, sometimes almost immediately when the test app is run) like this:

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an
object.
    at ClsEmail.Clone(ClsEmail* )
(truncated here)


The author of the component has kindly provided the source code to the function being called and his comments below it:

Email *EmailBundle::GetEmail(long index)
        {
        if (!m_bundle) return 0;
        ClsEmail __nogc *e = m_bundle->GetEmail(index);
        if (!e) return 0;
        ClsEmail __nogc *e2 = e->Clone();  <---- Stack traceback indicates the failure is here
        if (!e2) return 0;
        Email *eTemp = new Email(e2);
        return eTemp;
        }

The stack traceback and error message indicate that "e" is not a valid
managed object, but e isn't a managed object in the first place.  


The code that calls it is plain vanilla c# and can work for days or only minutes, it just loops and gets email from a server. The problem happens on both an XP Pro and a Windows 2000 server computer that are stripped bare test stations.

The component author is unable to reproduce the error, however I can reproduce it easily on test computers here and he has at least one other client that has reported the problem.

I really need this to work reliably for a project I'm working on. Problem is it works perfectly most of the time, then fails and it's an unattended mail server type program with remote users so it's disastrous when it fails.

Does anyone have any thoughts on this or has seen anything similar before?
(I have much more information but didn't want to post too much)

"Things are more like they are now than they ever were before."
-- Dwight Eisenhower
AnswerRe: Possible bug in .net when calling managed c++ .dll? Pin
George L. Jackson9-May-03 6:57
George L. Jackson9-May-03 6:57 
GeneralRe: Possible bug in .net when calling managed c++ .dll? Pin
Member 969-May-03 7:05
Member 969-May-03 7:05 
GeneralRe: Possible bug in .net when calling managed c++ .dll? Pin
Member 969-May-03 7:18
Member 969-May-03 7:18 
GeneralRe: Possible bug in .net when calling managed c++ .dll? Pin
George L. Jackson9-May-03 7:36
George L. Jackson9-May-03 7:36 
GeneralRe: Possible bug in .net when calling managed c++ .dll? Pin
Member 969-May-03 8:06
Member 969-May-03 8:06 
GeneralRe: Possible bug in .net when calling managed c++ .dll? Pin
Member 969-May-03 8:22
Member 969-May-03 8:22 
GeneralRe: Possible bug in .net when calling managed c++ .dll? Pin
George L. Jackson9-May-03 9:02
George L. Jackson9-May-03 9:02 
GeneralEquivalent of atoi( ) function Pin
super9-May-03 1:55
professionalsuper9-May-03 1:55 
GeneralRe: Equivalent of atoi( ) function Pin
Paul Ingles9-May-03 3:09
Paul Ingles9-May-03 3:09 
GeneralMC++ indexed properties and C# Pin
Paul Selormey6-May-03 15:12
Paul Selormey6-May-03 15:12 
GeneralRe: MC++ indexed properties and C# Pin
Nish Nishant6-May-03 15:35
sitebuilderNish Nishant6-May-03 15:35 
GeneralRe: MC++ indexed properties and C# Pin
Paul Selormey7-May-03 4:05
Paul Selormey7-May-03 4:05 
GeneralRe: MC++ indexed properties and C# Pin
VizOne7-May-03 5:57
VizOne7-May-03 5:57 
General/EHsc option causes LNK2001 error while creating a MC++ 2003 Class Library Pin
George L. Jackson6-May-03 11:18
George L. Jackson6-May-03 11:18 
GeneralRe: /EHsc option causes LNK2001 error while creating a MC++ 2003 Class Library Pin
leppie7-May-03 7:29
leppie7-May-03 7:29 
GeneralUpgrade to Visual Studio .Net 2003 Pin
Robert Greene6-May-03 8:10
Robert Greene6-May-03 8:10 
GeneralRe: Upgrade to Visual Studio .Net 2003 Pin
George L. Jackson6-May-03 11:51
George L. Jackson6-May-03 11:51 

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.