0

Hi All,
I am using ACE.
when i try to open a file with ACE_OS::fopen function in append mode, my program crashes.
There seems to be no problem when i try ACE_OS::fopen function with write or read mode.

code example.

ACE_OS::fopen("demo.txt", ACE_TEXT("w")); // working fine
ACE_OS::fopen("demo.txt", ACE_TEXT("r")); // working fine

ACE_OS::fopen("demo.txt", ACE_TEXT("a")); // program crashes

when i debug the the program crashes in os_ns_thread.inl file
in ACE_OS::thread_mutex_lock function

Regards,
Amit Pawar

2
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by Salem
0

Does this crash?

int main ( ) {
  ACE_OS::fopen("demo.txt", ACE_TEXT("a"));
}

If not, then there's a bug somewhere else in your program and what you're seeing is fallout from the result of your real bug.

0

Does this crash?

int main ( ) {
  ACE_OS::fopen("demo.txt", ACE_TEXT("a"));
}

If not, then there's a bug somewhere else in your program and what you're seeing is fallout from the result of your real bug.

HI Salem,
Thanks for the reply,
I had already created a new project, which only included

ACE_OS::fopen("demo.txt", ACE_TEXT("a"));

Then also program crashes:(

0

Well if you've got a really simple test case, then you need to be showing it to the author / maintainer of the package.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.