Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#6975 closed bug (fixed)

ShowImage Wonderbush Tarsizer all end in GDB when opening JPG files, other formats maybe effected

Reported by: stargatefan Owned by: axeld
Priority: normal Milestone: R1
Component: Kits/Translation Kit Version: R1/Development
Keywords: Cc: mdisreali@…
Blocked By: Blocking:
Has a Patch: yes Platform: All

Description (last modified by anevilyak)

Cannot open jpegs that come from fat32 or fat filesystem drives.

gdb info

GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i586-pc-haiku"...(no debugging symbols found)

[tcsetpgrp failed in terminal_inferior: Invalid Argument]
Thread 213 caused an exception: Segment violation
Reading symbols from /boot/system/runtime_loader...done.
Loaded symbols for /boot/system/runtime_loader
Reading symbols from /boot/system/lib/libbe.so...done.
Loaded symbols for /boot/system/lib/libbe.so
Reading symbols from /boot/system/lib/libtracker.so...done.
Loaded symbols for /boot/system/lib/libtracker.so
Reading symbols from /boot/system/lib/libtranslation.so...done.
Loaded symbols for /boot/system/lib/libtranslation.so
Reading symbols from /boot/system/lib/liblocale.so...done.
Loaded symbols for /boot/system/lib/liblocale.so
Reading symbols from /boot/system/lib/libstdc++.so...done.
Loaded symbols for /boot/system/lib/libstdc++.so
Reading symbols from /boot/system/lib/libsupc++.so...done.
Loaded symbols for /boot/system/lib/libsupc++.so
Reading symbols from /boot/system/lib/libroot.so...done.
Loaded symbols for /boot/system/lib/libroot.so
Reading symbols from /boot/system/lib/libtextencoding.so...done.
Loaded symbols for /boot/system/lib/libtextencoding.so
Reading symbols from /boot/system/lib/libicudata.so.44...
warning: Lowest section in /boot/system/lib/libicudata.so.44 is .hash at 00000094
done.
Loaded symbols for /boot/system/lib/libicudata.so.44
Reading symbols from /boot/system/lib/libicui18n.so.44...done.
Loaded symbols for /boot/system/lib/libicui18n.so.44
Reading symbols from /boot/system/lib/libicuio.so.44...done.
Loaded symbols for /boot/system/lib/libicuio.so.44
Reading symbols from /boot/system/lib/libicule.so.44...done.
Loaded symbols for /boot/system/lib/libicule.so.44
Reading symbols from /boot/system/lib/libiculx.so.44...done.
Loaded symbols for /boot/system/lib/libiculx.so.44
Reading symbols from /boot/system/lib/libicutu.so.44...done.
Loaded symbols for /boot/system/lib/libicutu.so.44
Reading symbols from /boot/system/lib/libicuuc.so.44...done.
Loaded symbols for /boot/system/lib/libicuuc.so.44
Reading symbols from /boot/system/lib/libroot-addon-icu.so...done.
Loaded symbols for /boot/system/lib/libroot-addon-icu.so
Reading symbols from /boot/system/add-ons/Translators/BMPTranslator...done.
Loaded symbols for /boot/system/add-ons/Translators/BMPTranslator
Reading symbols from /boot/system/add-ons/Translators/EXRTranslator...done.
Loaded symbols for /boot/system/add-ons/Translators/EXRTranslator
Reading symbols from /boot/system/lib/libilmimf.so...done.
Loaded symbols for /boot/system/lib/libilmimf.so
Reading symbols from /boot/system/lib/libz.so.1...done.
Loaded symbols for /boot/system/lib/libz.so.1
Reading symbols from /boot/system/add-ons/Translators/GIFTranslator...done.
Loaded symbols for /boot/system/add-ons/Translators/GIFTranslator
Reading symbols from /boot/system/add-ons/Translators/HVIFTranslator...done.
Loaded symbols for /boot/system/add-ons/Translators/HVIFTranslator
Reading symbols from /boot/system/add-ons/Translators/ICOTranslator...done.
Loaded symbols for /boot/system/add-ons/Translators/ICOTranslator
Reading symbols from /boot/system/add-ons/Translators/JPEG2000Translator...done.
Loaded symbols for /boot/system/add-ons/Translators/JPEG2000Translator
Reading symbols from /boot/system/add-ons/Translators/JPEGTranslator...done.
Loaded symbols for /boot/system/add-ons/Translators/JPEGTranslator
Reading symbols from /boot/system/lib/libjpeg.so.8.0...done.
Loaded symbols for /boot/system/lib/libjpeg.so.8.0
Reading symbols from /boot/system/add-ons/Translators/PCXTranslator...done.
Loaded symbols for /boot/system/add-ons/Translators/PCXTranslator
Reading symbols from /boot/system/add-ons/Translators/PNGTranslator...done.
Loaded symbols for /boot/system/add-ons/Translators/PNGTranslator
Reading symbols from /boot/system/add-ons/Translators/PPMTranslator...done.
Loaded symbols for /boot/system/add-ons/Translators/PPMTranslator
Reading symbols from /boot/system/add-ons/Translators/RAWTranslator...done.
Loaded symbols for /boot/system/add-ons/Translators/RAWTranslator
Reading symbols from /boot/system/add-ons/Translators/RTF-Translator...done.
Loaded symbols for /boot/system/add-ons/Translators/RTF-Translator
Reading symbols from /boot/system/add-ons/Translators/SGITranslator...done.
Loaded symbols for /boot/system/add-ons/Translators/SGITranslator
Reading symbols from /boot/system/add-ons/Translators/STXTTranslator...done.
Loaded symbols for /boot/system/add-ons/Translators/STXTTranslator
Reading symbols from /boot/system/add-ons/Translators/TGATranslator...done.
Loaded symbols for /boot/system/add-ons/Translators/TGATranslator
Reading symbols from /boot/system/add-ons/Translators/TIFFTranslator...done.
Loaded symbols for /boot/system/add-ons/Translators/TIFFTranslator
Reading symbols from /boot/system/lib/libtiff.so.3.8...done.
Loaded symbols for /boot/system/lib/libtiff.so.3.8
Reading symbols from /boot/system/add-ons/Translators/WebPTranslator...done.
Loaded symbols for /boot/system/add-ons/Translators/WebPTranslator
Reading symbols from /boot/system/add-ons/Translators/WonderBrushTranslator...done.
Loaded symbols for /boot/system/add-ons/Translators/WonderBrushTranslator
[tcsetpgrp failed in terminal_inferior: Invalid Argument]
[Switching to team /boot/system/apps/ShowImage (204) thread image loader (213)]
0xffff012c in ?? ()
(gdb) 

