View Issue Details

IDProjectCategoryView StatusLast Update
0003879MMW v4Otherpublic2013-12-10 00:49
Reporterpeke Assigned To 
PriorityurgentSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Fixed in Version4.1 
Summary0003879: Automatization Server is revoked too early
DescriptionSome General Winamp plugins use COM to access MediaMonkey interface for getting advanced features COM Is initialized before loading general plugins where General plugin Init() function is called and plugin connects to MM but on MediaMonkey shutdown mediamonkey first revokes COM and then Call Quit() function where plugin should close connection to MediaMonkey to avoid COM Server Warning message "There is still Active COM Objects.... Are you sure you wish to close?"
TagsNo tags attached.
Fixed in build

Relationships

related to 0006007 closedLudek MMW v4 Possible COM error during Windows shutdown 
parent of 0003844 closedpeke Last.fm plugin Last.FM Native Support 

Activities

peke

2007-10-31 17:31

developer   ~0011728

Here is debug Log and Plugin is uploaded to FTP:
Debug Log 1:
[3728] Revoking global interface.
[3728] Terminate auto-scanning.
[3728] Clear songlist.
[3728] Terminate player.
[3728] Going to save the main playlist.
[3728] Going to close album browser.
[3728] Going to write settings.
[3728] Going to hide equalizer.
[3728] Going to free playlist window.
[3728] Removing Cover manager.
[3728] Removing Error Handlers.
[3728] Going to free InfoPopup and InfoPopupPreview.
[3728] Forms: NormalizeTopMosts: Level: 1
[3728] Forms: Received WM_ACTIVATEAPP
[3728] Forms: Accepted WM_ACTIVATEAPP +
[3728] Forms: RestoreTopMost: Level: 2
[3728] Forms: Received WM_ACTIVATEAPP
[3728] Forms: Accepted WM_ACTIVATEAPP -
[3728] Forms: NormalizeTopMosts: Level: 1
[3728] Forms: Received WM_ACTIVATEAPP
[3728] Forms: Accepted WM_ACTIVATEAPP +
[3728] Forms: RestoreTopMost: Level: 2
[3728] Forms: RestoreTopMost: Level: 1
[3728] Forms: RestoreTopMost: Starting

------- MediaMonkey is Closing COM Server but general Plugins that uses COM are not removed

[3728] Posted WM_QUIT
[3728] Removing shell hook.
[3728] Going to free player.
[3728] Player: Going to remove player plugins object.
[3728] SynchronizingAfterTagging finished
[3728] Going to quit general plugin C:\MediaMonkey\Plugins\gen_wamp.dll

Debug Log 2:
[3780] FastMM has been uninstalled.
[3780] Revoking global interface.
[3780] Terminate auto-scanning.
[3780] Clear songlist.
[3780] Terminate player.
[3780] Going to save the main playlist.
[3780] Going to close album browser.
[3780] Going to write settings.
[3780] Going to hide equalizer.
[3780] Going to free playlist window.
[3780] Removing Cover manager.
[3780] Removing Error Handlers.
[3780] Going to free InfoPopup and InfoPopupPreview.
[3780] Forms: NormalizeTopMosts: Level: 1
[3780] Forms: Received WM_ACTIVATEAPP
[3780] Forms: Accepted WM_ACTIVATEAPP +
[3780] Forms: RestoreTopMost: Level: 2
[3780] Forms: Received WM_ACTIVATEAPP
[3780] Forms: Accepted WM_ACTIVATEAPP -
[3780] Forms: NormalizeTopMosts: Level: 1
[3780] Forms: Received WM_ACTIVATEAPP
[3780] Forms: Accepted WM_ACTIVATEAPP +
[3780] Forms: RestoreTopMost: Level: 2
[3780] Forms: RestoreTopMost: Level: 1
[3780] Forms: RestoreTopMost: Starting

------- MediaMonkey is Closing COM Server but general Plugins that uses COM are not removed

[3780] Posted WM_QUIT
[3780] Removing shell hook.
[3780] Going to free player.
[3780] Player: Going to remove player plugins object.
[3780] SynchronizingAfterTagging finished
[3780] Going to quit general plugin C:\MediaMonkey\Plugins\gen_wamp.dll
[3780] Going to unload C:\MediaMonkey\Plugins\gen_wamp.dll
[3780] Going to quit general plugin C:\MediaMonkey\Plugins\gen_LastFMScrobbler.dll
[3780] Going to unload C:\MediaMonkey\Plugins\gen_LastFMScrobbler.dll
[3780] Going to quit general plugin C:\MediaMonkey\Plugins\gen_audioscrobbler.dll
[3780] Going to unload C:\MediaMonkey\Plugins\gen_audioscrobbler.dll

------- This is where MM should initialize Closing of COM Server

[3780] Going to quit DSP plugin C:\MediaMonkey\Plugins\dsp_DeFX.dll
[3780] Going to quit output plugin C:\MediaMonkey\Plugins\out_wave.dll
[3780] Going to unload C:\MediaMonkey\Plugins\out_wave.dll
[3780] Going to quit output plugin C:\MediaMonkey\Plugins\out_MMDS.dll

jiri

2007-11-01 14:07

administrator   ~0011745

It seems to be too dangerous to make such changes in this moment.

Anyway, it should be fixable within the scripts - they can hook to OnFinished MM Application event and do all the finalization stuff then - i.e. earlier that they are about to be unloaded.

peke

2007-11-01 14:55

developer   ~0011749

I agree about the risk to include it now if it is not safe.

Scripts are not problems. Plugins make problems it is very difficult to Register Event hook from external plugin or Application. I haven't found way to use/hook SDBApplicationEvents within Delphi.

Scripts uses simply Call Script.RegisterEvent(SDB, "OnPlay", "AdvRepeatTrack")

Could not found COM access equivalent using variants in Delphi to do same thing.
Var
  SDBScript : variant;
begin
  SDBScript := CreateOleObject("SongsDB.SDBScriptControl")
  // Using SDB.RegisterEvent(Pluginhandle,"OnShutdown","CloseCOMConnection") I could not be make it to work.
End;

Reason Is that Last.FM plugin will Use COM to Access MM and make Additional Playlists according to Users Account on Last.FM, controls Now Playing and Context menu for searching Similar Tracks, setup Sheet, ... avoiding Additional
changes to MM Core.

jiri

2007-11-01 15:04

administrator   ~0011751

You have to use standard COM/IDispatch methods, as is done e.g. in d_iPod, etc.

Ludek

2009-12-19 00:05

developer   ~0019865

Peke, hasn't been this problem already resolved by fix in 0006007?

peke

2013-12-10 00:49

developer   ~0038640

Fixed in 4.1 now plugins have direct access to MMW API.