代码剪断崩溃VS - 为什么? [英] Code snipped crashes VS - why?

查看:50
本文介绍了代码剪断崩溃VS - 为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你们会喜欢这个。我在一个非常大的(500,000行)

原生C ++项目上工作。 VS最近开始崩溃了,我已经把它弄清楚了。

到50行(花了我6个小时)。


为什么调试器会崩溃?


Microsoft Visual C ++ .NET 69462-270-0000007-18536

重现步骤:

1.下载/提取sample.zip

2.打开sample.sln

3.构建项目

4.在SlamemApp.cpp第44行放置一个断点(在函数f)。这需要
。还要注意函数f。永远不会被调用。

5.在调试器中启动应用程序

6. VS停止响应


我有很多事情可以重命名/重新排序/消除以修复问题,

但我不想偏袒你的分析。


非常感谢你的帮助!


Zip文件:
http:// www。 stankevitz.com/visualstudio/sample.zip


Chris

You guys are going to like this. I work on a very large (500,000 line)
native C++ project. VS started crasing recently and I''ve similified it down
to fifty lines (took me six hours).

Why is the debugger crashing?

Microsoft Visual C++ .NET 69462-270-0000007-18536

Steps to reproduce:
1. Download/extract sample.zip
2. Open sample.sln
3. Build the project
4. Place a breakpoint in SlamemApp.cpp line 44 (at function "f"). This is
required. ALso note that the function "f" is never called.
5. Launch the app in the debugger
6. VS stops responding

There are many things I can rename/reorder/eliminate to "fix" the problem,
but I don''t want to bias your analysis.

Thanks so much for your help!

Zip file here:
http://www.stankevitz.com/visualstudio/sample.zip

Chris

推荐答案

>为什么调试器会崩溃?


我可能会在这里做点什么。可能是当一个函数'被破坏的

名称达到766个字符时,当你在

函数中放置一个断点时VS崩溃了吗?


Length_of_mangled_name(作品)

716(作品)

736(作品)

761(作品)

766(不起作用)

771(不起作用)

776(不起作用)

786(不起作用) )

846(不起作用)

> Why is the debugger crashing?

I may be on to something here. Could it be that when a function''s mangled
name reaches 766 characters that VS crashes when you place a breakpoint in
the function?

Length_of_mangled_name (Works)
716 (Works)
736 (Works)
761 (Works)
766 (Does not work)
771 (Does not work)
776 (Does not work)
786 (Does not work)
846 (Does not work)


也许我应该刚刚发布了我的代码。当我在函数f中放置断点时,此代码会冻结我的VS

版本。注意功能f

从未打过电话。我通过将我的500k线应用程序缩小到这40行来生成这个代码。


我不相信这个问题是由于错误的名字

因为我可以用更长的错误名称来构造某些功能

长度并且它工作正常。


虽然我原来的版本(在500k行应用程序中)有一个更短的类

名称,在转换到短版本时我不得不增加

类名称的长度VS死了。


感谢您的帮助,


Chris

int main()

{

返回0;

}


#include< list>

#include< map>

A级;

B级;


类TSEntropyScheduleEvaluatorTSEntropyScheduleEvaluat或

{

struct S {};


enum E {};


void f(

B& a,

std :: map< unsigned,int> &,

std :: map< unsigned,A *>&,

std :: map< unsigned,std :: list< S *> >&,

std :: map< unsigned,std :: map< unsigned,A *> >&,

std :: map< unsigned,double>&,

E g);

};


无效TSEntropyScheduleEvaluatorTSEntropyScheduleEvaluat或:: f(

B& a,

std :: map< unsigned,int>& ;,br />
std :: map< unsigned,A *>&,

std :: map< unsigned,std :: list< S *>>&,& br />
std :: map< unsigned,std :: map< unsigned,A *>>&,

std :: map< unsigned,double>& ;,

E g)

{


}


Maybe I should have just posted my code. This code freezes my version of VS
when I place a breakpoint inside the function "f". Notice function "f" is
never called. I generated this code by shrinking down my 500k line app to
these 40 lines.

I am not convinced that the issue is due to the length of the mangled name
because I can construct certain functions with much longer mangled name
lengths and it works fine.

While my original version (in the 500k line app) had a much shorter class
name, in the transition to the short version I had to increase the length of
the class name to have VS die.

Thanks for your help,

Chris
int main()
{
return 0;
}

#include <list>
#include <map>
class A;
class B;

class TSEntropyScheduleEvaluatorTSEntropyScheduleEvaluat or
{
struct S {};

enum E {};

void f(
B& a,
std::map<unsigned, int>&,
std::map<unsigned, A*>&,
std::map<unsigned, std::list<S*> >&,
std::map<unsigned, std::map<unsigned, A*> >&,
std::map<unsigned, double>&,
E g);
};

void TSEntropyScheduleEvaluatorTSEntropyScheduleEvaluat or::f(
B& a,
std::map<unsigned, int>&,
std::map<unsigned, A*>&,
std::map<unsigned, std::list<S*> >&,
std::map<unsigned, std::map<unsigned, A*> >&,
std::map<unsigned, double>&,
E g)
{

}



Chris Stankevitz< ch ****** @ stankevitz.nospamplease.com>写道:
Chris Stankevitz <ch******@stankevitz.nospamplease.com> wrote:
也许我应该刚刚发布了我的代码。当我在函数f中放置断点时,此代码冻结了我的VS版本。 [...]


我检查了这个(用VC7.1)并且可以确认

这个bug。

IDE当我把一个

断点放入函数时,确实表现得很奇怪。有趣的是,

它甚至没有真正冻结 - 我仍然可以

操作它。 (例如,我能够在断点窗口打开

并清除断点)

只是它似乎在等待某事。

(它也没有使用太多的CPU资源。)

[...]
Maybe I should have just posted my code. This code freezes my version of VS
when I place a breakpoint inside the function "f". [...]
I checked this (with VC7.1) and can confirm
the bug.
The IDE indeed behaves strange when I put a
breakpoint into the function. Funny enough,
it doesn''t even really freeze -- I can still
operate it. (For example, I was able to open
the breakpoint window and clear the breakpoint)
It''s just that it seems to wait for something.
(It''s not using much CPU resources either.)
[...]



Schobi

-
Sp******@gmx.de 永远不会被读取

我是Schobi at suespammers dot org


回到你开始的地方与永不离开的地方不一样

Terry Pratchett


Schobi

--
Sp******@gmx.de is never read
I''m Schobi at suespammers dot org

"Coming back to where you started is not the same as never leaving"
Terry Pratchett


这篇关于代码剪断崩溃VS - 为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