#725 closed defect (fixed)
disable broken xforms XPM image loader
Reported by: | Owned by: | leeming | |
---|---|---|---|
Priority: | high | Milestone: | 1.3.0 |
Component: | frontend-xforms | Version: | 1.2.1 |
Severity: | major | Keywords: | crash XFORMSBUG VERIFIED |
Cc: | lasgouttes@…, mendenmh@…, jsw@…, larsu@… |
Description
When LyX tries to display images (eps files) under XDarwin in Mac OS 10.2, it
crashes with an EXEC_BAD_ACCESS.
The stack trace is below:
#0 0x90001600 in strlen ()
#1 0x900286e8 in sscanf ()
#2 0x001b4010 in XPM_load ()
#3 0x001a4e94 in flimage_read ()
#4 0x00113574 in grfx::xformsGImage::load(std::string const&,
boost::shared_ptr<SigC::Signal1<void, bool, SigC::Marshal<void> > >)
(this=0x4a69f40, filename=@0x0, on_finish={px = 0x4, pn = 0xfb}) at
xformsGImage.C:191
#5 0x001e3490 in grfx::GCacheItem::loadImage() (this=0x4a5b3e0) at
../../boost/boost/smart_ptr.hpp:216
#6 0x001e30d0 in grfx::GCacheItem::imageConverted(std::string const&)
(this=0x4a5b3e0, file_to_load=@0x4a501d8) at GraphicsCacheItem.C:342
#7 0x0029f0ec in SigC::ObjectSlot1_<void, std::string const&,
grfx::GCacheItem>::callback(void*, std::string const&) ()
#8 0x00242198 in SigC::Signal1<void, std::string const&, SigC::Marshal<void>
::emit(std::string const&) ()
#9 0x001e2094 in grfx::ConvProcess::converted(std::string const&, int, int)
(this=0x4a501d0, retval=0) at ../../boost/boost/smart_ptr.hpp:244
#10 0x0029e8a0 in SigC::ObjectSlot3_<void, std::string const&, int, int,
grfx::ConvProcess>::callback(void*, std::string const&, int, int) ()
#11 0x002a11c4 in SigC::Signal3<void, std::string const&, int, int,
SigC::Marshal<void> >::emit(std::string const&, int const&, int const&) ()
#12 0x001f0974 in Forkedcall::emitSignal() (this=0x80808080) at forkedcall.C:103
#13 0x001f0170 in ForkedcallsController::timer() (this=0x32ac60) at
forkedcontr.C:135
#14 0x002a0bc8 in SigC::ObjectSlot0_<void,
ForkedcallsController>::callback(void*) ()
#15 0x002416b0 in SigC::Signal0<void, SigC::Marshal<void> >::emit() ()
#16 0x00106e94 in Timeout::emit() (this=0x4a50050) at Timeout.C:60
#17 0x00112938 in C_intern_timeout_cb.0 (data=0x0) at Timeout_pimpl.C:31
#18 0x001a47cc in fl_handle_timeouts ()
#19 0x001831f4 in get_next_event ()
#20 0x00181a2c in do_interaction_step ()
#21 0x00182698 in fl_treat_interaction_events ()
#22 0x001826e0 in fl_check_forms ()
#23 0x0010706c in GUIRunTime::runTime() () at GUIRunTime.C:85
#24 0x0004f9f4 in LyXGUI::runTime() (this=0x4c1ff18) at lyx_gui.C:299
#25 0x000500ec in LyX::LyX(int*, char) (this=0xbffffbf0, argc=0xbffffc38,
argv=0xbffffcd4) at ../boost/boost/smart_ptr.hpp:102
#26 0x0004fa74 in LyX::LyX(int*, char) (this=0x4c1ff18, argc=0x0,
argv=0xfefefeff) at ../src/lyx_main.C:84
#27 0x000726a0 in main (argc=1, argv=0xbffffcd4) at ../src/main.C:38
#28 0x000028d8 in _start (argc=1, argv=0xbffffcd4, envp=0xbffffcdc) at
/SourceCache/Csu/Csu-45/crt.c:267
#29 0x00002758 in start () at
/usr/include/gcc/darwin/3.1/g++-v3/bits/stl_threads.h:121
To repeat, just insert an EPS file as a graphics and wait for it to show. Lyx
crashes while it tries to display it. It happens for all my EPS files, but just
in case, I included an EPS file.
Please note that it works fine on my Linux (Debian) machine.
Hope this information helps...
Attachments (3)
Change History (32)
by , 21 years ago
Attachment: | TestOmni.eps added |
---|
comment:1 by , 21 years ago
Cc: | added |
---|
comment:3 by , 21 years ago
what xforms version ?
This image file works for me with :
a) xforms itest eps
b) xforms itest xpm
c) lyx-cvs eps
d) lyx-cvs xpm
e) lyx-1.2cvs eps
f) lyx-1.2cvs xpm
Angus, any clue ?
comment:5 by , 21 years ago
OK, I've disabled the xpm image loader in lyx-1.2.1 by commenting out
flimage_enable_xpm();
in src/frontends/xforms/xformsGImage.C. No more crashes. Now I just get
Error converting to loadable format
when inserting a postscript or eps graphic.
I tried disabling the EPS to XPM and PS to XPM converters in the preferences, but this
didn't help. How do I get lyx to use another image format to display postscript images?
comment:6 by , 21 years ago
Hello, Jeff. Good to here that the crash is fixed. The rest is easy:
Check in the preferences dialog that you have a PPM format in tab
Conversion->Formats
Format ppm
GUI name PPM
Extension ppm
Then add a converter Conversion->Converters
From Postscript
To PPM
Converter convert $$i PPM:$$o
ditto for EPS.
Regards, Angus
comment:8 by , 21 years ago
If you think that I'm going anywhere near that horrible bag of tricks, you've
another think coming.
We still support xforms < 0.89 and XPM is the only possible loader there.
If xforms > 0.89
remove all converters to XPM
add converters XPM->PPM
add converters PostScript->PPM, where PostScript covers all flavours.
If you do that, then it makes sense to apply this patch, but you should
probably regenerate the splashscreen as a PPM file first.
Anything else? Probably. Your shout.
comment:9 by , 21 years ago
I have no idea what we should do, I just want things to work out of the
box ...
comment:10 by , 21 years ago
Angus: All is fine on OS X 10.2 now - disabling the xpm loader and enabling PS -> PPM
conversion did the trick.
I've updated the Mac OS X lyx package in fink (http://fink.sf.net) with that patch.
Thanks!
-Jeff
comment:11 by , 21 years ago
You should probably enable XPM->PPM conversion too... (but I'm glad it works;-)
comment:12 by , 21 years ago
Keywords: | crash added |
---|---|
Resolution: | → wontfix |
Severity: | normal → critical |
Status: | new → closed |
so, that's a wontfix then.
comment:13 by , 21 years ago
Cc: | added |
---|
comment:15 by , 21 years ago
Cc: | added |
---|---|
Keywords: | XFORMSBUG added |
Milestone: | → 1.3.0 |
Resolution: | wontfix |
Status: | closed → new |
Summary: | LyX gets EXEC_BAD_ACCESS when it tries to display images under Mac OS 10.2 → disable broken xforms XPM image loader |
JMarc, we should do this for 1.2 series too I think.
comment:16 by , 21 years ago
Cc: | added |
---|
comment:18 by , 21 years ago
Keywords: | fixedintrunk added |
---|---|
Milestone: | 1.3.0 |
Angus, I think I'm correct in marking this fixedintrunk now, since
you removed the xforms stuff recently ?
comment:19 by , 21 years ago
No, I've not done anything like that. I've removed our home grown image loader
which was used with xforms < 0.89.2 or so.
I've been debating about whether to remove native xpm support from the xforms
image loader. I've been trying to make suspect XPM files crash LyX and have
been failing to do so with xforms 1.0. I get warning messages, but no crashes
and the image displays fine.
So, keep this one open please.
comment:21 by , 21 years ago
Just tried xforms-1.0 final on OS X, and I still get this crash. Disabling the
xforms XPM image loader works.
comment:22 by , 21 years ago
Jeff, could you attach the generated xpm file please. It may be that my
convert program is creating something xforms likes and yours isn't. Much
easier to fox the problem if I have the file.
(Run "lyx -dbg graphics" to see how your eps file is turned into an xpm one.)
comment:23 by , 21 years ago
Jim, the good news is that I can load this xpm file into lyx without any
problem. (I'm using xforms 1.0final.) The bad news is that this doesn't help
you much.
Is the backtrace the same as the original one, dying somewhere in XPM_load
within the xforms library?
If so, would you consider compiling the xforms library with debug info enabled
and redoing the backtrace, so that we can get to exactly what is going wrong?
Regards,
Angus
comment:24 by , 21 years ago
Concerning the xpm loader, I think the warnings are very annoying too
(especially since we have no way to disable them).
I think we should get rid of native xpm format in 1.3.0 and just use ppm.
comment:25 by , 21 years ago
Milestone: | → 1.3.0 |
---|---|
Severity: | critical → major |
setting target milestonce and reducing severity.
Angus, you really should make the status of this case assigned since
so much has gone into it.
comment:26 by , 21 years ago
Status: | new → assigned |
---|
I've just submitted a patch that disables native loading of XPM images by the
xforms frontend.
comment:27 by , 21 years ago
... but the converters have not been updated!
Patch for converters submitted to the mailing list on 2003-01-12.
A Sample EPS file which causes LyX to crash