Attachments (9)

screenshot3.png (145.2 KB) - added by stargatefan 8 years ago.
screenshot4.png (145.0 KB) - added by stargatefan 8 years ago.
screenshot5.png (81.2 KB) - added by stargatefan 8 years ago.
P1180069.jpg (85.3 KB) - added by Disreali 8 years ago.
warning: jpeg crashes ShowImage
r40273-2h_image_open_in_web+.png (544.3 KB) - added by Disreali 8 years ago.
r40273-2h_showimage_crash_on_P1180069-jpg.png (118.0 KB) - added by Disreali 8 years ago.
syslog_r40723-2h_showimage_crash.txt (528.9 KB) - added by Disreali 8 years ago.
r40273_showimage_crash.txt (5.8 KB) - added by Disreali 8 years ago.
ReadHelper.h.diff (447 bytes) - added by stimut 8 years ago.

Download all attachments as: .zip

Change History (23)

comment:1 Changed 8 years ago by anevilyak

Component: Servers/media_serverKits/Translation Kit
Description: modified (diff)
Version: R1/alpha2R1/Development

It'd be helpful to have the actual backtrace from gdb, all you've listed is what libraries it loaded, and it gives no hint as to where it actually crashed.

comment:2 Changed 8 years ago by stargatefan

I don't know how to use GDB the documentation is confusing. gcc4h 39814

Best way to reproduce.

put jpeg on usb stick in a widnows OS, XP VISTA win&. Make sure usb stick is FAT32 formated.

Mount stick in hiaku. copy or attempt to open file.

it should reproduce. I tests it on 3 machines and they all rpesented with the same symptoms.

BTW can someone turn the gdb guide into english ?

Last edited 8 years ago by stargatefan (previous) (diff)

comment:3 Changed 8 years ago by anevilyak

Just type "bt" at the gdb prompt.

comment:4 Changed 8 years ago by stargatefan

