[Win32utils-devel] Infinite loop bug in win32-eventlog?

win32utils-devel at rubyforge.org win32utils-devel at rubyforge.org
Fri Oct 29 10:40:05 EDT 2004


Hi,
> Hi all,
> 
> I hit an infinite loop trying to read starting at a specific record
> number.  Did I do something wrong here?
> 
> # logtest.rb
> require "win32/eventlog"
> include Win32
> 
> e = EventLog.open("Application")
> 
> # Read only record number 250+
> e.read(EventLog::SEEK_READ|EventLog::FORWARDS_READ,250){ |s|
>   p s
> }
> 
> e.close
> 
> Regards,
> 
> Dan
> 
I just noticed the bug is not fixed completely.

If run with  e.read , the output record number is from 42 to 2081.

If run with  e.read(EventLog::SEEK_READ|EventLog::FORWARDS_READ,250) , the output record number is from 250 to 820.

If run with  e.read(EventLog::SEEK_READ|EventLog::FORWARDS_READ,42) , the output record number is from 42 to 570.

Why this happens? Is it the bug of MS?

Regards,

Park Heesob



More information about the win32utils-devel mailing list