05-14-2012 07:46 AM
I've written small network application in Qt with an extensive part written in plain C. I am also using OpenSSL library. This application works pretty fine in Linux.
Now I'm trying to port it to a Playbook. It fails with the following error:
Malloc Check Failed: :/builds/GR2_0_0_CE3-Worldbuild/latest/svn/lib/c/a
The most interesting part is that sometimes after rebuilding it suddenly runs without any error!
I'm using Simlator 2.0.0 and NDK 2.0.0.
I don't know what to do and I count on your support.
Thanks in advance.
05-15-2012 03:43 AM - edited 05-15-2012 03:45 AM
Looks like you have a Bug in in your App or in a used library. Maybe you didn't initialize a variable correctly.
If it sometimes runs without problems this could be of the random values in memory.
Try valgrind to check your App. Maybe you can find the problem.
P.S. I sometimes also have to completely rebuild (qmake, clean, rebuild) the project to get it working.
05-16-2012 06:28 AM
I just want to know whether is it a known blackberry issue or that's my problem (I remind you that it works in Linux). Thank you anyway, I'll try to valgrind it.
05-16-2012 07:00 AM
I also use massive network connections (mostly http but also some https)and didn't have the error. But I doesn't use the Simulator.
Back to my idea: every compiler produces different code and every system handles memory different. It maybe, it's running on Linux without a problem and crashes on Windows. If you use a pointer that is not correctly initialized and you access the data it can produce many different errors on different systems or even starts of the program, cause the memory could be written to in the meantime.
If the pointer is 0 you will get an coredump on Linux. If the value of the pointer is within normal memory used by the prog you will get access to it and everything seems to run "normal". So I always initialize every variable to be shure to have a valid value or NULL.
So just try valgrind to see if you get some errors. Just install it and start your App with valgrind. You can use your Linux-Version for it to check your code. I have no Idea how to do it in the simulator :-(
08-08-2012 09:43 AM
Hello, I'm having the same error. I'm porting a game fro ios to pb and bb10, the game is almost in c++ that why should be easy.
I really don't know how to debug this beacause when I recive this error I can't see the stack, or the only call I can se before the error are from the system.
I also can see another threads but either without usefull info.
How can I launch valgrind on pb? I'm using a mac with momentics ide.
08-08-2012 10:58 AM
I don't understand how it is possible, there must be at least one call from your app ont the top.
Or you can go step-by-step in debugger (in your app) and see when the error pops up.
11-02-2012 01:40 PM
I've just hit this myself - no app functions in the stack trace just some really nasty looking system calls. The list I have is:
SignallKill() at 0x175c7b8
raise() at 0x174cc68
__malloc_panic_str() at 0x1747d44
_band_get_aligned() at -x17465cc
I'm just about to fine tunely debug this but did anybody come up a with a resolution to a similar problem?