GNOME Bugzilla – Bug 641078
Video encoder crashes on 64 bit system
Last modified: 2018-05-24 10:22:12 UTC
I built gimp-gap for my 64 bit Fedora 14 system. When trying to encode an animation, I got a window to select various parameters and encodings. But regardless of what I chose, it crashed. Unless I'm mistaken, the reason is missing includes in libgapvidutil/gap_gve_misc_util.c. This file uses g_fopen(), but it doesn't include its header. Which means it gets default-declared to return int. But it returns a pointer, which is twice as big on 64 bit systems. I added the lines #include <glib.h> #include <glib/gstdio.h> to the top of the file, and recompiled. That seems to have helped, I don't get the crash any more.
Thanks for taking the time to report this bug. This bug report isn't very useful because it doesn't describe the bug well. If you have time and can still reproduce the bug, please read http://bugzilla.gnome.org/bug-HOWTO.html and add a more useful description to this bug. Thanks for taking the time to report this bug. Without a stack trace from the crash it's very hard to determine what caused it. Can you get us a stack trace? Please see http://live.gnome.org/GettingTraces for more information on how to do so. Thanks in advance!
Thanks for reporting this bug. I think it can be useful to fix GIMP-GAP problems on 64 bit systems. Note that my GIMP-GAP development system is still 32 bits.. I will check GIMP-GAP sourcecode for similar problems and add your fix in the next days..
Please note that it would be useful to provide more details. (as stated in the comment 2011-02-01 01:24:42) In this case the version of your glib and the version of GIMP-GAP that caused the crash would be useful.
I rebuilt gimp-gap again without my patch. Here is the description as outlined in the HOWTO. (Partially I repeat comment 1, to have it all in one place.) Overview: When trying to encode an animation, I get a window to select various parameters and encodings. But regardless of what I chose, it crashes. Steps to Reproduce: 1. Start gimp 2. Create a new picture. (Leave default settings.) 3. Save as frame_000000.xcf 4. Open Video->Duplicate frames (from 0, to 0, 1 times) 5. Click ok. 6. Open Video->Master video encoder. (Leave default settings.) 7. Click ok. Actual Results: The plugin crashes. Gimp shows an error message about it. Expected Results: An encoded file with the animation should be created. Build Date & Platform: Fedora 14, with these package versions in particular: gimp-2.6.11-1.fc14.x86_64 gimp-gap-2.6.0-1.x86_64 glib2-2.26.0-2.fc14.x86_64 Additional Information: By adding the headers #include <glib.h> #include <glib/gstdio.h> to the top of libgapvidutil/gap_gve_misc_util.c, the problem appears fixed. The stack trace is:
+ Trace 225803
At the crash, the value of "fp" in p_write_encoder_status is 0xffffffffb40012c0. To me that does not look like a plausible address for a FILE structure from stdio. But on the other hand, it looks very much like a 32 bit int 0xb40012c0 extended to 64 bits before being used as a pointer.
> I think it can be useful to fix GIMP-GAP problems on 64 bit systems. I get crashes in the ffmpeg encoder too. Could be another 64 bit issue. But my investigation of that issue will have to wait a little.
A first check of the gimp-gap code showed that the relevant #include <glib/gstdio.h> statements are already there in the current git repository. Getting the Sourcecode from the GIT repository should work like this: git clone git://git.gnome.org/gimp-gap gimp-gap You may try to build gimp-gap from the current git repository that already fixes most known bugs of the gimp-gap-2.6.0 release, runs with gimp-2.6.x and is based on the latest stable ffmpeg-0.6.1 video encoding engine. In particular see #607924 that adresses video encoding on 64 bit systems, Here is the relevant note from the ChangeLog: 2010-02-08 Wolfgang Hofer <hof@gimp.org> - the GIMP-GAP libavformat(libavcodec based video encoder now disables pre convert to YUV420P colormodel before feeding frame data to the encoding engine. This GIMP_GAP internal pre convrsion seems to fail on 64bit OS (see also #607924) furthermore YUV420P input typically reduces quality of the resulting output video.
I took a snapshot of gimp-gap a couple of days ago. (Commit f29bda517654f52b24726bd0249010d929fe324d to be precise, I believe.) And it does indeed work better. I don't get either of the crashes I got before.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp-gap/issues/12.