Go Back   Club CDFreaks - Knowledge is Power > International Chat: Software related > Nero SDK Discussion Forum


Commercial message



Nero SDK Discussion Forum Discuss, Getting intermittent errors with NeroDrive at International Chat: Software related forum; Around 1 time in 5 I get error messages when working with NeroDrive objects. The message is "The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call did not execute". I have tried to modify my code in several ways, but the message


Reply
 
Thread Tools
Old 09-12-2004   #1 (permalink)
New on Forum
 
Join Date: Jul 2004
Posts: 19
Getting intermittent errors with NeroDrive

Around 1 time in 5 I get error messages when working with NeroDrive objects. The message is "The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call did not execute". I have tried to modify my code in several ways, but the message keeps appearing. I am using the 6.6.0.3 version.

I am using NeroCOM with C# in Visual Studio 2003.
Pamano is offline   Reply With Quote
Old 09-12-2004   #2 (permalink)
Nero Developer
 
Join Date: Oct 2003
Posts: 605
Is this VS 7 or VS 7.1? There were some problems with earlier versions of Visual Studio .NET. Also, there were problems with previous versions of NeroCOM but these were solved. NeroCOM was extensivelly tested with C# and .NET and no further problems were found.

Can you please show some related code or possibly try to dig more on the issue? It is hard to say anything just from that single error. No such thing ever happened to us during testing.
alexp is offline   Reply With Quote
Old 10-12-2004   #3 (permalink)
New on Forum
 
Join Date: Jul 2004
Posts: 19
Re: Getting intermittent errors with NeroDrive

Hi,

Thank you for responding. The problems I have are with Visual Studio .NET 2003. I also have the latest Nero version installed.

Note: just to be sure, could you tell me the file-version and size of NeroCom.dll. I had previous versions on my system, and I want to be sure that the update went well.
Pamano is offline   Reply With Quote
Old 10-12-2004   #4 (permalink)
Nero Developer
 
Join Date: Oct 2003
Posts: 605
The NeroCOM.dll file version should be 1.3.1.2.

Please go to the About box of VS.NET and take note of the versions of the IDE and .NET runtime. There were some issues with some early VS.NET releases.
alexp is offline   Reply With Quote
Old 10-12-2004   #5 (permalink)
New on Forum
 
Join Date: Jul 2004
Posts: 19
Re: Getting intermittent errors with NeroDrive

The version of my development environment is v7.1.3088, and the .NET framework is version 1.1.4322 SP1
Pamano is offline   Reply With Quote
Old 10-12-2004   #6 (permalink)
Nero Developer
 
Join Date: Oct 2003
Posts: 605
That sounds about right. Now, what about that code? We must find something suspicious as our own C# application works flawlessly.

Do you get your error 1 in 5 times you run your application consecutivelly or does it happen all in one single run?
alexp is offline   Reply With Quote
Old 10-12-2004   #7 (permalink)
New on Forum
 
Join Date: Jul 2004
Posts: 19
Re: Getting intermittent errors with NeroDrive

The error occurs JUST AFTER I subscribe to the events of the NeroDrive object.
I am 100% sure that it has to do with the subscription of events, because I moved the function to different places, and the error always occurred in these places. I use a methods for this:

internal void SubscribeToActiveDriveEvents()
{
try
{
Nero.App.ActiveDriveNeroObject.OnAborted += new _INeroDriveEvents_OnAbortedEventHandler(activeDrive_OnAborted);
Nero.App.ActiveDriveNeroObject.OnAddLogLine += new _INeroDriveEvents_OnAddLogLineEventHandler(activeDrive_OnAddLogLine);
Nero.App.ActiveDriveNeroObject.OnDoneBurn += new _INeroDriveEvents_OnDoneBurnEventHandler(activeDrive_OnDoneBurn);
Nero.App.ActiveDriveNeroObject.OnDoneCDInfo += new _INeroDriveEvents_OnDoneCDInfoEventHandler(activeDrive_OnDoneCDInfo);
Nero.App.ActiveDriveNeroObject.OnDoneEstimateTrackSize += new _INeroDriveEvents_OnDoneEstimateTrackSizeEventHandler(activeDrive_OnDoneEstimateTrackSize) ;
Nero.App.ActiveDriveNeroObject.OnMajorPhase += new _INeroDriveEvents_OnMajorPhaseEventHandler(activeDrive_OnMajorPhase);
Nero.App.ActiveDriveNeroObject.OnProgress += new _INeroDriveEvents_OnProgressEventHandler(activeDrive_OnProgress);
Nero.App.ActiveDriveNeroObject.OnSubTaskProgress += new _INeroDriveEvents_OnSubTaskProgressEventHandler(activeDrive_OnSubTaskProgress);
Nero.App.ActiveDriveNeroObject.OnSetPhase += new _INeroDriveEvents_OnSetPhaseEventHandler(activeDrive_OnSetPhase);
Nero.App.ActiveDriveNeroObject.OnDoneErase += new _INeroDriveEvents_OnDoneEraseEventHandler(activeDrive_OnDoneErase);
}
catch (Exception ex)
{
throw new ApplicationException("error subscribing to the Nero Drive events for drive " + Nero.App.ActiveDriveNeroObject.DeviceName, ex);
}
}


