Search Script "Invalid pointer operation"

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Search Script "Invalid pointer operation"

Re: Search Script "Invalid pointer operation"

by CarlitoGil » Wed Jul 10, 2013 5:32 pm

Thank you, man.

Re: Search Script "Invalid pointer operation"

by Peke » Wed Jul 10, 2013 5:28 pm

Sure, I'll do in deep tests to see what/why/how.

Re: Search Script "Invalid pointer operation"

by CarlitoGil » Wed Jul 10, 2013 7:58 am

Can somebody, please, reproduce this and give it a bug number?

Re: Search Script "Invalid pointer operation"

by CarlitoGil » Fri Jul 05, 2013 8:47 pm

Peke wrote:Have you tried to unregister Timer?
Yeah, I used Script.UnRegisterAllEvents, but it didn't work.

Re: Search Script "Invalid pointer operation"

by Peke » Fri Jul 05, 2013 8:38 pm

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

Have you tried to unregister Timer?

Search Script "Invalid pointer operation"

by CarlitoGil » Fri Jul 05, 2013 10:39 am

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

Top