Hi,
->if you feel the problem is with core, just spawn the application through gdb.
$gdb applicatonname
$run arguments to aplication
$where
this would give you the exact location of the error.after executing the where command gdb would give the list of functions executed before reaching the falut(in a order such that the first function or instruction would be the exact cause of it).
the function list would contains the name of your application specific function or library api/instruction or kernal api/instruction
you have concentrate on the function which is invoked by your application