Bug 468090 - asymptote gets "Assertion `dpy->xcb->reply_data != 0' failed" and dumps core
asymptote gets "Assertion `dpy->xcb->reply_data != 0' failed" and dumps core
Product: Fedora
Classification: Fedora
Component: asymptote (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tom "spot" Callaway
Fedora Extras Quality Assurance
: Reopened
Depends On:
  Show dependency treegraph
Reported: 2008-10-22 14:17 EDT by Michal Jaegermann
Modified: 2008-11-25 13:24 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-10-30 08:56:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
monkey_saddle.asy code (687 bytes, text/plain)
2008-10-22 14:17 EDT, Michal Jaegermann
no flags Details
backtrace from a core generated by asymptote (4.26 KB, text/plain)
2008-10-22 14:18 EDT, Michal Jaegermann
no flags Details
backtrace from asymptote 1.46 (4.28 KB, text/plain)
2008-10-26 02:28 EDT, Michal Jaegermann
no flags Details

  None (edit)
Description Michal Jaegermann 2008-10-22 14:17:19 EDT
Created attachment 321186 [details]
monkey_saddle.asy code

Description of problem:

Running 'asy monkey_saddle.asy, or 'asy -V monkey_saddle.asy' on an attached sample of asymptote code results in:

asy: xcb_io.c:454: _XRead: Assertion `dpy->xcb->reply_data != 0' failed.
Aborted (core dumped)

BTW - the code in question was posted by Philippe Ivaldi on comp.text.tex as a sample.  The current upstream version of asymptote is already 1.46 so it is quite possible that the bug was already fixed there.

Version-Release number of selected component (if applicable):

How reproducible:
Comment 1 Michal Jaegermann 2008-10-22 14:18:24 EDT
Created attachment 321187 [details]
backtrace from a core generated by asymptote
Comment 2 Tom "spot" Callaway 2008-10-22 14:35:59 EDT
https://admin.fedoraproject.org/updates/asymptote-1.46-1.fc9 is waiting to be pushed to stable.

I can confirm that 1.46 (already in rawhide) resolves this, so I'm closing this as RAWHIDE.
Comment 3 Michal Jaegermann 2008-10-22 16:20:52 EDT
Indeed with 1.46 the attached example does not crash.  It does not seem to be doing anything useful either, at least on x86_64 and as opposed to other examples, but this appears to be a different story.
Comment 4 Michal Jaegermann 2008-10-26 02:28:47 EDT
Created attachment 321539 [details]
backtrace from asymptote 1.46

> I can confirm that 1.46 (already in rawhide) resolves this ...

Well, not entirely.  It does resolve when displaying on a local display. Doing that on a remove may bring the same failed assertion as orginally reported and
close to 70 megs of a core with a backtrace (after a debuginfo for asymptote,
mesa and freeglut was loaded).

The attached backtrace was produced by asymptote-1.46-1.fc9 with a display on a system running CentOS 4.7.  OTOH I would be not surprised if you would dismiss the bug as using for a display something running CentOS 5.2, Fedora 9 or
rawhide does work like expected.  Properties of libX11 on a display host?
Comment 5 Tom "spot" Callaway 2008-10-26 11:07:16 EDT
Given the age of RHEL 4.7, I'm not surprised at all, we're talking Fedora 6, pre modular X.

1.47 is out, and it generates slightly more useful output for the "monkey saddle", although still not perfect. I get the impression that upstream is actively working on resolving this one.

F-9: http://koji.fedoraproject.org/koji/taskinfo?taskID=904158
devel: http://koji.fedoraproject.org/koji/taskinfo?taskID=904164

Please feel free to give 1.47 a try and let me know if you see any regressions.
Comment 6 Michal Jaegermann 2008-10-26 13:06:45 EDT
> Given the age of RHEL 4.7, I'm not surprised at all,

Ahem, X is supposed to be network transparent and all that jazz. :-)

I will have a look at current developments.
Comment 7 Michal Jaegermann 2008-10-26 15:22:09 EDT
> Please feel free to give 1.47 a try

I tried a rawhide build of 1.47 (asymptote-1.47-1.fc10.x86_64). Running that with
'movie15' from texlive-texmf-latex-2007-26.fc10 gets this:

$ asy -V monkey_saddle.asy
/usr/share/asymptote/plain_shipout.asy: 70.3: runtime: <monkey_saddle_1-0.eps>

! Package movie15 Error: I couldn't determine MIME type of file:
(movie15)                `monkey_saddle_1-0.prc':
(movie15)                Unknown file name extension: `prc' .

See the movie15 package documentation for explanation.
Type  H <return>  for immediate help.

<*> ...01.125pt}{301.125pt}{monkey_saddle_1-0.prc}


That still produces an eps file but this is just a number of vertical and various coloured short bars on a black background.

When instead the current from CTAN version of 'movie15' is used then error
messages above disappear and one ends up with a pdf file - which looks
really the same as eps described above; hence no much of improvement.  If you are seeing something else then 'monkey_saddle_1.pdf' is 151313 bytes long so if desired I can attach it here.

An attempt to display using CentOS 4.7 system ends with the same assert
and a core dump like before.

None of these is a regression and so far I did not notice any other issues.
Comment 8 Michal Jaegermann 2008-10-27 13:58:07 EDT
The real culprit for errors quoted in a comment #7 is too old 'movie15'
from texlive-texmf-latex-2007-26.fc10.  If one is using the current one from CTAN instead then this does not show up.

Not that I see anything useful then anyway. :-)  After dropping all "settings" lines from the sample code, hence using an internal asymptote renderer, I am getting a pretty and movable picture after 'asymptote -V monkey_saddle.asy'.
Comment 9 Fedora Update System 2008-10-29 12:52:25 EDT
asymptote-1.47-1.fc9 has been submitted as an update for Fedora 9.
Comment 10 Fedora Update System 2008-10-30 08:56:15 EDT
asymptote-1.47-1.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 11 Tom "spot" Callaway 2008-11-25 11:21:50 EST
This test code is crashing later versions of asymptote, filed upstream:

[spot@velociraptor ~]$ asy -v monkey_saddle.asy 
Processing monkey_saddle
adjusting camera to (5.67738725229914,2.83869362614957,4.25804043922436)
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
[spot@velociraptor ~]$ asy --version
Asymptote version 1.52 [(C) 2004 Andy Hammerlindl, John C. Bowman, Tom Prince]

I'm pushing it to rawhide anyways...
Comment 12 John Bowman 2008-11-25 12:44:00 EST
This is not a bug; you simply don't have enough memory on your machine to
render an image at 300*72=21600 dpi! Remove the line settings.render=300 from the example. Philippe Ivaldi already corrected his posting to comp.text.tex some time ago.
Comment 13 Tom "spot" Callaway 2008-11-25 13:24:31 EST
Thanks for the correction John. I'm not used to hitting bugs like that with 2 GB of memory. :)

If possible, it would be nice for the program to say something like that, rather than crashing on std::bad_alloc.

Note You need to log in before you can comment on or make changes to this bug.