Player methods called from .NET

To get bugs in the current release fixed, please report them here.

Moderator: Gurus

darchangel
Posts: 26
Joined: Wed Nov 30, 2005 11:23 pm

Player methods called from .NET

Post by darchangel » Sat Jun 09, 2007 8:13 pm

I've been writing an app in .NET 2.0 / C#. When I call certain methods, both my UI and MM's UI become unresponsive and must be stopped via Task Manager. The methods are those handling playback. Eg: Player.Play(), Pause(), Stop(), Next(). The I've gotten around this so far by launching each call to one of these methods in its own thread. If several of these are used in quick succession, then the hangup still occurs. If I try to use one of these actions directly after checking Player.IsPlaying, then the hangup still occurs.

I've stepped through this in Visual Studio's debugger. These methods don't return. Ie: I call them and never reach the following line of code.

I have also tried uninstalled MediaMonkey, re-downloaded, re-installed, and re-set my references in my app. The issue is 100% reproducible.

My environ: WinXP SP2. 2.66 gHz Penium 4. 1.5gb ram. 60gb primary partition. 1 cd-rw. 1 dvd rom. MediaMonkey v2.5.5.998 standard unregistered. No plugins. Only script = MagicNodes. Visual Studio 2005 Standard Ed. v8.0.50727.762

If you would like to see my code, I'd be glad to email it but it's far too much to post here.

Any help would be greatly appreciated.

Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm
Location: Belgium
Contact:

Post by Steegy » Sun Jun 10, 2007 5:45 am

I haven't come across such problems yet (but there are some other problems which I will spare you from). Please read this piece in the wiki first.

BTW: Try a C#/MM program in it's simplest form and see if it works (own typed code should be no longer than 3 lines).
BTW2: A debug log (as explained here) might be handy for the developers.
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).

darchangel
Posts: 26
Joined: Wed Nov 30, 2005 11:23 pm

Post by darchangel » Sun Jun 10, 2007 7:55 pm

If I use a script to auto start my app, MM won't start until I close mine. Therefore, I use an auto start MM script to launch a thin app which in turn opens my main app on a new thread. Then the thin app dies and I'm left with MM and my app, both running. It is in this situation in which I encounter the previously described problem. With this setup, all other methods in the MM API have given me no problems except Play, Stop, Previous, etc.

I nixed that way and tried the way you showed in your link. Thank you. Now I can use those methods. However, now my registered events don't fire.

Post Reply