VitorRetamal / papercrop

Automatically exported from code.google.com/p/papercrop
GNU General Public License v2.0
0 stars 0 forks source link

"Ilegal Instruction" Error on Ubuntu System #10

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. download the ubuntu_install script
2. Compile and execute the program find a PDF and process with the default 
settings
3. Click "process with this page"

What is the expected output? What do you see instead?
No error and a new PDF would be generated.
However, now:
user@user-laptop:~/Downloads/papercrop$ ./paperCropLauncher 
Xdbe not supported, faking double buffer with pixmaps.
pFileName=presets/default preset.lua
pFileName=script/(landscape) vertical scroll (outputs multiple images).lua
./paperCropLauncher: line 2:  8568 Illegal instruction     ./paperCrop

And exit.

What version of the product are you using? On what operating system?
SVN version

Please provide any additional information below.

Original issue reported on code.google.com by lizhenqi...@gmail.com on 29 Jan 2011 at 4:13

GoogleCodeExporter commented 8 years ago
Does this happen for all pdf files? If not, could you attach the pdf file you 
used? Did you try "process all pages" button too? Thanks,

Original comment by taesoob...@gmail.com on 29 Jan 2011 at 12:03

GoogleCodeExporter commented 8 years ago
Yes. Actually it happened for three PDF files I've tried. I also tried process 
all pages and it showed the same. I will attach the PDF files and the 
screenshots containing errors later today.

Thank you for the quick response.

Original comment by lizhenqi...@gmail.com on 29 Jan 2011 at 6:56

GoogleCodeExporter commented 8 years ago
It's unlikely but do you happen to know how to use debugger? It is usually 
difficult to debug errors if I cannot reproduce them. Also let me know if the 
install script worked for you out of the box. (I've never tested the script on 
other computers)
Thank you.

Original comment by taesoob...@gmail.com on 29 Jan 2011 at 9:26

GoogleCodeExporter commented 8 years ago
Yes. I know a little about GDB and I can debug a little bit for you. And your 
script has no problem to compile under Ubuntu 10.10. And also, I attached one 
PDF which even encounters errors when using the papercrop win version.

Original comment by lizhenqi...@gmail.com on 1 Feb 2011 at 3:52

Attachments:

GoogleCodeExporter commented 8 years ago
That's great. Thank you so much. I just want to know where it crashes. 
Could you please
0. run again install_ubuntu.sh to retrieve the latest version.
1. first create build_linux_debug folder in the paperCrop_source folder
2. cd paperCrop_source
3. sh build_debug.sh 
4. gdb ./paperCrop
run
make it crash..
and then could you let me know what the backtrace (bt) looks like, and what 
caused crash if possible?
I will test the pdf file here.
Thank you.

Original comment by taesoob...@gmail.com on 1 Feb 2011 at 5:13

GoogleCodeExporter commented 8 years ago
Hi, Here is the bt result of gdb
Starting program: 
/home/digitalpig/Downloads/papercrop/paperCrop_source/paperCrop 
[Thread debugging using libthread_db enabled]
Xdbe not supported, faking double buffer with pixmaps.
pFileName=presets/default preset.lua
pFileName=script/(landscape) vertical scroll (outputs multiple images).lua

Program received signal SIGILL, Illegal instruction.
0x003143bd in iluGammaCorrect () from /usr/lib/libILU.so.1
(gdb) bt
#0  0x003143bd in iluGammaCorrect () from /usr/lib/libILU.so.1
#1  0x0826bfe1 in Imp::gammaCorrect (out=..., factor=0.5)
    at /home/digitalpig/Downloads/papercrop/paperCrop_source/image/ImageProcessor.cpp:143
#2  0x081fee30 in luabind::detail::invoke_normal<void (*)(CImage&, double), 
boost::mpl::vector3<void, CImage&, double>, luabind::detail::null_type> (
    L=0x8542db0, self=..., ctx=..., f=@0x85a94a8)
    at /home/digitalpig/Downloads/papercrop/paperCrop_source/luabind-0.9/luabind/detail/call.hpp:292
#3  0x081ecfd7 in luabind::detail::invoke0<void (*)(CImage&, double), 
boost::mpl::vector3<void, CImage&, double>, luabind::detail::null_type, 
boost::is_void<void> > (L=0x8542db0, self=..., ctx=..., f=@0x85a94a8, 
policies=...)
    at /home/digitalpig/Downloads/papercrop/paperCrop_source/luabind-0.9/luabind/detail/call.hpp:89
