我的vs调试器有一个奇怪的问题.在vs调试器下运行我的程序时,调试器不会中断未处理的异常.而是将控制权返回给VS,就像程序正常退出一样.如果我查看输出选项卡,就会在线程终止之前列出第一次机会执行.
我了解如何使用"调试"菜单中的"例外"框.我检查了未处理的异常.如果我检查正在发生的特定执行的第一次机会异常,调试器将停止.
但是,我的理解是,调试器也应该停止任何"Unhandled-Exceptions".它不是为我这样做的.
以下是"输出"选项卡的最后几行:
A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll
The thread 0x60c has exited with code 0 (0x0).
The program '[3588] ALMSSecurityManager.vshost.exe: Managed' has exited with code -532459699 (0xe0434f4d).
Run Code Online (Sandbox Code Playgroud)
我不明白为什么异常会在未处理时被标记为"第一次机会"异常.
我相信0xe0434f4d退出代码是一个通用的COM错误.
有任何想法吗?
地铁.
我不知道为什么但是这个代码在64位编译时在调试模式下给出了这个错误:
OpenGL.exe中0x000000013f488f55处的未处理异常:0xC0000005:访问冲突读取位置0x000000053f4d9778.
但是,它在发布模式下工作得非常好,在32位编译时调试和发布都很好!非常感谢帮助.
我正在使用Visual Studio 2010.
float g_History[20] = { 0.0f };
const float g_WeightModifier = 0.25f;
void CInput::SmoothMouseMovement()
{
if(!m_SmoothMouse) return;
for(UINT i = 0; i < 10; i++)
{
g_History[i * 2] = g_History[(i - 1) * 2]; // This line gives the error
g_History[i * 2 + 1] = g_History[(i - 1) * 2 + 1];
}
g_History[0] = m_MouseState.X;
g_History[1] = m_MouseState.Y;
float AverageX = 0.0f;
float AverageY = 0.0f;
float AverageTotal = 0.0f;
float WeightModifier …Run Code Online (Sandbox Code Playgroud) 我已经创建了一个程序,并对它进行了大量测试,我收到一条错误消息"FormatException未处理,输入字符串格式不正确".当我将任一文本框留空并按下"完成"按钮但如果我输入低于0或高于59的任何值 - 这是我想要允许的数字范围,它会正常工作.我怎么办?当盒子空白时,我没有收到这个错误?这是'btnFinished'背后的代码:
private void btnFinished_Click(object sender, EventArgs e)
{
if (lstCyclists.SelectedIndex >= 0)
{
Cyclists currentCyc = (Cyclists)lstCyclists.SelectedItem;
//Decalre the minsEntered and secsEntered variables for txtMins and textSecs
int minsEntered = int.Parse(txtMins.Text);
int secsEntered = int.Parse(txtSecs.Text);
try
{
//If the status of a cyclist is already set to Finished, show an error
if (currentCyc.Finished.ToString() == "Finished")
{
MessageBox.Show("A time has already been entered for this cyclist");
}
else
{
//if a minute lower than 0 or greater than 59 …Run Code Online (Sandbox Code Playgroud) 我想在Glassfish中抛出未处理的异常时看到异常细节(在网页中,而不是日志).
此错误页面显示但没有有用的信息.抛出异常时是否可以选择查看更多详细信息?(就像在asp.net中,如果你在web.config中使debugmode为true,你可以看到异常细节)
HTTP状态500 -
类型异常报告
信息
description服务器遇到内部错误(),导致无法完成此请求.
例外
java.lang.NullPointerException注意Oracle GlassFish Server 3.1日志中提供了异常的完整堆栈跟踪及其根本原因.
Oracle GlassFish Server 3.1
谢谢
我正在尝试使用C#中的Windows窗体创建应用程序,但是我不断收到错误说明:
NullReferenceException未处理 - 对象引用未设置为对象的实例
它指向具有此代码的行:
carBootSaleList.AddCarBootSale(newCarBootSale);
Run Code Online (Sandbox Code Playgroud)
我在表单界面上的方法:
CarBootSaleList carBootSaleList;
public void AddCarBootSale()
{
AddNewCarBootSale addForm = new AddNewCarBootSale();
if (addForm.ShowDialog() == DialogResult.OK)
{
CarBootSale newCarBootSale = addForm.GetCarBootSaleData();
carBootSaleList.AddCarBootSale(newCarBootSale);
txtCarBootSale.Clear();
txtCarBootSale.Text = newCarBootSale.Display();
}
}
Run Code Online (Sandbox Code Playgroud)
CarBootSaleList类:
public class CarBootSaleList : IDisplay
{
private List<CarBootSale> carbootsales;
public CarBootSaleList()
{
carbootsales = new List<CarBootSale>();
}
public bool AddCarBootSale(CarBootSale carbootsale)
{
bool success = true;
foreach (CarBootSale cbs in carbootsales)
{
if (cbs.ID == carbootsale.ID)
{
success = false;
}
}
if (success)
{ …Run Code Online (Sandbox Code Playgroud) 使用此代码时,它会抛出一个未处理的写入异常,我几乎可以肯定这与atoi()函数有关.
while(true){
char* item = "";
cin >> item;
int numItem = atoi(item);
if(numItem){
if(numItem<=backpackSpaces){
equipItem(backpack[numItem]);
break;
}else{
cout << "No such item." << endl;
}
}else if(item == "back"){
cout << "Choose an option from the original choices. If you can't remember what they were, scroll up." << endl;
break;
}else{
cout << "Command not recognised." << endl;
}
}
Run Code Online (Sandbox Code Playgroud) 我正在使用StackOverflowException我的C#程序.
Cmodel.cs
public class CModel
{
public Vector3 Position { get; set; }
public Vector3 Rotation { get; set; }
public Vector3 Scale { get; set; }
public Model Model { get; private set; }
public BoundingSphere BoundingSphere
{
get
{
// no need for rotation, as this is a sphere
Matrix worldTransform = Matrix.CreateScale(Scale) *
Matrix.CreateTranslation(Position); // THIS IS WHERE THE EXCEPTION OCCURS
BoundingSphere transformed = BoundingSphere;
transformed = transformed.Transform(worldTransform);
return transformed;
}
}
private Matrix[] modelTransforms; …Run Code Online (Sandbox Code Playgroud) 我的代码有问题.我终于得到它所以没有错误,但现在我必须处理stackoverflow ...
谁能告诉我我的代码有什么问题?
public Matrix Projection
{
get { return Projection; }
protected set
{
Projection = value;
generateFrustum();
}
}
Run Code Online (Sandbox Code Playgroud)
如果你可以帮忙的话会很好!
谢谢