its gcc4 specific. this much I can now certify. I still can't get a back trace it hangs the system up. I hand't been paying much attention to the gcc2 builds but gcc2 builds mount fat/ntfs drives just fine. gcc4 builds, not so much. so its likely related to the mounting issues on gcc4 of which there are a few tickets I have seen.

so this problem is not present in gcc2H 39848 but it is present in the gcc4 variants I list above.

being as I can't get my machine to run on todays gcc4 build. We will have to wait for a build the works to come up and I will try to get a BT for you then.

Last edited 8 years ago by stargatefan (previous) (diff)

comment:5 Changed 8 years ago by stargatefan

New info, I will edit this later but it appears to only be a problem "at the moment with JPG" files.

I will try a bunch of the same files and post back all results tonight.

Changed 8 years ago by stargatefan

Attachment: screenshot3.png added

Changed 8 years ago by stargatefan

Attachment: screenshot4.png added

Changed 8 years ago by stargatefan

Attachment: screenshot5.png added

comment:6 Changed 8 years ago by stargatefan

Opens a png from the same directory with no problem. .jpg is a no go. I attached screen shots of the errors I am recieving. The drive this is comming from is a ntfs on WinXp SP3. I get the same results on fat and fat32. I surmise I could test with more file types. But I really don't use any other files types to begin with.

I am going to modify the ticket as I have noticed all .jpg files are returning the same error even on the BFS.

Last edited 8 years ago by stargatefan (previous) (diff)

comment:7 Changed 8 years ago by stargatefan

Summary: ShowImage Wonderbush Tarsizer all end in GDB when comming from FAT32/FATShowImage Wonderbush Tarsizer all end in GDB when opening JPG files, other formats maybe effected

comment:8 Changed 8 years ago by diver

I believe it's a dupe of #6842.

comment:9 Changed 8 years ago by stargatefan

this seems to have cured itself recently. Its been gone for several weeks. still having issues with mounting partitions but Jpegs are no longer sending me in kdl and gdb land or just not working. My though is close the ticket, it could have been related to the bios problems I was having to.

comment:10 Changed 8 years ago by Disreali

Cc: mdisreali@… added

I experienced this issue on hrev40173, hrev40258, hrev40271, and hrev40273 gcc2hybrids. I have found a single jpg file that causes the crash and will attach it. I can open the image in Web+ and Bezilla without problem, yet Showimage and Wonderbrush crash when opening it.

I can't be sure, but I don't think that the issue is that the images are from a fat32/fat volume. The one file that is giving me problems was in a zip archive of over 100 image that I transfered from my winXP volume which is NTFS. IIRC the single problem jpg is an HDR image if that helps narrow things down.

jpg and backtrace attached

Changed 8 years ago by Disreali

Attachment: P1180069.jpg added

warning: jpeg crashes ShowImage

Changed 8 years ago by Disreali

Changed 8 years ago by Disreali

Changed 8 years ago by Disreali

Changed 8 years ago by Disreali

Attachment: r40273_showimage_crash.txt added

comment:11 Changed 8 years ago by stimut

There are two parts to this ticket.

The first is the crash that occurs because the file can't be loaded. This was fixed in hrev40692.

The second is that the file can't be loaded. At the bottom level this is because the TReadHelper class throws an exception when it reads 0 bytes, but only in one form of the operator() functions. In the other form (where a length is also provided in the call), reading 0 bytes does not throw an exception. I personally don't think reading 0 bytes should raise an exception, only more serious errors should; plus, the two operator() functions should behave the same when reading 0 bytes. Other code that uses the TReadHelper seems to agree with me, and assumes that it is possible for 0 bytes to be read. I ran Haiku with my proposed change, did some basic computing (used WebPositive etc) and found no problems.

Just for completeness, the call in question occurs in parse_tiff_directory() in exif_parser.cpp in the jpeg translator.

Changed 8 years ago by stimut

Attachment: ReadHelper.h.diff added

comment:12 Changed 8 years ago by stimut

Has a Patch: set

comment:13 Changed 8 years ago by leavengood

Resolution: fixed
Status: newclosed

I applied the patch in hrev40800 and the above test image loads fine now in ShowImage. Thanks for the debugging work and the patch Timothy.

comment:14 Changed 8 years ago by Disreali

Confirmed.

The problematic jpeg no longer crashes ShowImage. tested on hrev40829-4h. Thanks for the patch stimut.

Note: See TracTickets for help on using tickets.