As you can see, exceptions are caught. However, it is NOT the exception handler in this method that catches the error, it is the exception handler of the calling method. The exception is thrown somewhere AFTER the SubscribeToActiveDriveEvents methods has completed. VERY STRANGE !
Pamano is offline   Reply With Quote
Old 13-12-2004   #8 (permalink)
New on Forum
 
Join Date: Jul 2004
Posts: 19
Re: Getting intermittent errors with NeroDrive

Hi,

Thanks for your technical support so far, but I have found the solution to my problem. The problem is related to the threading-model used in .NET. My main thread is marked as [MTAThread]. I had to do this for other reasons. When COM is run in a single-threaded apartment, there is no problem. So in order to solve this problem, I have to use all Nero COM objects in the context of a STA thread. I can do this by creating a new Thread object in .NET, and set its ApartmentState to STAThread.
Pamano is offline   Reply With Quote
Old 13-12-2004   #9 (permalink)
Nero Developer
 
Join Date: Oct 2003
Posts: 605
Good that you have found the cause of the problem. On the other hand, that is quite strange as it shouldn't really happen. .NET should internally marshal COM pointers according to COM rules. It seems as if something is broken there.
alexp is offline   Reply With Quote
Old 13-12-2004   #10 (permalink)
New on Forum
 
Join Date: Jul 2004
Posts: 19
Re: Getting intermittent errors with NeroDrive

Hi,

I don't think anything is broken. The MTAThread and STAThread attributes of a .NET thread determine how the COM objects will be called by .NET.

See http://www.sellsbrothers.com/askthew...hreadattri.htm for more info.
Pamano is offline   Reply With Quote
Old 13-12-2004   #11 (permalink)
Nero Developer
 
Join Date: Oct 2003
Posts: 605
If what you say is correct, then there is major problem. Each COM object (coclass) has a registry setting that says how it MUST be activated. This is not down to .NET to decide but is mandated by the COM object's designer. It is very wrong to treat all COM objects as MTA just because they are created from MTA.

It seems as if .NET is sometimes bending some rules when it comes to COM. There is NO reason why your code shouldn't work even if all the .NET code belongs to a MTA. NeroCOM is all STA and therefore, .NET should work with proxies and the STA that NeroCOM objects live in, would be owned by the system. There is nothing wrong with this concept, and yet it does not work as your example clearly showed.

So, something is not right with COM and .NET.
alexp is offline   Reply With Quote
Old 14-12-2004   #12 (permalink)
New on Forum
 
Join Date: Jul 2004
Posts: 19
Re: Getting intermittent errors with NeroDrive

You are probably right. If all Nero Objects must live in an STA, then .NET must take care of creating that STA. If my application runs in an MTA, then there is marshaling between the MTA and the STA. Perhaps there is a problem in the marshaling ?
Pamano is offline   Reply With Quote
Old 14-12-2004   #13 (permalink)
Nero Developer
 
Join Date: Oct 2003
Posts: 605
Marshaling should not be an issue as NeroCOM uses standard type library marhsaling. I strongly believe this works fine as many other apps would be broken as well.
alexp is offline   Reply With Quote
 
Reply


If you can't find where you are looking for, then become a member and get an answer fast! We have thousands of people online every moment of the day to help you! Click here



Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
NeroDrive Probleme tommazzo Nero SDK Discussion Forum 12 01-11-2005 23:13
casting INeroDrive to NeroDrive yoss05 Nero SDK Discussion Forum 0 30-10-2005 10:18
C#, NeroDrive, Eventhandlers tmoravan Nero SDK Discussion Forum 4 06-09-2005 22:36
How to call NeroDrive.EstimateTrackSize ae_srikanth Nero SDK Discussion Forum 0 25-08-2005 14:05
NeroDrive.OnDriveStatusChanged is silent yanush Nero SDK Discussion Forum 4 15-07-2005 18:38


All times are GMT +2. The time now is 20:25.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0