Archive

Posts Tagged ‘Bug’

wireshark 1.2.1 安装包缺少eap.xml Bug

July 28th, 2009 No comments

今天下载了wireshark最新的版本1.2.1,编译安装完后,在用的时候报错:

Could not open file: ‘eap.xml’, error: No such file or directory
搜了一下发现,是因为wireshark1.2.1在打包的时候忘了把 diameter/eap.xml 放进去。详细的信息可以参考 "Missing diameter/eap.xml in 1.2.1" 和
"New: eap.xml missing from source tarfile".

简单的修改,从这下载 eap.xml 文件放到 wireshark-1.2.1/diameter/ 目录下, 并在文件 wireshark-1.2.1/Makefile.am 120行增加:
diameter/eap.xml \

增加以后的文件为(116~131):

diameter_DATA = \
diameter/chargecontrol.xml \
diameter/dictionary.dtd \
diameter/dictionary.xml \
diameter/eap.xml \
diameter/Ericsson.xml \
diameter/etsie2e4.xml \
diameter/gqpolicy.xml \
diameter/imscxdx.xml \
diameter/mobileipv4.xml \
diameter/nasreq.xml \
diameter/sip.xml \
diameter/sunping.xml \
diameter/TGPPGmb.xml \
diameter/TGPPRx.xml \
diameter/TGPPSh.xml

参考:
1. “New: eap.xml missing from source tarfile” http://www.wireshark.org/lists/wireshark-dev/200907/msg00273.html
2. “Missing diameter/eap.xml in 1.2.1″ https://www.wireshark.org/lists/wireshark-bugs/200907/msg00621.html

Categories: Tech.Notes Tags: , ,

微软 Zune 30 又现千年虫Bug

January 1st, 2009 No comments

在2008年的最后一天,无数的Zune 30 用户忽然发现自己的MP3无法正常播放,而专家给出的解决方法是:

“let the Zune run out of battery and the clock bug will essentially fix itself”

(让电池耗尽或这一天不要用Zune,到第二天就会自己好起来),但是这个Bug会四年后的今天再现。

在国外的一个论坛上看到一个帖子说Bug产生的原因, 当时闰年的时候天数是366天,下面的是Zune的 时钟驱动:

year = ORIGINYEAR; /* = 1980 */

while (days > 365)
{
    if (IsLeapYear(year))
    {
        if (days > 366)  // 当在闰年的时候,days = 366 是出现死循环
        {
            days -= 366;
            year += 1;
        }
    }
    else
    {
        days -= 365;
        year += 1;
    }
}

我们会发现当 days = 366 天的时候,while 就会进入死循环,直到24小时过后,才能正常工作。

当然还有一种修改驱动的方法:

year = ORIGINYEAR; /* = 1980 */

while (days > 365)
{
    if (IsLeapYear(year))
    {
        if (days > 366)
        {
            days -= 366;
            year += 1;
        }
        else  // 可以修复Bug
        {
            break;
        }
    }
    else
    {
        days -= 365;
        year += 1;
    }
}
参考:
1.Cause of Zune 30 leapyear problem ISOLATED!
http://www.zuneboards.com/forums/zune-news/38143-cause-zune-30-leapyear-problem-isolated.html
2.Zune 时钟驱动
http://pastie.org/349916
3.The Day the Zunes Stood Still: Update
http://www.crunchgear.com/2008/12/31/the-day-the-zunes-stood-still-update/

–EOF–

Categories: Geek Tags: ,