Search Script "Invalid pointer operation"

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

Moderator: Gurus

CarlitoGil
Posts: 294
Joined: Sun Sep 07, 2008 10:46 am
Location: Dominican Republic
Contact:

Search Script "Invalid pointer operation"

Post by CarlitoGil »

When a Search Script calls SDB.ProcessMessages from a timer and the Auto-tag window is closed MM throws an error:

Code: Select all

Error executing script event
Invalid pointer operation
This is a sample script:

Code: Select all

Dim bHalt
bHalt = False

Sub StartSearch(oPanel, sSearchTerm, sSearchArtist, sSearchAlbum)
 	Script.RegisterEvent SDB.CreateTimer(0), "OnTimer", "Timeout"
End Sub

Sub FinishSearch(oPanel)
	bHalt = True
	Script.UnRegisterAllEvents
End Sub

Sub Timeout(tTimer)

	tTimer.Enabled = False
	
	SDB.Tools.Sleep(1000)
	
	SDB.ProcessMessages
	
	If bHalt Then
		msgbox("Halted! but will throw an error!")
	Else
		tTimer.Enabled = True
	End If
	
End Sub
4.0.7.1511
Windows 8 x64
Last edited by CarlitoGil on Wed Jul 10, 2013 8:08 am, edited 2 times in total.
iTunesMonkey + Acoustid – Find metadata from iTunes and Acoustid
Peke
Posts: 13695
Joined: Tue Jun 10, 2003 7:21 pm
Location: Serbia
Contact:

Re: Search Script "Invalid pointer operation"

Post by Peke »

From what I see Timer/event is triggered even Script is terminated.

Have you tried to unregister Timer?
Best regards,
Pavle
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
How to add SCREENSHOTS to forum
CarlitoGil
Posts: 294
Joined: Sun Sep 07, 2008 10:46 am
Location: Dominican Republic
Contact:

Re: Search Script "Invalid pointer operation"

Post by CarlitoGil »

Peke wrote:Have you tried to unregister Timer?
Yeah, I used Script.UnRegisterAllEvents, but it didn't work.
iTunesMonkey + Acoustid – Find metadata from iTunes and Acoustid
CarlitoGil
Posts: 294
Joined: Sun Sep 07, 2008 10:46 am
Location: Dominican Republic
Contact:

Re: Search Script "Invalid pointer operation"

Post by CarlitoGil »

Can somebody, please, reproduce this and give it a bug number?
iTunesMonkey + Acoustid – Find metadata from iTunes and Acoustid
Peke
Posts: 13695
Joined: Tue Jun 10, 2003 7:21 pm
Location: Serbia
Contact:

Re: Search Script "Invalid pointer operation"

Post by Peke »

Sure, I'll do in deep tests to see what/why/how.
Best regards,
Pavle
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
How to add SCREENSHOTS to forum
CarlitoGil
Posts: 294
Joined: Sun Sep 07, 2008 10:46 am
Location: Dominican Republic
Contact:

Re: Search Script "Invalid pointer operation"

Post by CarlitoGil »

Thank you, man.
iTunesMonkey + Acoustid – Find metadata from iTunes and Acoustid
Post Reply