AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

winlirc script bug

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
cen
Guest





PostPosted: Thu Mar 01, 2007 7:04 pm    Post subject: winlirc script bug Reply with quote

hope this is the right place to post...i found a bug in the winlirc script for autohotkey. the ReceiveData(...) function should not call recv() itself, because this sometimes leads to window-message problems (recv called, FD_READ flag gets reset, new data comes in before ReceiveData() ends -> nothing happens any more because the notification message got thrown away). this bug can be fixed by having the notification message call a function that sets a very short timer to call the ReceiveData() function (this way, the OnCommand function exits before recv() gets called and the flag reset)
Back to top
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Thu Mar 01, 2007 9:04 pm    Post subject: Reply with quote

Thanks; I'll look into this.
Back to top
View user's profile Send private message Send e-mail
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Sat Mar 03, 2007 1:43 am    Post subject: Reply with quote

I think I see what you mean. The WinLIRC script had been using a loop to call recv() repeatedly until there was no more data. But it was still possible that data could be received while ReceiveData() was processing previous data, which would cause the notification message to get lost due to "thread already running" (as documented in on the OnMessage page).

To solve this, I'd had it on my to-do list to apply the Critical command ("Critical" was added to AutoHotkey after the WinLIRC script was developed). So I have now added "Critical" as the first line of ReceiveData(), which should cause notification messages to get buffered rather than dropped.

If you see any problems with this solution, or notice any unreliability in the script that isn't attributable to WinLIRC, please let me know. I've been using this script myself on a daily basis (including the above enhancement for the past two months) and it seems to work well.

The updated script is at http://www.autohotkey.com/docs/scripts/WinLIRC.htm

Thanks.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group