__try and __except not working in Release build [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Improve this question
In my program i really need to use SEH exception handlers, which catch errors like AccessViolation & etc., but handlers work only in Debug build.
I have enabled same option in Release build, but it does not work.
How to enable SEH in Release mode ANYWAY?
Thank you!
__try { /* crash code */ }
__except(EXCEPTION_EXECUTE_HANDLER { MessageBox("Crash prevented"); }
Works in Debug build mode, but not in Release (crashes).

After playing with settings more i have found the solution.
In Release config i had to activate "Basic Run-time checks" in page "Code generation" to enable SEH exception handlers.
"Basic Run-time checks" option cannot be used with any optimization enabled.

Related

16-bit app crashing under Win7 32-bit (x86) but runs fine under Win XP [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 7 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Improve this question
As the subject says, I am having a problem with my 16-bit application. Application is very low-level, doing some operations in C++/Assembly language. One thing to emphasize: this is a faculty project, so I am somewhat confident that fellow colleagues (at least some of them) were able to run it under Win7.
Compilation is done via BCC compiler. I know, old as hell :)
Under Win7, it report the following error on exit:
Does anyone has some hints on how to on analyze the issue? I was told that memory management settings. I have the following settings available:
Any tips/hints would be greatly helpful!

visual studio c++ project consistantly restarting once [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 years ago.
Improve this question
Whenever I start my command line, debug executable, whether using the debugger within visual studio or on its own, it always restarts once. It is the weirdest thing: I start it, it seems to be running and I can interact with it, but then a few seconds later it just restarts on its own. And this happens only once; the .exe that opens the second time is stable and will keep on running until I stop it. Any ideas on what is going on here? I tried googling the issue but not sure exactly what to search for!
As #drescherjm commented, the issue was my antivirus. Disabling it fixed the issue.

libao compiling in window [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I downloaded the source of libao. Do I need to compile it into a library/dll for windows or do I use the source as is.
Has anyone done this before? libao is an audio library, which I found here: http://www.xiph.org/ao/
Like plenty of open source projets, you need to compile it first before using it, unless you want to keep every required source codes along with your project and compile them each time. This can be a mess since you can (and more likely will) alterate something in the library one day or another. For that reason, you should compile it into something then link to it.

Qt creator error during release qmake [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Improve this question
I have error when I try qmake my project in release mode. In debug mode everything is ok, but when I change to release - 'magic' starts. I have no clue what is wrong. Before I could several times qmake release version. What am I doing wrong? (below some output - sorry for partly polish information)
ASSERT: "fileName.isEmpty() || isAbsolutePath(fileName)" in file Q:\qt5_workdir\w\s\qtbase\qmake\library\ioutils.cpp, line 61
20:20:45: Proces "C:\Qt\Qt5.1.1\5.1.1\msvc2010_opengl\bin\qmake.exe" zakończył się kodem wyjściowym 1.
(translate: 20:20:45: Process "C:\Qt\Qt5.1.1\5.1.1\msvc2010_opengl\bin\qmake.exe" finish with return code 1.)
This is not quite magical. You either used back slashes, etc, a.k.a. wrong input path or were simply facing this already fixed bug in later versions:
qmake is crashing with "Qwt 6.1 rc3" and Qt 5
As you can see, this was fixed in 5.2.0 when wrong path is supplied. Based on your comment that Q:\ was unknown for you, it could also be the reason for the crash.

glfwSwapBuffers(window) causing a segfault [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Improve this question
I was having a problem with code from a GLFW tutorial (open.gl) and I narrowed it down to it being caused by
glfwSwapBuffers(window);
The full code: http://pastebin.com/Evtf5PRf
The CMakeLists.txt I am using: http://pastebin.com/vKUQiMtf
This is on Ubuntu 12.04
Changing to the proprietary drivers has fixed the issue! (See answer from me below)
This issue is caused by GLFW not interacting properly with the drivers Ubuntu provides. To solve this, change to the proprietary drivers.
How to change your graphics drivers to the proprietary drivers:
Open System Settings (Icon is a gear with a wrench)
Open Software and Updates
Go to the Additional Drivers tab
Select the proprietary graphics drivers for you graphics card.
Restart your computer for the changes to apply