[JdeRobot] Random core dump on glade set stock icon
Oscar Garcia
oscar.robotica at linaresdigital.com
Fri Mar 27 06:29:12 CET 2015
Good night,
I have a problem that I lose sleep, literally. I'm working on it
severals hours ago and I have come to a dead end.
I had this code (in new viewer.cpp[1][2]):
void Viewer::DisplayError() {
pthread_mutex_unlock(&mutex_);
gtk_image_in_->set(Gtk::Stock::MISSING_IMAGE, Gtk::ICON_SIZE_DIALOG);
main_window_->resize(1, 1);
while (gtk_main_.events_pending())
gtk_main_.iteration();
pthread_mutex_lock(&mutex_);
}
Application randomly crashes with a core dump when this function is
called in this line:
gtk_image_in_->set(Gtk::Stock::MISSING_IMAGE, Gtk::ICON_SIZE_DIALOG);
Error message: Violación de segmento (`core' generado)
I don't know why original programmer of opencvdemo wrote locks in
reverse order, but I don't know if it is the root cause of the problem
or something else.
If I don't change the image to the "missing image" icon the application
(commenting out that line of code) is able to survive any network
problem and recover just when cameraserver and/or AndroidCameraServer
went online again. But if I try to change the icon the application
survives easily (one of six-ten survives) cameraserver closes (control+c
to kill cameraserver) but one of two-three times opencvdemo crashes at
same time that AndroidCameraServer closes pressing "back" button.
Anyone have any idea about the issue?
Thanks in advance. I'm go to rest and sleep for a while :) Regards!
[1]:
https://github.com/ojgarciab/JdeRobot/blob/Fix_27/src/stable/components/opencvdemo/viewer.cpp#L771
[2]: https://github.com/ojgarciab/JdeRobot/tree/Fix_27
Branch "Fix_27" of my JdeRobot fork.
More information about the Jde-developers
mailing list