Mauricio Calvao <[email protected]> writes:

> Thanks for looking into this, Arash.

You're welcome.

> I ran exactly the test you described:
> [...]
> then opened the same 8-equation repro.tex from my original report and
> ran C-c C-p C-b.
>
> Result: I cannot reproduce the crash either, under these exact
> conditions. All 8 equations previewed successfully -- Ghostscript
> produced all 8 output images (pr1-1.png through pr1-8.png) with no
> /typecheck or any other error, and the Ghostscript process exited
> cleanly. I repeated this several times (fresh `emacs -Q` each time)
> and got the same clean result every time.
>
> Versions are unchanged from my original report: AUCTeX 14.1.2, Emacs
> 29.3, Ghostscript 10.02.1, Ubuntu 24.04.4.

Ok, good news.  And while we're at it: I have GS 10.07.1, can you update
your installation?

> I then also tried it in my actual day-to-day Emacs session instead of
> a fresh `emacs -Q` -- long-running, dark theme (gruvbox-dark-soft),
> AUCTeX/LSP/company etc. all already loaded -- to test the "warmed
> session" hypothesis below. Same result: no crash there either, with
> either 'compatible or the default t.

I tried a dark-theme like this (I don't have gruvbox):

  (progn
    (package-initialize t)
    (package-activate 'auctex)
    (setq preview-pdf-color-adjust-method t)
    (setq preview-auto-cache-preamble nil)
    (package-activate 'doom-themes)
    (load-theme 'doom-one t) )

What I see is again attached.  I think this (mostly) the expected
behavior.  One thing missing is the white line color in the fractions.
IIRC, this is a won't fix for various reasons.

> Separately, while testing in my real dark-theme session I got a
> concrete data point on the "Related observation" I mentioned in my
> original report (previews being illegible against a non-default
> theme). With `preview-pdf-color-adjust-method' set to t (the default,
> and the documented correct choice for gs > 9.27), the generated PNGs
> are still plain black text on a plain white background -- I checked
> the raw pixel data (identify/convert histogram: dominant color
> #FFFFFF, text #000000) and confirmed visually with a screenshot of the
> buffer. This is despite Emacs correctly reporting my theme's colors
> (foreground #ebdbb2, background #32302f via face-attribute on
> `default').

See above and the attachment.  Again, I don't get the behavior above, or
am I missing something?

> So on Ghostscript 10.02.1, the DELAYBIND-based `/initgraphics' patch
> in `preview-pdf-color-string' silently has no effect at all -- not
> "wrong colors", just no color transfer whatsoever, for either t or
> 'compatible. That lines up with the comment already in preview.el next
> to that code, flagging DELAYBIND as a Ghostscript feature that might
> get removed in future versions (associated with past security holes)
> -- 10.02.1 looks like it may be past that point.

I don't track GS development, but can you show a reference that
DELAYBIND is about to get phased out?  I see this[1]:

  10.03.1) Almost all the "internal" PostScript procedures defined during
  the interpreter startup are now "executeonly", further reducing the
  attack surface of the interpreter.

  The nature of these procedures means there should be no impact for
  legitimate usage, but it is possible it will impact uses which abuse the
  previous accessibility (even for legitimate reasons). Such cases may now
  require "DELAYBIND", See DELAYBIND

I read the above differently.

> This is really a separate defect from the /typecheck crash this report
> is about, so let me know if you'd rather I file it as its own bug
> report instead of carrying it in this thread.

I think this is your call: Should we close this report since you can't
reproduce the original issue?

> If it's useful, I can try to reproduce the crash again by (a)
> previewing the same buffer multiple times in one session rather than
> once from a fresh start, and/or (b) using the real ~30-page document
> instead of the minimal repro, and report back. Let me know which you'd
> find more useful, or if you'd like me to try something else specific.

I think the best approach is to come up with something which can be
reproduced by others as well, starting with 'emacs -Q'.  So yes, please
report back if can come up with a recipe for others as well.

Best, Arash

Footnotes:
[1]  https://ghostscript.readthedocs.io/en/gs10.07.1/News.html

_______________________________________________
bug-auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-auctex

Reply via email to