亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 1087 | 回復(fù): 0
打印 上一主題 下一主題

[C++] map erase報錯 [復(fù)制鏈接]

論壇徽章:
1
2015年辭舊歲徽章
日期:2015-03-03 16:54:15
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2016-01-21 16:50 |只看該作者 |倒序?yàn)g覽
  1. void TServer::AutoCloseEvent(Conn *conn)
  2. {
  3.         DataBuff *send_buf=&m_MainThreadInfo->send_buf;
  4.         if(conn->fd_type==2){
  5.                 map <int, map <int, Conn*>>::iterator iter_pro;
  6.                 if ((iter_pro = g_app_module_process.find(conn->process_conf_index)) != g_app_module_process.end()) {
  7.                         map <int, Conn*>::iterator it;
  8.                         if ((it = iter_pro->second.find(conn->GetFd())) != iter_pro->second.end()) {
  9.                                 iter_pro->second.erase(it);
  10.                         }
  11.                         if(iter_pro->second.size()==0)
  12.                                 g_app_module_process.erase(iter_pro);
  13.                 }

  14.                 if(g_app_module_process.size()<g_app_module_name.size()){
  15.                         if(g_pConf->BACKPRO==1)
  16.                                 g_module.start=0;
  17.                 }
  18.         }
  19. }
復(fù)制代碼
g_app_module_process.erase(iter_pro);為啥會報錯?

下面是錯誤信息
  1. (gdb) bt
  2. #0  std::_Rb_tree_rebalance_for_erase (__z=__z@entry=0x7f66480011d0, __header=...) at ../../../../../libstdc++-v3/src/c++98/tree.cc:370
  3. #1  0x000000000040bf33 in _M_erase_aux (__position=..., this=<optimized out>) at /usr/include/c++/4.8.2/bits/stl_tree.h:1745
  4. #2  erase (__position=..., this=<optimized out>) at /usr/include/c++/4.8.2/bits/stl_tree.h:820
  5. #3  erase (__position=..., this=<optimized out>) at /usr/include/c++/4.8.2/bits/stl_map.h:697
  6. #4  TServer::AutoCloseEvent (this=this@entry=0x7baa50, conn=0x8582b0) at routing/src/TServer.cpp:285
  7. #5  0x000000000040c39a in TServer::TimeOutCb (this=this@entry=0x7baa50) at routing/src/TServer.cpp:416
  8. #6  0x000000000040c48b in TServer::TimerCb (this=0x7baa50) at routing/src/TServer.cpp:363
  9. #7  0x0000000000408bce in MultiServer::WorkerTimerEvent (arg=<optimized out>) at routing/src/MultiServer.cpp:281
  10. #8  0x00007f66cafe3df3 in start_thread (arg=0x7f66c9b4c700) at pthread_create.c:308
  11. #9  0x00007f66c9c431ad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113
  12. (gdb) list
  13. 280                                map <int, Conn*>::iterator it;
  14. 281                                if ((it = iter_pro->second.find(conn->GetFd())) != iter_pro->second.end()) {
  15. 282                                        iter_pro->second.erase(it);
  16. 283                                }
  17. 284                                if(iter_pro->second.size()==0)
  18. 285                                        g_app_module_process.erase(iter_pro);
  19. 286                        }
  20. 287       
  21. 288                        if(g_app_module_process.size()<g_app_module_name.size()){
  22. 289                                if(g_pConf->BACKPRO==1)

復(fù)制代碼
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP