wxWidgets / wxWidgets

Cross-Platform C++ GUI Library
https://www.wxwidgets.org/
5.75k stars 1.69k forks source link

crash in TIFF loading functions #19409

Closed wxtrac closed 2 years ago

wxtrac commented 23 years ago

Issue migrated from trac ticket # 44

priority: normal | keywords: wxImage

2000-09-26 22:58:00: anonymous created the issue


Bug#: 112 Product: .wxWindows Version: 2.2.0 Platform: wxGTK OS/Version: Linux - RedHat Status: NEW
Resolution: Severity: critical Priority: P2 Component: wxGTK AssignedTo: ???
ReportedBy: br_9801@hotmail.com
URL: Summary: crash in TIFF loading functions

wxImage crashes when loading an AccuSoft TIFF file. The same file is loaded without problems into the GIMP (gimp-1.1.24-0_helix_1) and xv (xv-3.10a-13).

This may be a problem with the version of the TIFF library that appears to be distributed with wxGTK or it may be a problem with the RPMs.

Unfortunately, I can't provide a copy of the file because it contains personal information, and I can't recreate it (I believe it was produced by Visioneer PaperPort software).

My recommendation would be to rely on the system's TIFF libraries where available (most Linux distributions).

Tom.

$ gdb image ... Program received signal SIGSEGV, Segmentation fault. 0x40815129 in chunk_free (ar_ptr=0x408a9d60, p=0x812e4f8) at malloc.c:3111 3111 malloc.c: No such file or directory. Current language: auto; currently c (gdb) bt

0 0x40815129 in chunk_free (ar_ptr=0x408a9d60, p=0x812e4f8) at

malloc.c:3111

1 0x40814fba in __libc_free (mem=0x812e500) at malloc.c:3023

2 0x4037e9ff in _TIFFfree () from /usr/lib/libwx_gtk-2.2.so.0

3 0x4036d881 in TIFFRGBAImageEnd () from /usr/lib/libwx_gtk-2.2.so.0

4 0x4036e04b in TIFFReadRGBAImage () from

/usr/lib/libwx_gtk-2.2.so.0

5 0x40215641 in wxTIFFHandler::LoadFile () from

/usr/lib/libwx_gtk-2.2.so.0

6 0x4020e884 in wxImage::LoadFile () from

/usr/lib/libwx_gtk-2.2.so.0

7 0x4020e1dc in wxImage::LoadFile () from

/usr/lib/libwx_gtk-2.2.so.0

8 0x805136c in IconDB::getIcon (this=0x8054e30, bitmap=@0xbffff2f0,

path=<incomplete type>) at image.cpp:94

9 0x8050722 in MyFrame::ExpandDirectory (this=0x80ac968,

node=134959128, dirname=) at image.cpp:229

10 0x804f311 in MyFrame::ShowDirectory (this=0x80ac968,

dirname=<incomplete type>) at image.cpp:205

11 0x804f0fe in MyApp::OnInit (this=0x80ac3b8) at image.cpp:275

12 0x4017496f in wxEntry () from /usr/lib/libwx_gtk-2.2.so.0

13 0x804ec58 in main (argc=1, argv=0xbffff414) at image.cpp:281

(gdb) quit The program is running. Exit anyway? (y or n) y
$ tiffinfo bug.tif TIFF Directory at offset 0x8 Subfile Type: multi-page document (2 = 0x2) Image Width: 1534 Image Length: 1020 Resolution: 200.025, 200.025 pixels/inch Bits/Sample: 1 Compression Scheme: CCITT Group 4 Photometric Interpretation: min-is-white FillOrder: msb-to-lsb Artist: "1996-97 AccuSoft Inc., All rights reserved" Date & Time: "2000: 5:09 19:12:08" Software: "ImageGear Version: 6.06.005" Orientation: row 0 top, col 0 lhs Samples/Pixel: 1 Rows/Strip: 1020 Planar Configuration: single image plane Page Number: 0-1 $ rpm -q -i wxGTK Name : wxGTK Relocations: (not relocateable) Version : 2.2.2 Vendor: (none) Release : 0 Build Date: Sat Sep 16 05:23:29 2000Install date: Wed Sep 20 01:57:53 2000 Build Host: florenz.linux.de Group : X11/Libraries Source RPM: wxGTK-2.2.2-0.src.rpm Size : 6464675 License: wxWindows Licence Packager : Robert Roebling robert@roebling.de URL : http://wxwindows.org Summary : The GTK+ 1.2 port of the wxWindows library Description : wxWindows is a free C++ library for cross-platform GUI development. With wxWindows, you can create applications for different GUIs (GTK+, Motif/LessTif, MS Windows, Mac) from the same source code. $ rpm -q -i wxGTK-devel Name : wxGTK-devel Relocations: (not relocateable) Version : 2.2.2 Vendor: (none) Release : 0 Build Date: Sat Sep 16 05:23:29 2000Install date: Wed Sep 20 01:57:59 2000 Build Host: florenz.linux.de Group : X11/Libraries Source RPM: wxGTK-2.2.2-0.src.rpm Size : 1922455 License: wxWindows Licence Packager : Robert Roebling robert@roebling.de URL : http://wxwindows.org Summary : The GTK+ 1.2 port of the wxWindows library Description : Header files for wxGTK, the GTK+ 1.2 port of the wxWindows library.

wxtrac commented 23 years ago

2000-11-24 17:18:49: warmerda commented


I am having related problems. I am working on an application that loads another shared library which has libtiff built in. This is causing me to end of headaches as it conflicts with the version built into wxWindows.

I am willing to fix my other library to use a libtiff as a shared library, but I would really like an option to build and install wxWindows using a preinstalled libtiff shared library. In fact, I think this should be the default.

PS. I am a libtiff maintainer too, so if you need help on that front let me know.

wxtrac commented 23 years ago

2000-11-24 20:00:21: warmerda commented


The system libtiff can be utilized by configuring with the --with-libtiff=sys.

If the bug with the TIFF file persist with the current release libtiff (3.5.5) then submit the problem on the libtiff site's bugzilla and I will look into it (www.libtiff.org).

wxtrac commented 23 years ago

2000-12-16 12:17:45: roebling (Robert Roebling) commented


Was caused by doubly loading libtiff into address space.