Bus error

Hi everyone,

I have a GUI project and when I run it and left in idle state for a long time(there is nothing done, just opened GUI, no more actions),I get bus error after trying to do anything with it.
I've tried to build it in debug mode and use gdb, but I don't get any error in debug mode.It seems the problem related to initialization, but I guess the problem isn't it, because I used FlexeLint and didn't get any kind of error like initialization or unallocated memory (FlexeLint gives this type of erros).

After that I run my project on 64bit machine and didn't get bus error.It seems program works fine on 64bit machine.

Could anyone help me with this problem.What should I do? What kind of errors I need to search in my program?

Thanks.

Hard to say. You have not given us much information to go on. Obviously some sort of memory corruption (overwriting, random garbage in uninitialized data, etc.) While FlexeLint and similar tools are good, they do not catch all errors.

Without seeing the error message or your source code, I doubt if anybody can help you.

1 Like

Of course you are right...I see that.
But the project is huge and I just can't put it here.I'm just analyzing it trying to find what exactly can cause the error.
The situation is this - I run program, opens some GUI and it works ok...but if I leave it in idle state, after a long time, after a few hours when I again try to do something with it, I just get Bus Error and the application hangs there.

For me it's hard to solve the problem because I just cannot use gdb or valgrind, because as I said when I build project in debug mode, it works fine.

All this i described above was done on 32bit machine.
And there is no any problem on 64bit machine.Program works fine.

Please give me any suggestions to go ahead.
Thanks.

Use something like IBM's Purify on your application.

It's a LOT cheaper than trying to find memory corruption bugs by just looking for them.