GNOME Bugzilla – Bug 544893
Crash in web album <gthumb:if/>
Last modified: 2008-07-31 16:23:50 UTC
Steps to reproduce: 1. create a custom web album theme 2. create a put the following statement in thumbnail.ghtml on top. <gthumb:if thumb_width > thumb_height/> <p>landscape</p> <gthumb:end/> Stack trace: Segmentation fault Other information: the following works, but now the dimension is output, the same problem exists for image_width/height etc. <gthumb:eval expr=thumb_width/> <gthumb:if thumb_width > thumb_height/> <p>landscape</p> <gthumb:end/>
Ho I see. Actually the problem shows up for any image-specific readable variable (image_width, preview_width, thumb_width,...). Stay tuned. A patch will follow soon... Christophe
Created attachment 115365 [details] [review] Add image context when evaluating <gthumb:if/> Applies to svn trunk rev 2358. --Chr.
Thanks Christophe for the patch and the quick response. I will test the patch sometime this week. William
Christophe I have applied the patch but it still crashes giving a Segmentation fault. Could be something to do with my old install as I am unable to install it locally.
Mmm, that weird. Would you mind posting a backtrace? To do this, follow "Code Listing 1.4" in http://www.gentoo.org/proj/en/qa/backtraces.xml Thanks! Christophe
(In reply to comment #5) Christophe the info you were looking for: wil@williambell:~/bin$ gdb ./gthumb GNU gdb 6.8-debian Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i486-linux-gnu"... (gdb) run Starting program: /home/wil/bin/gthumb [Thread debugging using libthread_db enabled] [New Thread 0xb6a99720 (LWP 2287)] [New Thread 0xb6675b90 (LWP 2293)] [New Thread 0xb65eeb90 (LWP 2294)] [New Thread 0xb64eab90 (LWP 2296)] [New Thread 0xb5affb90 (LWP 2297)] [New Thread 0xb5ce9b90 (LWP 2298)] [New Thread 0xb52feb90 (LWP 2299)] [New Thread 0xb527db90 (LWP 2300)] [New Thread 0xb507db90 (LWP 2302)] [Thread 0xb64eab90 (LWP 2296) exited] [Thread 0xb507db90 (LWP 2302) exited] [Thread 0xb5affb90 (LWP 2297) exited] [New Thread 0xb5affb90 (LWP 2306)] [New Thread 0xb507db90 (LWP 2307)] [Thread 0xb507db90 (LWP 2307) exited] [New Thread 0xb2754b90 (LWP 2309)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb6a99720 (LWP 2287)] 0xb2b29e53 in gth_parsed_doc_print (document=0x8999e10, relative_to=0x87cdbf8 "file:///home/wil/webtest", ce=0x8622ba0, fout=0x89eb888, allow_table=1) at catalog-web-exporter.c:1873 1873 idata = g_list_nth (ce->file_list, ce->image)->data; (gdb) Hope it helps William
William, Thanks for the backtrace. I suspect we are not working on the same source code, since your source line 1873 is actually 1859 in my current version (which is, I believe, up to date, that is, rev 2358). If I run "svn diff" from the source dir, I only get: Index: src/catalog-web-exporter.c =================================================================== --- src/catalog-web-exporter.c (révision 2358) +++ src/catalog-web-exporter.c (copie de travail) @@ -1856,6 +1856,8 @@ break; case GTH_TAG_IF: + idata = g_list_nth (ce->file_list, ce->image)->data; + ce->eval_image = idata; for (scan = tag->value.cond_list; scan; scan = scan->next) { GthCondition *cond = scan->data; if (expression_value (ce, cond->expr) != 0) { which is just my patch. If case you don't get the same output, could you please run a "svn update", check again a "svn diff" and then "make && make install"? Christophe
Christophe You are right. If I do a svn update it does not overwrite my existing changes, so maybe I will delete those files and run svn update again. Thanks William
William, Use svn revert name-of-the-file-to-revert e.g. svn revert data/glade/gthumb_web_exporter.glade Christophe
(In reply to comment #9) Christophe I have reverted my files, the diff is the same as yours but it still segfaults. wil@williambell:~/bin$ gdb ./gthumb GNU gdb 6.8-debian Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i486-linux-gnu"... (gdb) run Starting program: /home/wil/bin/gthumb [Thread debugging using libthread_db enabled] [New Thread 0xb6a34720 (LWP 24441)] [New Thread 0xb6610b90 (LWP 24445)] [New Thread 0xb6589b90 (LWP 24446)] [New Thread 0xb648eb90 (LWP 24447)] [New Thread 0xb5c84b90 (LWP 24448)] [New Thread 0xb5c03b90 (LWP 24449)] [New Thread 0xb5b82b90 (LWP 24450)] [New Thread 0xb57ffb90 (LWP 24452)] [Thread 0xb57ffb90 (LWP 24452) exited] [New Thread 0xb57ffb90 (LWP 24453)] [Thread 0xb648eb90 (LWP 24447) exited] [New Thread 0xb4bd8b90 (LWP 24454)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb6a34720 (LWP 24441)] 0xb5917ded in gth_parsed_doc_print (document=0x891fa10, relative_to=0x89c5518 "file:///home/wil/webtest", ce=0x8623398, fout=0x89d8460, allow_table=1) at catalog-web-exporter.c:1859 1859 idata = g_list_nth (ce->file_list, ce->image)->data; Thanks for you efforts so far!
William, I am puzzled! Could you please post as attachments your index.gthtml, image.gthtml, and thumbnails.gthtml? Thanks, Christophe
Created attachment 115568 [details] The patch fails with the following dataset
Created attachment 115612 [details] [review] Add image context when evaluating <gthumb:if/> William, Thank you for the files. Could you please try this patch (applies to rev. 2362)? Best regards, Christophe
(In reply to comment #13) Christophe The patch works, great! Thanks for all your help. Regards William
Patch committed to trunk and gthumb-2-10 branch. Thanks! http://svn.gnome.org/viewvc/gthumb?rev=2364&view=rev http://svn.gnome.org/viewvc/gthumb?rev=2365&view=rev - Mike