Adobe Acrobat Reader Crashes

Issues related to software problems.
Post Reply
maweos
Posts: 21
Joined: 2007/05/22 11:47:12

Adobe Acrobat Reader Crashes

Post by maweos » 2007/06/02 15:40:14

Hi,

just updated to Centos5. Now i have a problem with acroread:
(First i had to fix a regex in /usr/bin/acroread..)
- using acroread from Menu just does nothing.
- starting acroread in a terminal window leads to a SIGSEGV crash.
- starting acroread inside a "su - user" shell works!!!

This strange behaviour happens both on KDE and gnome, and both for normal users and root.
I have attached a strace output, but did not get any clue from it. (sorry, i wanted, but the forum software seems to have a problem with it)

What is wrong with my installation? How can i track down this problem and fix it?

The File i installed is AdobeReader_deu-7.0.9-1.i386.rpm from adobes website. (also tried with AdobeReader_enu-7.0.8-1.i386.rpm - same problem).

TiA

Matthias

maweos
Posts: 21
Joined: 2007/05/22 11:47:12

Re: Adobe Acrobat Reader Crashes

Post by maweos » 2007/06/02 15:45:00

Here the last parts of the strace:

[...]
read(3, "\1~\r\1\0\0\0\0\0\0\0\0\1\0\0\0\24\0\0\0\1\0\0\0\0\0\0"..., 32) = 32
brk(0xa430000) = 0xa430000
brk(0xa428000) = 0xa428000
uname({sys="Linux", node="denkbrett.maweos.de", ...}) = 0
uname({sys="Linux", node="denkbrett.maweos.de", ...}) = 0
writev(3, [{"\1\30\r\0P\0\340\2M\0\0\0\0\0\0\0\310\0\310\0\0\0\1\0#"..., 15776}, {"\20\0\0\0\20\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 14360}], 2) = 30136
open("/home/matthias/.icons/default/cursors/xterm", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/matthias/.icons/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/icons/default/cursors/xterm", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/icons/default/index.theme", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=32, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x6c0000
read(4, "[Icon Theme]\nInherits=Bluecurve\n", 4096) = 32
close(4) = 0
munmap(0x6c0000, 4096) = 0
open("/usr/share/pixmaps/default/cursors/xterm", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/icons/default/cursors/xterm", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/matthias/.icons/Bluecurve/cursors/xterm", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/matthias/.icons/Bluecurve/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/icons/Bluecurve/cursors/xterm", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=13516, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x6c0000
read(4, "Xcur\20\0\0\0\0\0\1\0\3\0\0\0\2\0\375\377\30\0\0\0004\0"..., 4096) = 4096
_llseek(4, 0, [0], SEEK_SET) = 0
read(4, "Xcur\20\0\0\0\0\0\1\0\3\0\0\0\2\0\375\377\30\0\0\0004\0"..., 4096) = 4096
close(4) = 0
munmap(0x6c0000, 4096) = 0
access("/etc/gtk-2.0/i686-redhat-linux-gnu/gtk.immodules", F_OK) = 0
open("/etc/gtk-2.0/i686-redhat-linux-gnu/gtk.immodules", O_RDONLY|O_LARGEFILE) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=1769, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x6c0000
read(4, "# GTK+ Input Method Modules file"..., 4096) = 1769
read(4, "", 4096) = 0
read(4, "", 4096) = 0
close(4) = 0
munmap(0x6c0000, 4096) = 0
stat64("/usr/lib/gtk-2.0/immodules/im-scim.so", {st_mode=S_IFREG|0755, st_size=135428, ...}) = 0
open("/usr/lib/gtk-2.0/immodules/im-scim.so", O_RDONLY) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\250\0"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0755, st_size=135428, ...}) = 0
mmap2(NULL, 134196, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x491f000
mmap2(0x493f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x20) = 0x493f000
close(4) = 0
open("/usr/local/Adobe/Acrobat7.0/Reader/intellinux/lib/libscim-1.0.so.8", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/Adobe/Acrobat7.0/Reader/intellinux/sidecars/libscim-1.0.so.8", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/libscim-1.0.so.8", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/tls/libscim-1.0.so.8", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/i686/libscim-1.0.so.8", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libscim-1.0.so.8", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/i686/libscim-1.0.so.8", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/libscim-1.0.so.8", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/sse2/libscim-1.0.so.8", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/libscim-1.0.so.8", O_RDONLY) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360\10"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0755, st_size=913348, ...}) = 0
mmap2(NULL, 912664, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x5434000
mmap2(0x5505000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0xd1) = 0x5505000
close(4) = 0
open("/usr/local/Adobe/Acrobat7.0/Reader/intellinux/lib/libscim-x11utils-1.0.so.8", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/Adobe/Acrobat7.0/Reader/intellinux/sidecars/libscim-x11utils-1.0.so.8", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/libscim-x11utils-1.0.so.8", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/tls/libscim-x11utils-1.0.so.8", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/i686/libscim-x11utils-1.0.so.8", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libscim-x11utils-1.0.so.8", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/i686/libscim-x11utils-1.0.so.8", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/libscim-x11utils-1.0.so.8", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/sse2/libscim-x11utils-1.0.so.8", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/libscim-x11utils-1.0.so.8", O_RDONLY) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\7\0\000"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0755, st_size=6652, ...}) = 0
mmap2(NULL, 9524, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x84b000
mmap2(0x84d000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x1) = 0x84d000
close(4) = 0
open("/usr/local/Adobe/Acrobat7.0/Reader/intellinux/lib/libstdc++.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/Adobe/Acrobat7.0/Reader/intellinux/sidecars/libstdc++.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/libstdc++.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/tls/libstdc++.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/i686/libstdc++.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libstdc++.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/i686/libstdc++.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/libstdc++.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/sse2/libstdc++.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/libstdc++.so.6", O_RDONLY) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\325"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0755, st_size=925520, ...}) = 0
mmap2(NULL, 947876, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x166d000
mmap2(0x174a000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0xdd) = 0x174a000
mmap2(0x174f000, 22180, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x174f000
close(4) = 0
open("/usr/local/Adobe/Acrobat7.0/Reader/intellinux/lib/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/Adobe/Acrobat7.0/Reader/intellinux/sidecars/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/tls/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/i686/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libgcc_s.so.1", O_RDONLY) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p\26\0\000"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0755, st_size=45008, ...}) = 0
mmap2(NULL, 48068, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x6d20000
mmap2(0x6d2b000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0xa) = 0x6d2b000
close(4) = 0
mprotect(0x174a000, 12288, PROT_READ) = 0
gettimeofday({1180796700, 775518}, NULL) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
exit_group(1) = ?
Process 29807 detached

Lenard
Posts: 2283
Joined: 2005/11/29 02:35:25
Location: Indiana

Re: Adobe Acrobat Reader Crashes

Post by Lenard » 2007/06/02 17:46:17

As root do something like:

cd /usr/local/Adobe/Acrobat7.0/bin
wget http://remi.collet.free.fr/files/acroread.patch
patch -b <acroread.patch

maweos
Posts: 21
Joined: 2007/05/22 11:47:12

Re: Adobe Acrobat Reader Crashes

Post by maweos » 2007/06/02 18:13:27

Helo Lenard,

thanks for the patch, but this patch does not work. It applied cleanly, but when starting acroread i get this error:

ERROR: Cannot find installation directory.

Also i think, this patch only fixes the problem with the wrong regex. That is already fixed in my installation.

Note: acroread works inside a "su - user" environment!

TiA

Matthias

maweos
Posts: 21
Joined: 2007/05/22 11:47:12

Re: Adobe Acrobat Reader Crashes

Post by maweos » 2007/06/02 18:19:44

O.k., the "Cannot find install directory" goes away if i patch /usr/local/Adobe/Acrobat7.0/bin/acroread (i tried with /usr/bin/acroread).

Then with the patch applied the crash described earlier happens.

Best Regards

Matthias

Lenard
Posts: 2283
Joined: 2005/11/29 02:35:25
Location: Indiana

Re: Adobe Acrobat Reader Crashes

Post by Lenard » 2007/06/02 18:57:18

Try replacing the acroread file in /usr/lib/acroread/bin with this one, sorry I would have compressed this but the zip file uploads are not working for some reason.:

[code]
#!/bin/sh
#


setLangENU()
{
ST_LANG="ENU"
ST_LANG_SMALL="enu"
ST_READER_RPM_NAME="AdobeReader_enu"
ST_EXCHANGE_RPM_NAME="AdobeAcrobat_enu"
ST_COMMENT_WORD="Comment"
ST_DESCRIPTION_WORD="Description"
ST_COMMENT_RPM="Launch Adobe Reader 7.0"
ST_DES_RPM="Adobe Reader for Linux. An application that can view, navigate and print PDF documents."
ST_DES_TAG01="Adobe Reader can read documents in PDF format."
ST_DES_TAG02="Adobe Reader also allows you to search within PDF files,"
ST_DES_TAG03="search for PDF files on the internet and participate in collaborative document reviews."
ST_DES_TAG04="For details, please check www.adobe.com."
ST_THE_FILE="The file"
ST_FOR="for"
ST_YES="yes"
ST_NO="no"
ST_OR="or"
ST_SMALL_Y="y"
ST_SMALL_N="n"
ST_CAPS_Y="Y"
ST_CAPS_N="N"
ST_ACCEPT_CAPS="ACCEPT"
ST_DECLINE_CAPS="DECLINE"
ST_ACCEPT="accept"
ST_DECLINE="decline"
ST_VERSION="version"
ST_STATEMENT_ACCEPT_DECLINE="Please type \\\"accept\\\" to accept the terms and conditions of license agreement; Type \\\"decline\\\" to exit. "
ST_RESTATEMENT_ACCEPT_DECLINE="Invalid response, expected \\\"accept\\\" or \\\"decline\\\" ... try again ?"
ST_ER_INVALID_RESP1="ERROR: Invalid response, expected"
ST_ER_INVALID_RESP2="ERROR: Invalid response ... try again"
ST_ER_INVALID_RESP3="... try again ?"
ST_ER_NO_LIC_FILE="ERROR: Cannot find license file ... aborting"
ST_TO_ACCEPT="To accept the terms and conditions of this agreement enter"
ST_TO_DECLINE="To decline the terms and conditions of this agreement enter"
ST_REQ0101="Please type"
ST_REQ0102="to accept the terms and conditions of license agreement;"
ST_REQ0103="Type"
ST_REQ0104="to exit. "
ST_ER_LIC_NOT_ACCP="License agreement not accepted ... aborting installation"
ST_FREE_SPACE_INFO01="This installation requires"
ST_FREE_SPACE_INFO02="MB of free disk space."
ST_DONE_WORD="Done"
ST_ER_INSTALLING01="ERROR installing"
ST_ER_INSTALLING02="invalid product name"
ST_RES_INST_DIR="Enter installation directory for Adobe Reader"
ST_ER_SAME_FILE_NAME_AS_DIR="exists but is not a directory. Please specify a different location."
ST_DIR_INFO01="Directory"
ST_DIR_INFO02="does not exist."
ST_QUES_CREAT_DIR="Do you want to create it now? [y] "
ST_ER_EXIT="Exiting installation..."
ST_ER_DIR="ERROR: Cannot make directory"
ST_ER_WRITE="ERROR: Cannot write to directory"
ST_ER_NO_LIBCURL01="Not able to locate libcurl.so. Some of the functionality of Adobe Reader may be hampered."
ST_ER_NO_LIBCURL02="It is recommended to install curl ver."
ST_ER_NO_LIBCURL03="or any version later than ver."
ST_WARN_NO_LIBSSL01="WARNING: The libssl.so version on your machine is not compatible to libssl.so.0.9.6."
ST_WARN_NO_LIBSSL02="Please install libssl.so.0.9.6."
ST_WARN_LD_LIB01="exists in the directory"
ST_WARN_LD_LIB02="but this directory is not included in LD_LIBRARY_PATH."
ST_WARN_LD_LIB03="Please include the directory"
ST_WARN_LD_LIB04="in LD_LIBRARY_PATH"
ST_WARN_LD_LIB05="exists in the directory"
ST_ER_NO_CONFIG="ERROR: No configurations found ... aborting"
ST_WARN_NO_CONFIG="WARNING: The chosen configuration will not run on your current platform"
ST_QUE_CONT="Continue installation?"
ST_INFO_DEF_CONFIG1="Install default configuration"
ST_INFO_DEF_CONFIG2="The following configurations are available for installation:"
ST_QUE_CONFIG="Enter the configuration number to install: "
ST_EXIT_INFO="Exit Acrobat installation"
ST_PLAT_INDEP_FILES="Installing platform independent files ... "
ST_PLAT_DEP_FILES="Installing platform dependent files ... "
ST_RPM_CAN_NOT_DEL="could not be deleted as it has some extra file or files that were not installed by rpm"
ST_WEL_ALK="Welcome to the Asian Language Kit installation."
ST_INFO_ALK01="This installation will not work if you do not have the"
ST_INFO_ALK02="Unix Adobe Reader version 7.0 installed prior to this installation."
ST_INFO_ALK03="If you do not have Adobe Reader version 7.0 already installed on your"
ST_INFO_ALK04="system please do so before installing this Asian Language Kit."
ST_ER_ALK01="ERROR: directory must be an absolute path"
ST_ER_ALK02="ERROR: Directory "
ST_ER_ALK03="does not exist."
ST_ER_ALK04="ERROR: AcroVersion file does not exist."
ST_ER_ALK05="ERROR: Incorrect Acrobat version:"
ST_ER_ALK06="ERROR: Could not find distribution ... aborting"
ST_IF_ALK07="Enter the location where you installed the Adobe Reader"
ST_INFO_ALK_CMPLT="Installation completed."
ST_WEL_HLK="Welcome to the Extended Language Pack installation."
ST_INFO_HLK04="system please do so before installing this Extended Language Pack."
ST_INFO_HLK05="Installing Extended Language Pack Files ... "
ST_WEL_CLK="Welcome to the Central European Font Pack installation."
ST_INFO_CLK04="system please do so before installing this Central European Font Pack."
ST_INFO_CLK05="Installing Central European Language Pack Files ... "
ST_ER_AR01="ERROR: Cannot determine current directory."
ST_ER_AR02="ERROR: Cannot find installation directory."
ST_ER_AR03="ERROR: Cannot find"
ST_INFO_AR01="The OS named "
ST_INFO_AR02="is currently not installed."
ST_INFO_AR03="Try running on an installed platform and connecting to your display."
ST_INFO_AR04="Installed platform(s) include the following:"
ST_INFO_AR05="not installed for this configuration,"
ST_IBP_MISC_03="Mozilla"
ST_IBP_MISC_04="Firefox"
ST_IBP_MISC_05="Netscape"
ST_IBP_MISC_06="Quit"
ST_IBP_INFO_01="This will install the browser plugin for acroread."
ST_IBP_INFO_02="Perform global installation"
ST_IBP_INFO_03="Perform user-specific installation"
ST_IBP_INFO_04="Enter your choice"
ST_IBP_INFO_05="Do you want to install another browser ?"
ST_IBP_INFO_06="Enter the install directory for Adobe Reader 7.0"
ST_IBP_INFO_07="Enter the browser install directory"
ST_IBP_INFO_08="The plugin seems to be already installed. Are you sure you want to overwrite ?"
ST_IBP_INFO_09="Installation cancelled."
ST_IBP_INFO_10="Installation successful."
ST_IBP_INFO_11="This will enable the plugin for Mozilla, Firefox and Netscape."
ST_IBP_INFO_12="If you are facing any problem in getting the installation to work for your browser, please copy the following file to the plugin folder of the browser:"
ST_IBP_INFO_13="Acroread path specified"
ST_IBP_INFO_14="Press <Enter> to continue"
ST_IBP_INFO_15="In case of difficulties please refer to the documentation provided along with the browser for addition of new plugins."
ST_IBP_INFO_16="Installing plugin in"
ST_IBP_INFO_17="Do you want to perform automatic installation ?"
ST_IBP_INFO_18="Finished with automatic install."
ST_IBP_INFO_19="Do you want to perform manual installation ?"
ST_IBP_INFO_20="Do you want to install the browser plugin ?"
ST_IBP_INFO_21="Browser plugin installation skipped."
ST_IBP_INFO_22_1="Run"
ST_IBP_INFO_22_2="to install browser plugin."
ST_IBP_INFO_23="has been added."
ST_IBP_INFO_24="Trying to install plugin for browser"
ST_IBP_INFO_25="Installation failed"
ST_IBP_ERR_01="Could not find the browser plugin file"
ST_IBP_ERR_02="Could not find the browser plugins folder"
ST_IBP_ERR_03="Could not find the browser folder"
ST_IBP_ERR_04="Could not remove previous version of the plugin in"
ST_IBP_ERR_05_1="Could not copy the plugin file"
ST_IBP_ERR_05_2="to"
ST_IBP_ERR_06="Could not create the directory"
ST_IBP_ERR_07="Could not find browser plugin install script."
ST_IBP_ERR_08="already exists as a special file and cannot overwrite it."
ST_IBP_ERR_09="Unable to query HOME variable from the environment. Cannot find your home directory."
ST_IBP_ERR_10="Could not find the installation folder"
ST_IBP_ERR_11="INTERNAL ERROR ..... No matching OS name."
ST_SEP_INFO_01="Enter the install directory for Adobe Reader 7.0"
ST_SEP_INFO_02="INTERNAL ERROR ..... No matching OS name."
ST_SEP_INFO_03="Unable to find appropriate files in the installation path."
ST_SEP_INFO_04="Resetting old contexts"
ST_SEP_INFO_05="Setting new contexts for library files"
ST_SEP_INFO_06="This will try to update the library files to make them SELinux aware."
ST_SEP_INFO_07="Could not find the installation folder."
ST_SEP_INFO_08="Finished setting the contexts. You can check the log at"
ST_SEP_INFO_09="Failure in command"
ST_SEP_INFO_10="Patch might not have completed properly. You can check the log at"
ST_IOP_ERR1="OpenOffice PDF Plugin could not be registered. Please read the instructions in "
ST_IOP_ERR2="for manual installation."
ST_IOP_ERR3="OpenOffice >= 1.9 is required for OpenOffice PDF Plugin to run properly. Skipping registration of PDF Plugin."
ST_IOP_ERR4="OpenOffice binary soffice could not located in the specified directory."
ST_IOP_INFO_01="Please specify the directory where OpenOffice is installed: "
ST_IOP_INFO_02="Do you want to install the OpenOffice Plugin ?"
ST_IAP_ERR1="Adobe PDF Plugin could not be registered. Please follow the instructions in "
ST_IAP_INFO_01="Do you want to install the Adobe PDF plugin ?"
ST_IFE_INFO_01="Do you want to install the firefox extension ?"
ST_IFE_INFO_02="Please specify the path for Firefox executable : "
ST_IFE_ERR_01="Firefox exe not found or does not have executable permissions."
ST_IDI_INFO_01="Do you want to install the Distiller ?"
ST_MIME_INFO_01="Please login again for changes to MIME types and icons to take effect."
true
}

setLangENU

MkTemp()
{
if [ -z "$mkTempCount" ]; then
mkTempCount="0"
fi

TmpFile="/tmp/acrobat.$$.$mkTempCount"

while [ -f "$TmpFile" ]; do
mkTempCount=`expr $mkTempCount + 1`
TmpFile="/tmp/acrobat.$$.$mkTempCount"
done

touch "$TmpFile" && chmod 644 "$TmpFile" && echo "$TmpFile"
}

readlink()
{
OLDPWD="`/bin/pwd`"
lfile="$1"

while [ -h "$lfile" -a -f "$lfile" ]; do
CWD="`dirname "$lfile"`"
if [ "`expr "${CWD}" : "\.\."`" = "2" ]; then
CWD="`/bin/pwd`/$CWD"
fi
lfile="`basename "$lfile"`"
cd "$CWD"
lfile="`/bin/ls -l "$lfile"|sed 's/^.*-> *\(.*\) *$/\1/'`"
done

if [ -f "$lfile" ]; then
CWD="`dirname "$lfile"`"
lfile="`basename "$lfile"`"
if [ "`expr "${CWD}" : "\.\."`" = "2" ]; then
CWD="`/bin/pwd`/$CWD"
fi
cd "$CWD"
echo `/bin/pwd`/$lfile
cd "$OLDPWD"
return 0
fi

cd "$OLDPWD"
return 1
}


ver=7.0.9
cwd="`/bin/pwd 2> /dev/null`"

if [ -h "$0" ]; then
ScriptVariable=`readlink $0`
ScriptDirectory=`dirname "$ScriptVariable"`
else
ScriptDirectory=`dirname "$0"`
cd "$ScriptDirectory"
ScriptDirectory="`/bin/pwd 2> /dev/null`"
cd "$cwd"
fi
install_dir=`dirname "$ScriptDirectory"`/Reader


#
# Prepend a colon separated environment variable
# $1 string to be prepended
# $2 environment variable
#
prepend()
{
if [ -z "$2" -o "$2" = "$1" ] ; then
echo "$1"
else
first="`expr "$2" : '\([^:]*\):'`"
if [ "$first" = "$1" ] ; then
echo "$2"
else
echo "${1}:${2}"
fi
fi
}


#
# Tests the version file in an installation directory.
#
test_install_dir()
{
if [ "`cat "$1"/AcroVersion 2>/dev/null`" = "$ver" ] ; then
return 0
else
return 1
fi
}


#
# Check a given file in given path
#
check_file_in_named_path()
{
if [ -x "$2/$1" ] ; then
return 1
fi

return 0
}


#
# Check a given file in $PATH
#

check_file_in_path()
{
OLD_IFS=$IFS
IFS=":"

if [ -n "$PATH" ] ; then
for i in $PATH; do
if [ -d "$i" ] ; then
check_file_in_named_path "$1" "$i"
if [ $? -eq 1 ]; then
IFS=$OLD_IFS
return 1
fi
fi
done
fi

IFS=$OLD_IFS
return 0
}

IsUserAffirmative()
{
read userResp
if [ "$userResp" ] ; then
case "$userResp" in
y|Y|[yY][eE][sS]) return 0 ;;
esac
fi
return 1
}

InstallCertificate()
{
#$1 is install_dir
#$2 is URL
#$3 is port
RETVAL=0
INSTALL_DIR=$1
LOGFILE=`MkTemp /tmp/ssl_logXXXXXX`
CERTNAME=`MkTemp /tmp/certi.cerXXXXXX`
CERTDATA=`MkTemp /tmp/certDataXXXXXX`

CertificateInstallDirectory="$HOME/.adobe/Acrobat/`echo $ver | cut -c1-3`/Cert"

check_file_in_path openssl
if [ $? -ne 1 ]
then
echo "Unable to find openssl, please make sure the openssl binary is in the PATH"
exit 1
fi

echo "Fetching certificate from website...."
echo "QUIT" | openssl s_client -connect $2:$3 >$LOGFILE

echo "Processing ...."


beginCert=`cat $LOGFILE |grep -n "BEGIN CERTIFICATE---" |cut -f1 -d":"`
endCert=`cat $LOGFILE |grep -n "END CERTIFICATE---" |cut -f1 -d":"`

head -$endCert $LOGFILE | tail -`expr $endCert - $beginCert + 1` >$CERTNAME

openssl x509 -inform PEM -in $CERTNAME -text -out $CERTDATA
HASH=`openssl x509 -hash -noout -in $CERTNAME`

echo "The website presented the following Certificate"
echo
echo

more $CERTDATA

echo "Do you want to accept and install it (y/n)?"

if IsUserAffirmative
then
if [ ! -d "$CertificateInstallDirectory" ]
then
mkdir -p "$CertificateInstallDirectory"
if [ $? -ne 0 ]
then
echo $$ST_ER_DIR
exit 1
fi
fi

cp $CERTNAME "$CertificateInstallDirectory"/${HASH}.0
if [ $? = "0" ]
then
echo "Certificate successfuly installed."
else
echo "There was a problem installing the certificate"
RETVAL=1
fi
else
echo "Not installing the certtificate."
RETVAL=2
fi


rm -f $CERTNAME
rm -f $CERTDATA
rm -f $LOGFILE
return $RETVAL
}

# Function : get_gtk_file_ver($1)
# $1 : name of the gtk-lib file
# Return value : 0 if version >= 2.4 else 1
# Side Effects : echo the gtk-version
# Aim : To find the version of gtk-lib file and echo it

get_gtk_file_ver()
{
if [ -f "$1" ]; then
if [ -h "$1" ]; then
ifile=`readlink $1`
if [ $? -eq 1 ]; then
return 1
fi
fi

mfile=`basename $ifile`
echo $mfile | grep -q "libgtk-x11-\([0-9]*\).0.so.0.\([0-9]*\).\([0-9]*\)" 2>/dev/null

if [ $? -ne 0 ]; then
return 1
fi

echo $mfile| sed 's/libgtk-x11-\([0-9]*\).0.so.0.\([0-9]*\)00.\([0-9]*\)\|\(.*\)/\1\2\3/g'
return 0
fi

return 1
}


# Function : check_gtk_ver_and_set_lib_path($1)
# $1 : minimum base version of the gtk required.
# Return Value : 0 if LD_LIBRARY_PATH is set properly else 1
# Side Effects : LD_LIBRARY_PATH is modified
# Aim : To find out the correct gtk libraries and LD_LIBRARY_PATH to include the directory at the start which contain gtk-libs >= 2.4

check_gtk_ver_and_set_lib_path()
{
if [ -z "$LD_LIBRARY_PATH" ]; then
LD_LIBRARY_PATH=/lib:/usr/lib
else
LD_LIBRARY_PATH="$LD_LIBRARY_PATH":/lib:/usr/lib
fi

OLD_IFS="$IFS"
IFS=':'

for idir in $LD_LIBRARY_PATH
do
if [ -z "$idir" ]; then
continue
fi

ifile="$idir"/libgtk-x11-2.0.so

base_version="$1"
version=`get_gtk_file_ver "$ifile"`

if [ $? -ne 0 ]; then
continue
fi

len_version=`expr length $version`
base_version=`expr substr "${base_version}0000000000" 1 $len_version`
len_base_version=`expr length $base_version`

while [ $len_version -gt $len_base_version ]; do
base_version=`expr substr "${base_version}0000000000" 1 $len_version`
len_base_version=`expr length $base_version`
done

if [ $version -ge $base_version ]; then
export LD_LIBRARY_PATH="$idir":"$LD_LIBRARY_PATH"
IFS="$OLD_IFS"
OLD_IFS=""
return 0
fi
done

IFS="$OLD_IFS"
OLD_IFS=""

# This checks for libs in cache /etc/ld.so.cache
for ifile in `/sbin/ldconfig -p|grep "libgtk-x11-2.0.so$"|sed 's/.*[ \t]*=>[ \t]*\(.*\)/\1/g' 2>/dev/null`; do
version=`get_gtk_file_ver "$ifile"`

while [ ${#version} -gt ${#base_version} ]; do
base_version="${base_version}0"
done

if [ $version -ge $base_version ]; then
export LD_LIBRARY_PATH="`dirname "$ifile"`":"$LD_LIBRARY_PATH"
return 0
fi
done

return 1
}


#
# Get the current working directory.
# Try to avoid automounter directories by checking
# if $HOME or $PWD is the same directory as pwd,
# and removing the automount directory component.
#
if [ -z "$cwd" -o ! -d "$cwd" ] ; then
echo "$ST_ER_AR01"
exit 1
fi

if [ "$HOME" -a -d "$HOME" ] && [ "`cd / ; cd "$HOME" ; /bin/pwd`" = "$cwd" ] ; then
cwd="$HOME"
elif [ "$PWD" -a -d "$PWD" ] && [ "`cd / ; cd "$PWD" ; /bin/pwd`" = "$cwd" ] ; then
cwd="$PWD"
fi


PWD="$cwd"
export PWD


#
# Setup ACRO_ARG0 to this script
#
arg0="$0"
if [ "$arg0" ] ; then
case "$arg0" in
/*) ;;
./*) arg0="$cwd/`expr "$arg0" : '\./\(.*\)'`" ;;
*) arg0="$cwd/$arg0" ;;
esac

ACRO_ARG0="$arg0"
export ACRO_ARG0
fi


#
# Try to find the installation directory
#
if ( test_install_dir "$install_dir" ) ; then
ACRO_INSTALL_DIR="$install_dir"
export ACRO_INSTALL_DIR

else
script="$arg0"
while [ "$script" ] ; do
install_dir="`dirname "$script"`"
if ( test_install_dir "$install_dir/Reader" ) ; then
ACRO_INSTALL_DIR="$install_dir/Reader"
export ACRO_INSTALL_DIR
break
fi

install_dir="`dirname "$install_dir"`"
if ( test_install_dir "$install_dir/Reader" ) ; then
ACRO_INSTALL_DIR="$install_dir/Reader"
export ACRO_INSTALL_DIR
break
fi

if [ -h "$script" ] ; then
new_script=`readlink "$script"`
if [ "$new_script" -a "`expr "$new_script" : '/.*'`" = 0 ] ; then
new_script="`dirname "$script"`/$new_script"
fi
script="$new_script"
else
break
fi
done

if ( test_install_dir "$ACRO_INSTALL_DIR" ) ; then
:
elif ( test_install_dir "$ACRO_HOME" ) ; then
ACRO_INSTALL_DIR="$ACRO_HOME"
export ACRO_INSTALL_DIR
else
echo "$ST_ER_AR02"
exit 1
fi
fi


#
# setup the configuration from uname
#
os_name=`uname -s`
os_release=`uname -r`

case "$os_name" in
SunOS)
case "$os_release" in
4.1.3*|4.1.4*|4.1C)
ACRO_CONFIG=sparcsun
export ACRO_CONFIG
;;
5.*)
machine_type=`uname -p`
case "$machine_type" in
sparc)
ACRO_CONFIG=sparcsolaris
export ACRO_CONFIG
;;
intel|i386)
ACRO_CONFIG=intelsolaris
export ACRO_CONFIG
;;
ppc)
ACRO_CONFIG=ppcsolaris
export ACRO_CONFIG
;;
esac
;;
esac
;;
Linux)
ACRO_CONFIG=intellinux
export ACRO_CONFIG
;;
AIX)
ACRO_CONFIG=rs6000aix
export ACRO_CONFIG
;;
HP-UX)
ACRO_CONFIG=hppahpux
export ACRO_CONFIG
esac

if [ -z "$ACRO_CONFIG" ] ; then
echo "$ST_INFO_AR01 $os_name $ST_VERSION $os_release $ST_INFO_AR02"
echo "$ST_INFO_AR03"
echo "$ST_INFO_AR04"

if [ -d "$ACRO_INSTALL_DIR"/sparcsolaris ] ; then
echo " SPARC/Solaris version 2.x"
fi
if [ -d "$ACRO_INSTALL_DIR"/intellinux ] ; then
echo " Intel/Linux"
fi
exit 1
fi

# Check the version of gtk and update the LD_LIBRARY_PATH if required.

if [ "`uname -s`" = "Linux" ]; then
MIN_GTK_VERSION="2040"
check_gtk_ver_and_set_lib_path "$MIN_GTK_VERSION" ### returns 0 if found gtk >= 2.4
fi

#
# Setup configuration specific environment variables
#
case "$ACRO_CONFIG" in
sparcsolaris)
LD_LIBRARY_PATH="`prepend "$ACRO_INSTALL_DIR/$ACRO_CONFIG/lib:$ACRO_INSTALL_DIR/$ACRO_CONFIG/sidecars" "$LD_LIBRARY_PATH"`"
export LD_LIBRARY_PATH
;;
intellinux)
LD_LIBRARY_PATH="`prepend "$ACRO_INSTALL_DIR/$ACRO_CONFIG/lib:$ACRO_INSTALL_DIR/$ACRO_CONFIG/sidecars" "$LD_LIBRARY_PATH"`"
export LD_LIBRARY_PATH
;;
rs6000aix)
LIBPATH="`prepend "$ACRO_INSTALL_DIR/$ACRO_CONFIG/lib:$ACRO_INSTALL_DIR/$ACRO_CONFIG/sidecars:/opt/freeware/lib:" "$LIBPATH"`"
export LIBPATH
;;
hppahpux)
SHLIB_PATH="`prepend "$ACRO_INSTALL_DIR/$ACRO_CONFIG/lib:$ACRO_INSTALL_DIR/$ACRO_CONFIG/sidecars:/opt/graphics/OpenGL/lib" "$SHLIB_PATH"`"
LD_PRELOAD=/opt/graphics/OpenGL/lib/libGL.sl
export SHLIB_PATH
export LD_PRELOAD
;;
esac

DefaultPSRESPATH="$HOME/psres:$HOME/fonts:/usr/psres"
if [ -z "$PSRESOURCEPATH" ] ; then
PSRESOURCEPATH="$DefaultPSRESPATH"
else
PSRESOURCEPATH="$PSRESOURCEPATH":"$DefaultPSRESPATH"
fi
case "$PSRESOURCEPATH" in
::*|*::*|*::)
;;
*)
PSRESOURCEPATH="$PSRESOURCEPATH"::
;;
esac
export PSRESOURCEPATH

directory="`basename \"$ACRO_INSTALL_DIR\"`"

if [ "$directory" = "Reader" ]; then
cmd="acroread"
prod="Adobe Reader"
else
if [ "$directory" = "Acrobat" ]; then
cmd="acroexch"
prod="Adobe Acrobat"
fi
fi

#
# Set the command. Process any debug flags and exec.
#
ACRO_EXEC_CMD="$ACRO_INSTALL_DIR/$ACRO_CONFIG/bin/$cmd"
export ACRO_EXEC_CMD

ACRO_RES_DIR=$ACRO_INSTALL_DIR/../Resource
export ACRO_RES_DIR

ACRO_LANG=$ST_LANG
export ACRO_LANG

# Adobe Reader/Acrobat uses gconftool-2 to check whether accessibility support is enabled. Please refer to the Readme file to work around this.
check_file_in_path gconftool-2
if [ $? -eq 0 ]
then
# gconftool-2 is not there on system, turn off AT support
ACRO_AT_ACTIVE="false"
export ACRO_AT_ACTIVE
else
ACRO_AT_ACTIVE=`gconftool-2 -g /desktop/gnome/interface/accessibility 2>/dev/null`
export ACRO_AT_ACTIVE
fi

if [ "$ACRO_AT_ACTIVE" = "true" ]; then
GTK_MODULES=gail:atk-bridge
export GTK_MODULES
fi

if [ "$1" = "-installCertificate" ]
then
InstallCertificate $ACRO_INSTALL_DIR $2 $3
exit $?
fi

if [ "$1" = "-DEBUG" ] ; then
ACRODEBUG=1
ACRO_CRASHLOG=1
export ACRODEBUG ACRO_CRASHLOG

if [ "`ulimit -c 2>/dev/null`" = "0" ]
then
ulimit -c 1000000 >/dev/null 2>&1
fi

if [ $# = 1 ] ; then
export ACRO_EXEC_CMD
exec "$SHELL"
else
shift
exec ${1+"$@"} "$ACRO_EXEC_CMD"
fi
fi

if [ -f "$ACRO_EXEC_CMD" ] ; then
exec "$ACRO_EXEC_CMD" ${1+"$@"}
else
echo "$ST_ER_AR03 $ACRO_EXEC_CMD"
echo " $prod $ST_INFO_AR05 \"$ACRO_CONFIG\"."
exit 1
fi
[/code]

maweos
Posts: 21
Joined: 2007/05/22 11:47:12

Re: Adobe Acrobat Reader Crashes

Post by maweos » 2007/06/02 19:08:47

Hello,

i further tracked down the problem to this environment variable:

GTK_IM_MODULE=scim

If it is present, acroread crashes. If it is not there, acroread works.
Any explanation?

Best Regards

Matthias

jay_va
Posts: 8
Joined: 2006/11/01 00:00:50
Location: Richmond, VA

Re: Adobe Acrobat Reader Crashes

Post by jay_va » 2007/06/06 01:46:29

Hi,
Took me some time to figure this out to: After you install the reader open the file "/usr/local/Adobe/Acrobat7.0/bin/acroread". Find the function "get_gtk_file_ver()", you need to change the function to:
get_gtk_file_ver()
{
if [ -f "$1" ]; then
if [ -h "$1" ]; then
ifile=`readlink $1`
if [ $? -eq 1 ]; then
return 1
fi
fi

mfile=`basename $ifile`
echo $mfile | grep -q "libgtk-x11-\([0-9]*\).0.so.0.\([0-9]*\).\([0-9]*\)" 2>/dev/null

if [ $? -ne 0 ]; then
return 1
fi

echo $mfile| sed 's/libgtk-x11-\([0-9]*\).0.so.0.\([0-9]\)000.\([0-9]*\)\|\(.*\)/\1\2\3/g'
return 0
fi

return 1
}

The issue is the version of gtk that is installed; the library cannot be found because Adobe never planned for the sub-version to be above 900 but the library with CentOS 5 is 1000.
Jay

maweos
Posts: 21
Joined: 2007/05/22 11:47:12

Re: Adobe Acrobat Reader Crashes

Post by maweos » 2007/06/06 19:17:48

Hello Jay,

thanks for your reply, but the problem with the library version is already fixed with the patch mentioned earlier in the thread.

To me, it seems the real problem is scim. When googling for "GTK_IM_MODULE=scim", other applications also seem to have problems with this.
For me, the fix is just to add "export GTK_IM_MODULE=" to the beginning of the acroread-script.
However i am not sure, wether this is the most optimal solution. It works for me.
I dont know what this scim is for and if i want or need to have it anyway.

Best Regards

Matthias

Post Reply