#4  0x081eb1fe in luabind::detail::invoke<void (*)(CImage&, double), 
boost::mpl::vector3<void, CImage&, double>, luabind::detail::null_type> 
(L=0x8542db0, 
    self=..., ctx=..., f=@0x85a94a8, policies=...)
    at /home/digitalpig/Downloads/papercrop/paperCrop_source/luabind-0.9/luabind/detail/call.hpp:101
#5  0x081e9051 in luabind::detail::function_object_impl<void (*)(CImage&, 
double), boost::mpl::vector3<void, CImage&, double>, 
luabind::detail::null_type>::entry_point (L=0x8542db0)
    at /home/digitalpig/Downloads/papercrop/paperCrop_source/luabind-0.9/luabind
/make_function.hpp:63
#6  0x006282ea in ?? () from /usr/lib/liblua5.1.so.0
#7  0x0063345a in ?? () from /usr/lib/liblua5.1.so.0
#8  0x006287d0 in ?? () from /usr/lib/liblua5.1.so.0
#9  0x00623771 in ?? () from /usr/lib/liblua5.1.so.0
#10 0x00627df3 in ?? () from /usr/lib/liblua5.1.so.0
#11 0x00627e55 in ?? () from /usr/lib/liblua5.1.so.0
#12 0x00623598 in lua_pcall () from /usr/lib/liblua5.1.so.0
#13 0x08395cba in luabind::detail::pcall (L=0x8542db0, nargs=3, nresults=0)
    at /home/digitalpig/Downloads/papercrop/paperCrop_source/luabind-0.9/src/pcall.cpp:42
#14 0x081bd6c6 in luabind::detail::proxy_function_caller<int, 
boost::tuples::tuple<char const* const*, int const*, int const*, 
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, 
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, 
boost::tuples::null_type> >::~proxy_function_caller (this=0xbfffea5c, 
__in_chrg=<value optimized out>)
    at /home/digitalpig/Downloads/papercrop/paperCrop_source/luabind-0.9/luabind/detail/call_function.hpp:92
#15 0x081bc27e in RightPanel::onCallback (this=0x84894c8, w=..., 
    pWidget=0x848b318, userData=0)
    at /home/digitalpig/Downloads/papercrop/paperCrop_source/RightPanel.cpp:336
#16 0x08274c67 in FlLayout::cbFunc (pWidget=0x848b318, data=0x0)
    at /home/digitalpig/Downloads/papercrop/paperCrop_source/utility/FlLayout.cpp:768
#17 0x0016d007 in Fl_Widget::do_callback() () from /usr/lib/libfltk.so.1.1
#18 0x0016d71c in Fl_Button::handle(int) () from /usr/lib/libfltk.so.1.1
#19 0x00165e54 in ?? () from /usr/lib/libfltk.so.1.1
#20 0x00166ee5 in Fl::handle(int, Fl_Window*) () from /usr/lib/libfltk.so.1.1
#21 0x001b8372 in fl_handle(_XEvent const&) () from /usr/lib/libfltk.so.1.1
#22 0x001b96ae in ?? () from /usr/lib/libfltk.so.1.1
#23 0x001b994d in fl_wait(double) () from /usr/lib/libfltk.so.1.1
#24 0x00167b95 in Fl::wait(double) () from /usr/lib/libfltk.so.1.1
#25 0x00167c3c in Fl::check() () from /usr/lib/libfltk.so.1.1
#26 0x081b071c in main (argc=1, argv=0xbffff314)
    at /home/digitalpig/Downloads/papercrop/paperCrop_source/PaperCrop.cpp:82

Original comment by lizhenqi...@gmail.com on 3 Feb 2011 at 6:45

GoogleCodeExporter commented 8 years ago
Thank you very much for the trace but I cannot guess why it crashes there. 
I also tested the pdf file you uploaded, but it works fine on my ubuntu systems.
Windows version is currently outdated and thus it is much easier to crash 
windows version. So I didn't test there. (I am currently not a windows user, so 
updates are slower for windows system.)
I tested on 4 ubuntu machines ranging from 10.4 to 10.10 both x86 and amd64.
So I want to know more about your workflow. Did you modify config script? 
In what sequence do you press buttons? Does the papercrop launch full-screen or 
windowed? What pdf file did you use? the attached file? Thank you very much.

Original comment by taesoob...@gmail.com on 3 Feb 2011 at 5:18

GoogleCodeExporter commented 8 years ago

Original comment by taesoob...@gmail.com on 3 Feb 2011 at 5:20

GoogleCodeExporter commented 8 years ago
Hi~

I just simply download the ubuntu install script and execute it. I did not 
modify the config script. I just open the papercrop and click open files and 
then process all pages. It launched in windowed. I use the same PDF as attached 
and also 5 different PDFs in my local computer and all of them caused the crash 
error. I also took a look at the bt result. Do you think it might because of my 
lua shared lib?

