User forums > Help

Segmentation fault using Beep()

<< < (3/3)

tom0769:
If I do not run the application in DEBUG mode, it does not crash.
Only when debugging the gdb throws a message ("Segmentation fault ...") and stops.
If I set a breakpoint just to the Beep()-instruction, doing a
"Next line", "Next instruction" or "Step into" causes the error.
If I run the application in RELEASE mode (see code snippet), Beep() does not return zero
but GetLastError() returns "Invalid handle" code (#6).
The application pauses for the parameter time given to Beep(), but there is no sound (works like Sleep()).
So I think there must be a problem "behind" Beep(), maybe Beep() takes an action
on sound card, which causes the problem? :?
Is there any possibility to debug the Beep() function?

Since now I tried several sound settings in the control panel and did not succeed.
Should I examine the settings of the services? (may be risky :?)

Biplab:
You are quite correct. The release target seems to have problem.

Though in my pc there is NO crash in running Release target but it generates Error# 6 in Release target. In Debug target there is no such error.

I think you should write about your problem to MinGW mailing list. They can help you better. :)

tom0769:

--- Quote from: Biplab on February 19, 2007, 06:38:24 pm ---You are quite correct. The release target seems to have problem.

Though in my pc there is NO crash in running Release target but it generates Error# 6 in Release target. In Debug target there is no such error.

I think you should write about your problem to MinGW mailing list. They can help you better. :)

--- End quote ---

Thank you Biplab! :D
I'll post this to the MinGW forums.
Surely it's the better place to discuss it since it probably has nothing to do with C::B itself.

Navigation

[0] Message Index

[*] Previous page

Go to full version