SlideShare a Scribd company logo
離奇的bug
File: afx.ini
Line: 122
修改動作
單元開發
完成的專
案
修改動作
刪除!
修改動作
ColorEyeI SelXls
兩個專案
重疊的檔
案
但
ColorEyeI
不見得有
建在專案
中
修改動作
修改動作
修改動作
問題描述
按下
去
問題描述
出現了這
鬼東西
去找找
File: afx.ini
Line: 122
問題描述
// CString
_AFX_INLINE CStringData* CString::GetData() const
{
ASSERT(m_pchData != NULL);
return ((CStringData*)m_pchData)-1;
}
CString???
問題解析
void CColorEyeIApp::OnFileOmdtoxls()
{
// TODO: Add your command handler code here
CSelExcelDlg dlgSelExcel;
dlgSelExcel.DoModal();
}
程式SelDialog在這裡宣告、運作、結束
先追縱這問題在程式的哪個階段發生問題
依問題描述可知,是從按下Cancel或Ok開始。
追縱一下,「按下Cancel或Ok開始」的程式碼在哪
回到這段程
式執行的地
方,單步執
行
問題解析
按下
去
問題解析
void CColorEyeIApp::OnFileOmdtoxls()
{
// TODO: Add your command handler code here
CSelExcelDlg dlgSelExcel;
dlgSelExcel.DoModal();
}
剛剛的
下一步
問題解析
問題解析
問題解析
問題解析
問題解析
沒
override
CString?
剛剛的點
1. 按下Cancel
2. ~CSelExcelDlg
3. ~CString
4. 當掉
問題解析
class CSelExcelDlg : public CDialog
{
FormType m_ft;
int m_openOmdLimit;
std::vector<CString> m_omdFilesList; // m_vOmdFilePathList;
//…
兇手?
這個CString member variable相關的member function都註解掉
1. 按下Cancel
2. ~CSelExcelDlg
3. ~CString
4. 當掉
檢查
問題解析
1. 按下Cancel
2. ~CSelExcelDlg
3. ~CString
4. 當掉
按下
去
問題解析
1. 按下Cancel
2. ~CSelExcelDlg
3. ~CString
4. 當掉
結果一樣 那…問題
在??
真因
刪除專案
移動(另外新增加)
檢查#include路徑
真因
刪除專案
移動(另外新增加)
檢查#include路徑
真因
為了避免用到
舊的檔案
compiler整個
專案
問題就解決了
上述原因可重現問題

More Related Content

Similar to Bug afx ini-line122

Talking about exploit writing
Talking about exploit writingTalking about exploit writing
Talking about exploit writing
sbha0909
 
系統程式 -- 第 12 章
系統程式 -- 第 12 章系統程式 -- 第 12 章
系統程式 -- 第 12 章
鍾誠 陳鍾誠
 
107个常用javascript语句 oss 计算技术 - ossez info of tech
107个常用javascript语句   oss 计算技术 - ossez info of tech107个常用javascript语句   oss 计算技术 - ossez info of tech
107个常用javascript语句 oss 计算技术 - ossez info of tech
YUCHENG HU
 
HITCON CTF 2014 BambooFox 解題心得分享
HITCON CTF 2014 BambooFox 解題心得分享HITCON CTF 2014 BambooFox 解題心得分享
HITCON CTF 2014 BambooFox 解題心得分享
Chong-Kuan Chen
 
KISSY for starter
KISSY for starterKISSY for starter
KISSY for starteryiming he
 
安博士Asec 2010年3月安全报告
安博士Asec 2010年3月安全报告安博士Asec 2010年3月安全报告
安博士Asec 2010年3月安全报告ahnlabchina
 
恶意网页分析实战
恶意网页分析实战恶意网页分析实战
恶意网页分析实战
Huang Toby
 
讓你的人工智慧更智慧 - Developer Student Clubs.pptx
讓你的人工智慧更智慧 - Developer Student Clubs.pptx讓你的人工智慧更智慧 - Developer Student Clubs.pptx
讓你的人工智慧更智慧 - Developer Student Clubs.pptx
NCUDSC
 
Java SE 7 技術手冊 - 課後練習解答
Java SE 7 技術手冊 - 課後練習解答Java SE 7 技術手冊 - 課後練習解答
Java SE 7 技術手冊 - 課後練習解答
Justin Lin
 
OPOA in Action -- 使用MagixJS简化WebAPP开发
OPOA in Action -- 使用MagixJS简化WebAPP开发OPOA in Action -- 使用MagixJS简化WebAPP开发
OPOA in Action -- 使用MagixJS简化WebAPP开发leneli
 
Script with engine
Script with engineScript with engine
Script with engineWebrebuild
 
Sql Server 高级技巧系列之三整体优化
Sql Server 高级技巧系列之三整体优化Sql Server 高级技巧系列之三整体优化
Sql Server 高级技巧系列之三整体优化向 翔
 
PHP Coding Standard and 50+ Programming Skills
PHP Coding Standard and 50+ Programming SkillsPHP Coding Standard and 50+ Programming Skills
PHP Coding Standard and 50+ Programming Skills
Ho Kim
 
ES5 introduction
ES5 introductionES5 introduction
ES5 introduction
otakustay
 
理解 Flex item_renderer
理解 Flex item_renderer理解 Flex item_renderer
理解 Flex item_renderer鹏飞 马
 
Html5培训内容
Html5培训内容Html5培训内容
Html5培训内容Jun Yu
 
Ch07
Ch07Ch07
Ch07
jashliao
 
Asp.net mvc網站的從無到有
Asp.net mvc網站的從無到有Asp.net mvc網站的從無到有
Asp.net mvc網站的從無到有Wade Huang
 

Similar to Bug afx ini-line122 (20)

Talking about exploit writing
Talking about exploit writingTalking about exploit writing
Talking about exploit writing
 
系統程式 -- 第 12 章
系統程式 -- 第 12 章系統程式 -- 第 12 章
系統程式 -- 第 12 章
 
107个常用javascript语句 oss 计算技术 - ossez info of tech
107个常用javascript语句   oss 计算技术 - ossez info of tech107个常用javascript语句   oss 计算技术 - ossez info of tech
107个常用javascript语句 oss 计算技术 - ossez info of tech
 
HITCON CTF 2014 BambooFox 解題心得分享
HITCON CTF 2014 BambooFox 解題心得分享HITCON CTF 2014 BambooFox 解題心得分享
HITCON CTF 2014 BambooFox 解題心得分享
 
KISSY for starter
KISSY for starterKISSY for starter
KISSY for starter
 
安博士Asec 2010年3月安全报告
安博士Asec 2010年3月安全报告安博士Asec 2010年3月安全报告
安博士Asec 2010年3月安全报告
 
恶意网页分析实战
恶意网页分析实战恶意网页分析实战
恶意网页分析实战
 
讓你的人工智慧更智慧 - Developer Student Clubs.pptx
讓你的人工智慧更智慧 - Developer Student Clubs.pptx讓你的人工智慧更智慧 - Developer Student Clubs.pptx
讓你的人工智慧更智慧 - Developer Student Clubs.pptx
 
Java SE 7 技術手冊 - 課後練習解答
Java SE 7 技術手冊 - 課後練習解答Java SE 7 技術手冊 - 課後練習解答
Java SE 7 技術手冊 - 課後練習解答
 
OPOA in Action -- 使用MagixJS简化WebAPP开发
OPOA in Action -- 使用MagixJS简化WebAPP开发OPOA in Action -- 使用MagixJS简化WebAPP开发
OPOA in Action -- 使用MagixJS简化WebAPP开发
 
Script with engine
Script with engineScript with engine
Script with engine
 
Sql Server 高级技巧系列之三整体优化
Sql Server 高级技巧系列之三整体优化Sql Server 高级技巧系列之三整体优化
Sql Server 高级技巧系列之三整体优化
 
PHP Coding Standard and 50+ Programming Skills
PHP Coding Standard and 50+ Programming SkillsPHP Coding Standard and 50+ Programming Skills
PHP Coding Standard and 50+ Programming Skills
 
ES5 introduction
ES5 introductionES5 introduction
ES5 introduction
 
理解 Flex item_renderer
理解 Flex item_renderer理解 Flex item_renderer
理解 Flex item_renderer
 
A
AA
A
 
A
AA
A
 
Html5培训内容
Html5培训内容Html5培训内容
Html5培训内容
 
Ch07
Ch07Ch07
Ch07
 
Asp.net mvc網站的從無到有
Asp.net mvc網站的從無到有Asp.net mvc網站的從無到有
Asp.net mvc網站的從無到有
 

More from Chris Wang

屏東縣政府112年度大專青年公部門暑期工讀計畫簡章.pdf
屏東縣政府112年度大專青年公部門暑期工讀計畫簡章.pdf屏東縣政府112年度大專青年公部門暑期工讀計畫簡章.pdf
屏東縣政府112年度大專青年公部門暑期工讀計畫簡章.pdf
Chris Wang
 
「設計」在工程師職涯中 扮演的角色
「設計」在工程師職涯中 扮演的角色「設計」在工程師職涯中 扮演的角色
「設計」在工程師職涯中 扮演的角色
Chris Wang
 
歡迎加入軟體構築行列
歡迎加入軟體構築行列歡迎加入軟體構築行列
歡迎加入軟體構築行列
Chris Wang
 
自我探索的資訊教育
自我探索的資訊教育自我探索的資訊教育
自我探索的資訊教育
Chris Wang
 
完美 camp 進化論
完美 camp 進化論完美 camp 進化論
完美 camp 進化論
Chris Wang
 
Dm create message old
Dm create message oldDm create message old
Dm create message old
Chris Wang
 
Dm create message new
Dm create message newDm create message new
Dm create message new
Chris Wang
 
用 jenkins 實戰 CD/CI
用 jenkins 實戰 CD/CI用 jenkins 實戰 CD/CI
用 jenkins 實戰 CD/CI
Chris Wang
 
MVC Design in Web backend Server
MVC Design in Web backend ServerMVC Design in Web backend Server
MVC Design in Web backend Server
Chris Wang
 
物件的值莫名奇妙被改掉
物件的值莫名奇妙被改掉物件的值莫名奇妙被改掉
物件的值莫名奇妙被改掉
Chris Wang
 
VC6 font setup tips
VC6 font setup tipsVC6 font setup tips
VC6 font setup tips
Chris Wang
 
MFC tips for single document
MFC tips for single documentMFC tips for single document
MFC tips for single document
Chris Wang
 
CString of MFC skills
CString of MFC skillsCString of MFC skills
CString of MFC skills
Chris Wang
 
應用於液晶電視中動態背光調光技術之演算法與系統整合實現 論文口試投影片
應用於液晶電視中動態背光調光技術之演算法與系統整合實現 論文口試投影片應用於液晶電視中動態背光調光技術之演算法與系統整合實現 論文口試投影片
應用於液晶電視中動態背光調光技術之演算法與系統整合實現 論文口試投影片
Chris Wang
 
偷偷學習 Python3
偷偷學習 Python3偷偷學習 Python3
偷偷學習 Python3
Chris Wang
 
思考 Vuex 發送 API 的架構
思考 Vuex 發送 API 的架構思考 Vuex 發送 API 的架構
思考 Vuex 發送 API 的架構
Chris Wang
 
從 Flux 認識 vuex
從 Flux 認識 vuex從 Flux 認識 vuex
從 Flux 認識 vuex
Chris Wang
 
Information architecture reading ch7
Information architecture reading ch7Information architecture reading ch7
Information architecture reading ch7
Chris Wang
 
用Vue改dom
用Vue改dom用Vue改dom
用Vue改dom
Chris Wang
 
Cppunit下載、編譯、使用與困難排除
Cppunit下載、編譯、使用與困難排除Cppunit下載、編譯、使用與困難排除
Cppunit下載、編譯、使用與困難排除
Chris Wang
 

More from Chris Wang (20)

屏東縣政府112年度大專青年公部門暑期工讀計畫簡章.pdf
屏東縣政府112年度大專青年公部門暑期工讀計畫簡章.pdf屏東縣政府112年度大專青年公部門暑期工讀計畫簡章.pdf
屏東縣政府112年度大專青年公部門暑期工讀計畫簡章.pdf
 
「設計」在工程師職涯中 扮演的角色
「設計」在工程師職涯中 扮演的角色「設計」在工程師職涯中 扮演的角色
「設計」在工程師職涯中 扮演的角色
 
歡迎加入軟體構築行列
歡迎加入軟體構築行列歡迎加入軟體構築行列
歡迎加入軟體構築行列
 
自我探索的資訊教育
自我探索的資訊教育自我探索的資訊教育
自我探索的資訊教育
 
完美 camp 進化論
完美 camp 進化論完美 camp 進化論
完美 camp 進化論
 
Dm create message old
Dm create message oldDm create message old
Dm create message old
 
Dm create message new
Dm create message newDm create message new
Dm create message new
 
用 jenkins 實戰 CD/CI
用 jenkins 實戰 CD/CI用 jenkins 實戰 CD/CI
用 jenkins 實戰 CD/CI
 
MVC Design in Web backend Server
MVC Design in Web backend ServerMVC Design in Web backend Server
MVC Design in Web backend Server
 
物件的值莫名奇妙被改掉
物件的值莫名奇妙被改掉物件的值莫名奇妙被改掉
物件的值莫名奇妙被改掉
 
VC6 font setup tips
VC6 font setup tipsVC6 font setup tips
VC6 font setup tips
 
MFC tips for single document
MFC tips for single documentMFC tips for single document
MFC tips for single document
 
CString of MFC skills
CString of MFC skillsCString of MFC skills
CString of MFC skills
 
應用於液晶電視中動態背光調光技術之演算法與系統整合實現 論文口試投影片
應用於液晶電視中動態背光調光技術之演算法與系統整合實現 論文口試投影片應用於液晶電視中動態背光調光技術之演算法與系統整合實現 論文口試投影片
應用於液晶電視中動態背光調光技術之演算法與系統整合實現 論文口試投影片
 
偷偷學習 Python3
偷偷學習 Python3偷偷學習 Python3
偷偷學習 Python3
 
思考 Vuex 發送 API 的架構
思考 Vuex 發送 API 的架構思考 Vuex 發送 API 的架構
思考 Vuex 發送 API 的架構
 
從 Flux 認識 vuex
從 Flux 認識 vuex從 Flux 認識 vuex
從 Flux 認識 vuex
 
Information architecture reading ch7
Information architecture reading ch7Information architecture reading ch7
Information architecture reading ch7
 
用Vue改dom
用Vue改dom用Vue改dom
用Vue改dom
 
Cppunit下載、編譯、使用與困難排除
Cppunit下載、編譯、使用與困難排除Cppunit下載、編譯、使用與困難排除
Cppunit下載、編譯、使用與困難排除
 

Bug afx ini-line122