#1025049 asymptote: Error in shipout3

Package:
asymptote
Source:
asymptote
Description:
script-based vector graphics language inspired by MetaPost
Submitter:
Picca Frédéric-Emmanuel
Date:
2023-01-20 22:06:03 UTC
Severity:
normal
#1025049#5
Date:
2022-11-29 09:02:09 UTC
From:
To:
Dear Maintainer,

while working on the hkl package I found that asy doe snot compile anymore my files.

/usr/bin/asy -config "" -d -render=4 -f png -o 3S+1D.png 3S+1D.asy
    shipout3(prefix,f,preview ? nativeformat() : format,
            ^
/usr/share/asymptote/three.asy: 2896.13: runtime: /usr/bin/asy -config "" -d -render=4 -f png -o B_b3_y.png B_b3_y.asy
    shipout3(prefix,f,preview ? nativeformat() : format,
            ^
/usr/share/asymptote/three.asy: 2896.13: runtime: /usr/bin/asy -config "" -d -render=4 -f png -o B_a.png B_a.asy
    shipout3(prefix,f,preview ? nativeformat() : format,
            ^
/usr/share/asymptote/three.asy: 2896.13: runtime: /usr/bin/asy -config "" -d -render=4 -f png -o B_b.png B_b.asy
    shipout3(prefix,f,preview ? nativeformat() : format,
            ^
...

on bullseye, I do not have this issue.

So I attached a file in order to reproduce this error.

Cheers

Frédéric

#1025049#10
Date:
2022-11-29 22:46:40 UTC
From:
To:
Am 29.11.2022 um 10:02 teilte Picca Frédéric-Emmanuel mit:

Hi,

sorry I'm failing to reproduce the issue. For me that command line works:

hille@sid-amd64:~/devel/TeXLive$ asy -config "" -d -render=4 -f png -o
zzz1.png zzz1.asy
hille@sid-amd64:~/devel/TeXLive$ ls -l zzz1.*
-rw-r--r-- 1 hille hille   812 Nov 29 21:55 zzz1.asy
-rw-r--r-- 1 hille hille 16444 Nov 29 23:42 zzz1.eps
-rw-r--r-- 1 hille hille 16663 Nov 29 23:45 zzz1.png

H.

#1025049#15
Date:
2022-11-30 06:48:45 UTC
From:
To:
Le 2022-11-29 23:46, Hilmar Preuße a écrit :

Hello,

I imagine that the zzz1.asy file is my B_b3_y.asy, right ?

if so, something must be different between your environment and mine.

I use the latest unstable with gostscript 10

and you ?

Is it possible to have a more informative debug message than this one ?

thanks for your help.

Frederic

#1025049#20
Date:
2022-11-30 22:23:10 UTC
From:
To:
Am 30.11.2022 um 07:48 teilte picca mit:

Hello,
Yes, correct.
Some here. Pure Debian unstable, w/ gs 10 installed.

hille@sid-amd64:~$ dpkg -l ghost*
Desired=Unknown/Install/Remove/Purge/Hold
|
Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                Version       Architecture Description
+++-===================-=============-============-============================>
ii  ghostscript         10.0.0~dfsg-7 amd64        interpreter for the
PostScri>
ii  ghostscript-x:amd64 10.0.0~dfsg-7 amd64        interpreter for the
PostScri>

Does [1] help you somehow?

H.

[1]
https://tex.stackexchange.com/questions/592394/using-asymptote-for-3d-plots
--
sigfault

#1025049#25
Date:
2023-01-20 11:55:46 UTC
From:
To:
Dear Maintainer,

I can reproduce this bug with my sway environement. But If I use a computer withe Debian/sid and grome it works. I am wondering if this is not an issue between wayland and xorg...

#1025049#30
Date:
2023-01-20 12:06:08 UTC
From:
To:
Dear Maintainer,

Here the backtrace generated after the crash, it seems that there is an Arithmetic Exception.

the gl parameter at line 23 seems strange

#23 0x00005591db410072 in gl::glrender (prefix="", pic=0x2, format=<error: Cannot access memory at address 0x6b636f6c62555047>, width=5.3049894774131808e-315, height=0, angle=2.3978552443441112e-312, zoom=5.3982412455708344e-315, m=..., M=..., shift=..., margin=...,
    t=0x7ffc641f9990, background=0x5591db748b90, nlightsin=3, lights=0x7f31c6fb10e8, diffuse=0x7f31c6fb1070, specular=0x7f31c6fb1000, view=false, oldpid=0) at ./glrender.cc:2207

here the full stack

Core was generated by `/usr/bin/asy -config  -d -render=4 -f png -o 3S+1D.png 3S+1D.asy'.
Program terminated with signal SIGFPE, Arithmetic exception.
#0  0x00007f31c46d42b2 in fs_reg_alloc::set_spill_costs (this=this@entry=0x7ffc641f7f20) at ../src/intel/compiler/brw_fs_reg_allocate.cpp:1077
Download failed: Argument invalide.  Continuing without source file ./build/../src/intel/compiler/brw_fs_reg_allocate.cpp.
1077	../src/intel/compiler/brw_fs_reg_allocate.cpp: Aucun fichier ou dossier de ce type.
[Current thread is 1 (Thread 0x7f31ca49de40 (LWP 39687))]
(gdb) bt
#0  0x00007f31c46d42b2 in fs_reg_alloc::set_spill_costs (this=this@entry=0x7ffc641f7f20) at ../src/intel/compiler/brw_fs_reg_allocate.cpp:1077
#1  0x00007f31c46d6f14 in fs_reg_alloc::choose_spill_reg (this=0x7ffc641f7f20) at ../src/intel/compiler/brw_fs_reg_allocate.cpp:1088
#2  fs_reg_alloc::assign_regs (this=this@entry=0x7ffc641f7f20, allow_spilling=allow_spilling@entry=true, spill_all=spill_all@entry=false) at ../src/intel/compiler/brw_fs_reg_allocate.cpp:1331
#3  0x00007f31c46d725b in fs_visitor::assign_regs (this=this@entry=0x5591dc668370, allow_spilling=allow_spilling@entry=true, spill_all=spill_all@entry=false) at ../src/intel/compiler/brw_fs_reg_allocate.cpp:1381
#4  0x00007f31c469c890 in fs_visitor::allocate_registers (this=0x5591dc668370, allow_spilling=true) at ../src/intel/compiler/brw_fs.cpp:6493
#5  0x00007f31c46a1d13 in fs_visitor::run_cs (this=0x5591dc668370, allow_spilling=<optimized out>) at ../src/intel/compiler/brw_fs.cpp:6942
#6  0x00007f31c46a2057 in brw_compile_cs (compiler=compiler@entry=0x5591db7fa830, mem_ctx=mem_ctx@entry=0x5591dd0ffc30, params=params@entry=0x7ffc641f8270) at ../src/intel/compiler/brw_fs.cpp:7748
#7  0x00007f31c4820bb4 in crocus_compile_cs (ice=ice@entry=0x5591db767a30, ish=ish@entry=0x5591dbf17620, key=key@entry=0x7ffc641f83a0) at ../src/gallium/drivers/crocus/crocus_program.c:2573
#8  0x00007f31c4820f7b in crocus_create_compute_state (ctx=0x5591db767a30, state=<optimized out>) at ../src/gallium/drivers/crocus/crocus_program.c:2936
#9  0x00007f31c3982dea in st_create_nir_shader (st=st@entry=0x5591db83cc40, state=state@entry=0x7ffc641f85e0) at ../src/mesa/state_tracker/st_program.c:559
#10 0x00007f31c398319d in st_create_common_variant (st=st@entry=0x5591db83cc40, prog=prog@entry=0x5591dbf3e890, key=key@entry=0x7ffc641f8980) at ../src/mesa/state_tracker/st_program.c:754
#11 0x00007f31c3983a94 in st_get_common_variant (st=st@entry=0x5591db83cc40, prog=prog@entry=0x5591dbf3e890, key=key@entry=0x7ffc641f8980) at ../src/mesa/state_tracker/st_program.c:807
#12 0x00007f31c3984082 in st_precompile_shader_variant (prog=0x5591dbf3e890, st=0x5591db83cc40) at ../src/mesa/state_tracker/st_program.c:1273
#13 st_finalize_program (st=0x5591db83cc40, prog=0x5591dbf3e890) at ../src/mesa/state_tracker/st_program.c:1334
#14 0x00007f31c3b40399 in st_link_nir (ctx=0x7f31bc589010, shader_program=<optimized out>) at ../src/mesa/state_tracker/st_glsl_to_nir.cpp:940
#15 0x00007f31c3b3d4e5 in link_shader (prog=<optimized out>, ctx=0x7f31bc589010) at ../src/mesa/state_tracker/st_glsl_to_ir.cpp:97
#16 st_link_shader (ctx=0x7f31bc589010, prog=<optimized out>) at ../src/mesa/state_tracker/st_glsl_to_ir.cpp:112
#17 0x00007f31c3b2bb5c in _mesa_glsl_link_shader (ctx=ctx@entry=0x7f31bc589010, prog=prog@entry=0x5591dbf3e1a0) at ../src/mesa/program/link_program.cpp:91
#18 0x00007f31c3b032bb in link_program (no_error=<optimized out>, shProg=<optimized out>, ctx=<optimized out>) at ../src/mesa/main/shaderapi.c:1332
#19 link_program_error (ctx=0x7f31bc589010, shProg=0x5591dbf3e1a0) at ../src/mesa/main/shaderapi.c:1443
#20 0x00005591db4139e1 in compileAndLinkShader (shaders=std::vector of length 1622480, capacity 1958168 = {...}, defineflags=<error reading variable: Cannot access memory at address 0xa>, ssbo=false, interlock=144, compute=65) at ./shaders.cc:40
#21 0x00005591db40a698 in gl::initComputeShaders () at ./glrender.cc:575
#22 0x00005591db40c33f in gl::initShaders () at ./glrender.cc:640
#23 0x00005591db410072 in gl::glrender (prefix="", pic=0x2, format=<error: Cannot access memory at address 0x6b636f6c62555047>, width=5.3049894774131808e-315, height=0, angle=2.3978552443441112e-312, zoom=5.3982412455708344e-315, m=..., M=..., shift=..., margin=...,
    t=0x7ffc641f9990, background=0x5591db748b90, nlightsin=3, lights=0x7f31c6fb10e8, diffuse=0x7f31c6fb1070, specular=0x7f31c6fb1000, view=false, oldpid=0) at ./glrender.cc:2207
#24 0x00005591db160a6f in camp::picture::shipout3 (this=0x0, prefix=<error reading variable: Cannot access memory at address 0xa>, format=<error reading variable: Cannot access memory at address 0x3f800008>, width=5.3049894774131808e-315, height=0,
    angle=2.3978552443441112e-312, zoom=5.3982412455708344e-315, m=..., M=..., shift=..., margin=..., t=0x5591db74ebb0, background=0x5591db748b90, nlights=3, lights=0x7f31c6fb10e8, diffuse=0x7f31c6fb1070, specular=0x7f31c6fb1000, view=true) at ./picture.cc:1480
#25 0x00005591db2b9fd0 in run::gen_runpicture43 (Stack=0x5591db748b90) at ./runpicture.in:487
#26 0x00005591db390b6e in vm::stack::runWithOrWithoutClosure (this=0x7ffc641fa880, l=0x7f31c61fbdb0, vars=0x3f800000, parent=0x9) at ./stack.cc:465
#27 0x00005591db390d25 in vm::stack::runWithOrWithoutClosure (this=0x7ffc641fa880, l=0x7f31c61ec220, vars=0x3f800000, parent=0x9) at ./stack.cc:523
#28 0x00005591db390d25 in vm::stack::runWithOrWithoutClosure (this=0x7ffc641fa880, l=0x7f31c61bbe68, vars=0x3f800000, parent=0x9) at ./stack.cc:523
#29 0x00005591db390d25 in vm::stack::runWithOrWithoutClosure (this=0x7ffc641fa880, l=0x7f31c620faf0, vars=0x3f800000, parent=0x9) at ./stack.cc:523
#30 0x00005591db390d25 in vm::stack::runWithOrWithoutClosure (this=0x7ffc641fa880, l=0x7f31c62142f8, vars=0x3f800000, parent=0x9) at ./stack.cc:523
#31 0x00005591db390d25 in vm::stack::runWithOrWithoutClosure (this=0x7ffc641fa880, l=0x7f31c7aadc08, vars=0x3f800000, parent=0x9) at ./stack.cc:523
#32 0x00005591db390d25 in vm::stack::runWithOrWithoutClosure (this=0x7ffc641fa880, l=0x7f31c772e5d0, vars=0x3f800000, parent=0x9) at ./stack.cc:523
#33 0x00005591db390d25 in vm::stack::runWithOrWithoutClosure (this=0x7ffc641fa880, l=0x7f31c78c2370, vars=0x3f800000, parent=0x9) at ./stack.cc:523
#34 0x00005591db390d25 in vm::stack::runWithOrWithoutClosure (this=0x7ffc641fa880, l=0x7f31c6250118, vars=0x3f800000, parent=0x9) at ./stack.cc:523
#35 0x00005591db3bc883 in icore::postRun (s=..., this=<optimized out>) at ./process.cc:199
#36 ifile::postRun (this=0x7ffc64203140, e=..., s=...) at ./process.cc:331
#37 0x00005591db3bdf51 in icore::doRun (this=0x7ffc64203140, purge=2, tm=TRANS_NORMAL) at ./process.cc:226
#38 0x00005591db3bd142 in ifile::process (this=0x7ffc64203140, purge=2) at ./process.cc:347
#39 0x00005591db3bdd37 in processFile (filename="", purge=2) at ./process.cc:846
#40 0x00005591db474bb3 in asymain (A=0x5591dfa54480) at ./main.cc:202
#41 0x00005591db13d205 in main (argc=10, argv=0x7ffc642033e0) at ./main.cc:288
(gdb)

#1025049#35
Date:
2023-01-20 22:03:05 UTC
From:
To:
Am 20.01.2023 um 13:06 teilte Picca Frédéric-Emmanuel mit:

Dear Frédéric,

as I'm not able to reproduce the issue (due to different software
constellation on the Desktop): would you be so kind to forward that
issue to upstream by your own? The upstream tracker is on
https://github.com/vectorgraphics/asymptote/issues

I case of questions regarding the Debian package feel free to contact us.

Many thanks,
   Hilmar