Your message dated Sun, 15 Mar 2009 16:20:07 +0000
with message-id <[email protected]>
and subject line Bug#502710: fixed in gqcam 0.9.1-6
has caused the Debian Bug report #502710,
regarding ~/.gqcamrc gets corrupted if gqcam closed with Alt+F4
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
502710: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=502710
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: gqcam
Version: 0.9.1-5
Severity: important

If gqcam is closed with Alt+F4 and not with File/Quit menu item then
the ~/.gqcamrc will be corrupted.

How to reproduce: first apply the attached debug patch then compile and
run gqcam. Press Alt+F4 to close gqcam.

$ rm ~/.gqcamrc
$ gqcam-0.9.1/gqcam -v /dev/video0
gqcam.c:459: &camera=0x8058640
frontend.c:605: camera=0x8058640
frontend.c:653: camera=0x8058640
camera->inputtype=0x0
Error reading image...
camera->inputtype=0x0
Error reading image...
camera->inputtype=0x0
Error reading image...
camera->inputtype=0x0
Error reading image...
camera->inputtype=0x0
Error reading image...
camera->inputtype=0x0
Error reading image...
camera->inputtype=0x0
Error reading image...
camera->inputtype=0x0
Error reading image...
camera->inputtype=0x0
Error reading image...
camera->inputtype=0x0
Error reading image...
camera->inputtype=0x0
gqcam.c:400: camera=0x8458798
gqcam.c:401: camera->inputtype=0x845A908
preferences.c:205: camera=0x8458798
Error reading image...
$ cat ~/.gqcamrc
autobrightness 0
swaprgb 4
inputtype 138782984

