新书推介:《语义网技术体系》
作者:瞿裕忠,胡伟,程龚
   >>中国XML论坛<<     W3CHINA.ORG讨论区     计算机科学论坛     SOAChina论坛     Blog     开放翻译计划     新浪微博  
 
  • 首页
  • 登录
  • 注册
  • 软件下载
  • 资料下载
  • 核心成员
  • 帮助
  •   Add to Google

    >> XML编辑器,XML解析器,XML开发环境
    [返回] 中文XML论坛 - 专业的XML技术讨论区XML.ORG.CN讨论区 - XML技术『 XML工具及XML开发环境 』 → 求教:解析XML格式文件出错是何原因? 查看新帖用户列表

      发表一个新主题  发表一个新投票  回复主题  (订阅本版) 您是本帖的第 5955 个阅读者浏览上一篇主题  刷新本主题   树形显示贴子 浏览下一篇主题
     * 贴子主题: 求教:解析XML格式文件出错是何原因? 举报  打印  推荐  IE收藏夹 
       本主题类别:     
     realopen 帅哥哟,离线,有人找我吗?
      
      
      等级:大一新生
      文章:1
      积分:56
      门派:XML.ORG.CN
      注册:2006/9/14

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给realopen发送一个短消息 把realopen加入好友 查看realopen的个人资料 搜索realopen在『 XML工具及XML开发环境 』的所有贴子 引用回复这个贴子 回复这个贴子 查看realopen的博客楼主
    发贴心情 求教:解析XML格式文件出错是何原因?

    源码:
           int ret;
       
            pthread_mutex_lock(&parseMutex);
            cout<<"This is in ____lock end 00000000000000"<<endl;

            FILE *fptest;
            fptest = fopen(msgfile,"r");
            if(fptest==NULL)
            {
                    cout <<"cann't open file " <<msgfile <<endl;
                    exit(0);
            }
            fclose(fptest);

            char cmdd[MAX_SQLLEN];
            RASHandle* handler =new RASHandle;
            parser->setDocumentHandler(handler);
            parser->parse(msgfile);  //该处经常CORE DUMP ,即debug的468行
            delete handler;
            pthread_mutex_unlock(&parseMutex);
            
    在hp的 安腾运行程序 core dump ,debug如下:
    hpux-11> gdb gdi_main core
    HP gdb 4.5 for HP Itanium (32 or 64 bit) and target HP-UX 11.2x.
    Copyright 1986 - 2001 Free Software Foundation, Inc.
    Hewlett-Packard Wildebeest 4.5 (based on GDB) is covered by the
    GNU General Public License. Type "show copying" to see the conditions to
    change it and/or distribute copies. Type "show warranty" for warranty/support.
    ..
    Core was generated by `gdi_main'.
    Program terminated with signal 11, Segmentation fault.

    warning: Load module /oracle/app/oracle/product/9.2/lib32/libclntsh.so.9.0 has been stripped.  
    Debugging information is not available.


    warning: Load module /oracle/app/oracle/product/9.2/lib32/libwtc9.so has been stripped.  
    Debugging information is not available.

    #0  0x60000000c0176e30:1 in real_malloc+0x7f1 () from /usr/lib/hpux32/libc.so.1
    (gdb) where
    #0  0x60000000c0176e30:1 in real_malloc+0x7f1 () from /usr/lib/hpux32/libc.so.1
    #1  0x60000000c0176440:0 in _malloc+0x800 () from /usr/lib/hpux32/libc.so.1
    #2  0x60000000c0183f30:0 in malloc+0x140 () from /usr/lib/hpux32/libc.so.1
    #3  0x60000000c0855b30:0 in operator new+0x70 ()
       from /usr/lib/hpux32/libCsup.so.1
    #4  0x60000000ce62da90:0 in xercesc_2_7::MemoryManagerImpl::allocate+0x30 ()
       from /data/users/cc2000/xerces-c/lib/libxerces-c.sl.27
    #5  0x60000000ce916750:0 in xercesc_2_7::XMemory::operator new+0x50 ()
       from /data/users/cc2000/xerces-c/lib/libxerces-c.sl.27
    #6  0x60000000ce5e5280:0 in xercesc_2_7::IGXMLScanner::scanStartTag+0xec0 ()
       from /data/users/cc2000/xerces-c/lib/libxerces-c.sl.27
    #7  0x60000000ce5db100:0 in xercesc_2_7::IGXMLScanner::scanContent+0x370 ()
       from /data/users/cc2000/xerces-c/lib/libxerces-c.sl.27
    #8  0x60000000ce5da5f0:0 in xercesc_2_7::IGXMLScanner::scanDocument+0x210 ()
       from /data/users/cc2000/xerces-c/lib/libxerces-c.sl.27
    #9  0x60000000ce8c02d0:0 in xercesc_2_7::XMLScanner::scanDocument+0x2b0 ()
       from /data/users/cc2000/xerces-c/lib/libxerces-c.sl.27
    #10 0x60000000ce8c13a0:0 in xercesc_2_7::XMLScanner::scanDocument+0x80 ()
       from /data/users/cc2000/xerces-c/lib/libxerces-c.sl.27
    #11 0x60000000ce6edfe0:0 in xercesc_2_7::SAXParser::parse+0x1e0 ()
       from /data/users/cc2000/xerces-c/lib/libxerces-c.sl.27
    #12 0x40b19c0:0 in RASClass::Parse (this=0x402166d0) at Ps01_gdi_ras.cxx:468
    #13 0x4066440:0 in HandlerMessage (para=0x18) at Ps01_gdi_main.cxx:310
    ---Type <return> to continue, or q <return> to quit---
    #14 0x60000000c0331d20:0 in __pthread_bound_body+0x170 ()
       from /usr/lib/hpux32/libpthread.so.1
    (gdb)

    多谢帮助!


       收藏   分享  
    顶(0)
      




    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2006/10/9 10:04:00
     
     GoogleAdSense
      
      
      等级:大一新生
      文章:1
      积分:50
      门派:无门无派
      院校:未填写
      注册:2007-01-01
    给Google AdSense发送一个短消息 把Google AdSense加入好友 查看Google AdSense的个人资料 搜索Google AdSense在『 XML工具及XML开发环境 』的所有贴子 访问Google AdSense的主页 引用回复这个贴子 回复这个贴子 查看Google AdSense的博客广告
    2024/4/28 14:01:59

    本主题贴数1,分页: [1]

    管理选项修改tag | 锁定 | 解锁 | 提升 | 删除 | 移动 | 固顶 | 总固顶 | 奖励 | 惩罚 | 发布公告
    W3C Contributing Supporter! W 3 C h i n a ( since 2003 ) 旗 下 站 点
    苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
    6,031.250ms