Memory Fault

Hi everybody,

I wrote a C++ program to run with athena board, It works well while i run with normal hard disk.
However, when I changed to the flashdisk, embedded the program by writing the bootscript, the program no longer runs.

The error is “Memory Fault”.

Does anybody know how to fix the error?
Thank you for your time

I don’t think there is remotely enough information here. Some basic questions might be:

  1. What does this program do?
  2. Does it access hardware?
  3. Does it read or write to disk/flash when running?
  4. Where in the program does the Memory Fault occur?

The most important question is probably 4.

Yes, I am trying to debug it now.
To answer your question:

  1. I am trying to develope a sound localisation program.
  2. We are using athenna board. My program need to access analog input ports to do A-D conversion(at 10000Hz) and serial port.
  3. Yes, i have to create some arrays, double type of around 1000.
  4. I am debugging it now. Hopefully, I can answer soon.

I use my program, run it on my hard disk (of course with full QNX6 ) it is ok. So there should be no bugs in the code.
When I finished my bootscript and transfered the whole thing to my flashdisk, the error appears.
May be it is in the calculation part cause I try to run a seperate A/D, it has no problem. But, for this part, I only need five arrays of around 1000. It is not so big? Isn’t it? The calculation part runs well with the hard-disk, why not with the flash-disk?

Today i will try to find out where the error comes from.

Thank you for viewing this.

The basic answer to your question is, no, there is no obvious reason why running with flash should be different from running with a hard drive, but clearly it appears so. This leaves open two likely reasons. 1) When you find where the error occurs, you will learn that the problem had nothing to do with using flash, but it is related to you using another system. 2) You have some kind of hardware problem with your flash. I think 2) is very very unlikely. I might point out, that while a lot of users of this website sincerely try to help out with problems, their strength is having tried something before, and knowing the pitfalls. There is not much we can say about bugs in your software, especially without posting any source, so my step 4) above should normally come before posting.

You said "I use my program, run it on my hard disk (of course with full QNX6 ) it is ok. So there should be no bugs in the code. "

That is a VERY BAD assumption to make.

Thank you all, I got it done already. Some stupid mistakes. Thank you for replying.