As you can see the "camera" pointer at gqcam.c:delete_event() is already wrong
(0x8458798 instead of 0x8058640) which means that the saved .gqcamrc file will
be corrupted.
diff -upr gqcam-0.9.1.orig/frontend.c gqcam-0.9.1/frontend.c
--- gqcam-0.9.1.orig/frontend.c	2008-10-19 12:35:45.000000000 +0200
+++ gqcam-0.9.1/frontend.c	2008-10-19 12:38:52.000000000 +0200
@@ -443,6 +443,8 @@ void dock_controls(GtkWidget *widget, st
     camera->controlwindow = gtk_window_new(GTK_WINDOW_DIALOG);
     gtk_container_add (GTK_CONTAINER(camera->controlwindow), camera->controltop);
     gtk_window_set_title(GTK_WINDOW (camera->controlwindow), "Gqcam - Control Panel");
+
+    printf("%s:%u: camera=%p\n", __FILE__, __LINE__, camera);
     gtk_signal_connect (GTK_OBJECT (camera->controlwindow), "delete_event",
 			GTK_SIGNAL_FUNC (close_controls), camera);
     gtk_widget_show(camera->controlwindow);
@@ -599,6 +601,8 @@ int create_frontend(struct Camera *camer
   window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   gtk_window_set_title (GTK_WINDOW (window), title);
   gtk_window_set_policy(GTK_WINDOW(window), FALSE, TRUE, TRUE);
+
+  printf("%s:%u: camera=%p\n", __FILE__, __LINE__, camera);
   gtk_signal_connect (GTK_OBJECT (window), "delete_event",
 		      GTK_SIGNAL_FUNC (delete_event), camera);
 
@@ -645,6 +649,8 @@ int create_frontend(struct Camera *camer
 
   quititem = gtk_menu_item_new_with_label("Quit");
   gtk_menu_append(GTK_MENU(filemenu), quititem);
+
+  printf("%s:%u: camera=%p\n", __FILE__, __LINE__, camera);
   gtk_signal_connect(GTK_OBJECT (quititem), "activate",
 		     GTK_SIGNAL_FUNC (delete_event),
 		     camera);
diff -upr gqcam-0.9.1.orig/gqcam.c gqcam-0.9.1/gqcam.c
--- gqcam-0.9.1.orig/gqcam.c	2008-10-19 12:35:45.000000000 +0200
+++ gqcam-0.9.1/gqcam.c	2008-10-19 12:42:15.000000000 +0200
@@ -287,6 +287,8 @@ void grab_image(struct Camera *camera)
   while ( !plsquit ) {
     // order matters! the sem_waits MUST be before the mutex lock
     
+    printf("camera->inputtype=0x%X\n", camera->inputtype);
+
     if( !sem_wait( &s_grab1 ) && ( camera->speed_fastest || !sem_wait( &s_grab2 ) ) && !pthread_mutex_lock( &camera->freeze_mutex ) && !pthread_mutex_lock( &camera->iscam_mutex )){
 
       pthread_mutex_lock( &camera->pref_mutex );
@@ -395,6 +397,9 @@ void delete_event(GtkWidget *widget, str
   char * savefile;
   char * path = "/.gqcamrc";
 
+  printf("%s:%u: camera=%p\n", __FILE__, __LINE__, camera);
+  printf("%s:%u: camera->inputtype=0x%X\n", __FILE__, __LINE__, camera->inputtype);
+
   if((home = getenv("HOME")) != NULL && (savefile = malloc(strlen(home)
 				  + strlen(path) + 1)) != NULL)
   {
@@ -451,6 +456,7 @@ int main(int argc, char *argv[])
   int done = 0;
   FILE *preffile;
 
+  printf("%s:%u: &camera=%p\n", __FILE__, __LINE__, &camera);
   init_cam(&camera);
 /*
   g_thread_init(NULL);
diff -upr gqcam-0.9.1.orig/preferences.c gqcam-0.9.1/preferences.c
--- gqcam-0.9.1.orig/preferences.c	2005-04-04 03:25:09.000000000 +0200
+++ gqcam-0.9.1/preferences.c	2008-10-19 12:22:33.000000000 +0200
@@ -65,6 +65,7 @@ void pref_dialog(GtkWidget *widget, stru
   GtkWidget *label;
   */
 
+  printf("%s:%u: camera=%p\n", __FILE__, __LINE__, camera);
   camera->pref_dialog.prefdialog = gtk_dialog_new();
 
   camera->pref_dialog.prefnotebook = gtk_notebook_new();
@@ -180,6 +181,7 @@ void read_pref_file(FILE *input, struct 
   char buff[1024], command[1024];  
   int val=0;
   
+  printf("%s:%u: camera=%p\n", __FILE__, __LINE__, camera);
   while(fgets(buff, sizeof(buff), input) != NULL){
     if((buff[0] != '#') && (buff[0] != '\n'))
       {
@@ -200,6 +202,7 @@ void read_pref_file(FILE *input, struct 
 
 void save_pref_file(FILE *output, struct Camera *camera)
 {
+  printf("%s:%u: camera=%p\n", __FILE__, __LINE__, camera);
   fprintf(output, "autobrightness %d\n", camera->autobright);
   fprintf(output, "swaprgb %d\n", camera->swapcolors);
   fprintf(output, "inputtype %d\n", camera->inputtype);
@@ -207,6 +210,7 @@ void save_pref_file(FILE *output, struct
 
 void ok_prefs(GtkWidget *widget, struct Camera *camera)
 {
+  printf("%s:%u: camera=%p\n", __FILE__, __LINE__, camera);
   apply_prefs(widget, camera);
   closedialog(widget, camera->pref_dialog.prefdialog);
 }
@@ -214,6 +218,7 @@ void ok_prefs(GtkWidget *widget, struct 
 
 void apply_prefs(GtkWidget *widget, struct Camera *camera)
 {
+  printf("%s:%u: camera=%p\n", __FILE__, __LINE__, camera);
   if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(camera->pref_dialog.rgbswap)))
     camera->swapcolors = 1;
   else
diff -upr gqcam-0.9.1.orig/timer.c gqcam-0.9.1/timer.c
--- gqcam-0.9.1.orig/timer.c	2008-10-19 12:35:45.000000000 +0200
+++ gqcam-0.9.1/timer.c	2008-10-19 12:20:13.000000000 +0200
@@ -39,21 +39,25 @@
 
 void set_timer_seconds(GtkWidget *widget, struct Camera *camera)
 {
+  printf("%s:%u: camera=%p\n", __FILE__, __LINE__, camera);
   camera->timer_struct.unit = SECONDS;
 }
 
 void set_timer_minutes(GtkWidget *widget, struct Camera *camera)
 {
+  printf("%s:%u: camera=%p\n", __FILE__, __LINE__, camera);
   camera->timer_struct.unit = MINUTES;
 }
 
 void timer_snap_now(GtkWidget *widget, struct Camera *camera)
 {
+  printf("%s:%u: camera=%p\n", __FILE__, __LINE__, camera);
   next_frame(camera);
 }
 
 void timer_stop_timer(GtkWidget *widget, struct Camera *camera)
 {
+  printf("%s:%u: camera=%p\n", __FILE__, __LINE__, camera);
   camera->on_timer = 0;
   gtk_timeout_remove(camera->timeoutid);
   if(!camera->timeout)
@@ -75,6 +79,7 @@ void timer_ok(GtkWidget *widget, struct 
   int timeout;
   char snaplabeltext[30];
   
+  printf("%s:%u: camera=%p\n", __FILE__, __LINE__, camera);
   if(strlen(gtk_entry_get_text(GTK_ENTRY(camera->timer_struct.commandentry))) > 255){
     printf("Command too long...\n");
     return;
@@ -140,6 +145,7 @@ void timer_ok(GtkWidget *widget, struct 
 
 void timer_cancel(GtkWidget *widget, struct Camera *camera)
 {
+  printf("%s:%u: camera=%p\n", __FILE__, __LINE__, camera);
   //camera->on_timer = 0;
   gtk_widget_destroy(camera->timer_struct.timerdialog);
 }
@@ -163,6 +169,7 @@ void set_timer(GtkWidget *widget, struct
   GtkWidget *okbutton;
   GtkWidget *cancelbutton;
 */
+  printf("%s:%u: camera=%p\n", __FILE__, __LINE__, camera);
   //  camera->on_timer = 1;
   
   camera->timer_struct.timerdialog = gtk_dialog_new();

--- End Message ---
--- Begin Message ---
Source: gqcam
Source-Version: 0.9.1-6

We believe that the bug you reported is fixed in the latest version of
gqcam, which is due to be installed in the Debian FTP archive:

gqcam_0.9.1-6.diff.gz
  to pool/main/g/gqcam/gqcam_0.9.1-6.diff.gz
gqcam_0.9.1-6.dsc
  to pool/main/g/gqcam/gqcam_0.9.1-6.dsc
gqcam_0.9.1-6_i386.deb
  to pool/main/g/gqcam/gqcam_0.9.1-6_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Alberto Gonzalez Iniesta <[email protected]> (supplier of updated gqcam package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Sat, 14 Mar 2009 20:33:55 +0100
Source: gqcam
Binary: gqcam
Architecture: source i386
Version: 0.9.1-6
Distribution: unstable
Urgency: low
Maintainer: Alberto Gonzalez Iniesta <[email protected]>
Changed-By: Alberto Gonzalez Iniesta <[email protected]>
Description: 
 gqcam      - GTK Webcam control
Closes: 449240 502640 502710
Changes: 
 gqcam (0.9.1-6) unstable; urgency=low
 .
   * Moved patches to debian/patches.
   * debian/control: Added quilt to Build-Depends
   * Moved to debhelper 5
   * Németh Márton:
     - Workaround .gqcamrc corruption when closing gqcam with Alt+F4.
       (Closes: #502710) gqcamrc-corruption-workaround.patch
     - Clean up gcc warning messages.
       (Closes: 502640) gqcam-cleanup.patch
     Thanks a lot Németh!
   * Added menu icon. (Closes: #449240)
Checksums-Sha1: 
 9b9475961bf0faff25aacf2ead98fa996c39fd82 989 gqcam_0.9.1-6.dsc
 4973dfef54d02134cd97dad13e7c354cb2d69628 13870 gqcam_0.9.1-6.diff.gz
 e0190af36de5b1f9fe18e0666fcdcb55870a2785 41084 gqcam_0.9.1-6_i386.deb
Checksums-Sha256: 
 203fbc9fcf9428c1112d3db8005c85fe2bb739015d9614c459370f9553336e06 989 
gqcam_0.9.1-6.dsc
 7ab08e8cf75866d0b4c30e5274f6694485c366968e74339f95ab58e9c5cc8d26 13870 
gqcam_0.9.1-6.diff.gz
 3c1b13cbc377b296d7235921c4f49582a3416f7df9cad68554f173a766d4d4f4 41084 
gqcam_0.9.1-6_i386.deb
Files: 
 4207dc2e5590ee5458fb0190fed53a9d 989 graphics optional gqcam_0.9.1-6.dsc
 c7164d8cb25c41e3d3fd8fda2f9bd17b 13870 graphics optional gqcam_0.9.1-6.diff.gz
 4d9ceac31f933b70316b494af069017c 41084 graphics optional gqcam_0.9.1-6_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkm9FGAACgkQxRSvjkukAcPs5QCfdtKDQ3W4ZdZWb1mX7yo48SNl
hrkAoL6fDVycrABdfRGdMD7bw2nsjb2J
=MHz4
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to