Original comment by lizhenqi...@gmail.com on 3 Feb 2011 at 5:27

Attachments:

GoogleCodeExporter commented 8 years ago
I think this is more likely related to devIL shared lib but I cannot be sure. 
The attached pdf file works fine on my system.
Could you try modifying paperCrop_source/config.lua as followes?
First search for the postprocessImage function and replace with the following 
one
function postprocessImage(image)
    print("debug: ",image:GetWidth(), image:GetHeight())
end
and show me the console output.  Thank you.

Original comment by taesoob...@gmail.com on 3 Feb 2011 at 6:38

GoogleCodeExporter commented 8 years ago
Hi~ Here is the output result:

digitalpig@digitalpig-laptop:~/Downloads/papercrop/paperCrop_source$ 
./paperCrop 
Xdbe not supported, faking double buffer with pixmaps.
pFileName=presets/default preset.lua
pFileName=script/(landscape) vertical scroll (outputs multiple images).lua
debug:  800 1086
Warning! output to a jpg file instead of a pdf file. (Process current page?)
Warning! output to a jpg file instead of a pdf file. (Process current page?)

Original comment by lizhenqi...@gmail.com on 5 Feb 2011 at 3:45

GoogleCodeExporter commented 8 years ago
Hi, did it crash? It looks to me that it didn't. You clicked process current 
page button, right? What happens if process all page button is clicked? Are 
there any output pdf (journal.pone.0007195_1.pdf) or jpg files 
(journal.pone.0007195/*.jpg)?
Thanks,

Original comment by taesoob...@gmail.com on 5 Feb 2011 at 11:43

GoogleCodeExporter commented 8 years ago
Hi, You are right. It did not crash and generate the correct result the 
journal.pone.0007195-1.pdf. I've checked the folder journal.pone.0007195 But it 
is empty.

Original comment by lizhenqi...@gmail.com on 6 Feb 2011 at 3:14

GoogleCodeExporter commented 8 years ago
I see. That's normal if you clicked the processAllPage button. It seems to me 
that your system has some problem with the devIL library.
I guess you can recover the original postprocessImage function, with just the 
gamma correction line commented out. Then the result would be very usable. I 
won't  change the SVN repository because the gamma correction function seems to 
work well on my test machines, and I prefer darker text. 
Thank you.

Original comment by taesoob...@gmail.com on 7 Feb 2011 at 2:35

GoogleCodeExporter commented 8 years ago
Hi~ What is your Ubuntu version and devIL lib? Mine is Ubuntu 10.10 and
Package: libdevil1c2
Versions: 
1.7.8-6 MD5: 41a3c5132afd8b03f71520b31aed62ae
Package: libdevil-dev
Versions: 
1.7.8-6 MD5: c9fd4a7519ab820246d2102717804209

Both are provided by Ubuntu.

Original comment by lizhenqi...@gmail.com on 7 Feb 2011 at 3:21

GoogleCodeExporter commented 8 years ago
Hi, I use the same version of the OS and libraries both from Ubuntu. I don't 
know how to see MD5 checksum. 

Original comment by taesoob...@gmail.com on 7 Feb 2011 at 12:55

GoogleCodeExporter commented 8 years ago
Hi. I don't think it is the problem of devIL lib. I download the devIL source 
and compile the latest library by myself and it seems that the problem may be 
at the lua wrap interface for devIL on my system?

To see the MD5 checksum I just type apt-cache showpkg libdevillc2

Original comment by lizhenqi...@gmail.com on 7 Feb 2011 at 2:27

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
It could be, but I cannot be sure about anything. Those MD5 checksums are 
identical to mine. For another test, I just removed the devil dependency for 
the gamma correction. Could you revert config.lua and see if the latest version 
works for you?
(
cd paperCrop_sources
svn revert config.lua
svn update .
./bulid.sh
./paperCrop
)
Thank you.

Original comment by taesoob...@gmail.com on 7 Feb 2011 at 3:11

GoogleCodeExporter commented 8 years ago
Hi. I svn co the latest paperCrop and it works flawless now with the default 
config.lua file.

Original comment by lizhenqi...@gmail.com on 8 Feb 2011 at 3:26

GoogleCodeExporter commented 8 years ago
Good. I will keep it that way. There might some others who are affected by the 
same problem.

Original comment by taesoob...@gmail.com on 8 Feb 2011 at 5:04

GoogleCodeExporter commented 8 years ago

Original comment by taesoob...@gmail.com on 9 Feb 2011 at 2:00