XvMC broken in =media-video/mplayer-1.0_rc2_p20090731* (x86 here if this matters) =media-video/mplayer-1.0_rc2_p20090530 was the latest version with a working XvMC feature, and portage maintainers appear to have deleted every previous version except [m]1.0_rc2_p20090322 & 20090731 from the tree! For some reason, I have also masked =media-video/mplayer-1.0_rc2_p20090322, and for whatever reason, appears to have been fixed in 20090530, which is no longer in the tree. Reproducible: Always Expected Results: Should at least keep a previous version or two in the tree, unless the ebuild has been stable for awhile. Should never wipe previous version such as anything like this package with only "daily snapshots". Especially depending on a snapshot taken only days ago! Suggest getting back a few versions of mplayer into the tree. If you need me to post a prestine =media-video/mplayer-1.0_rc2_p20090530 ebuild from portage here, let me know.
The broken XvMC feature will probably be a popular one due to the dependency of being able to play HD video and will already be posted upstream, if not already fixed.
Same problem here. Post away. You're not the only one with this problem.
Created attachment 201095 [details] mplayer-1.0_rc2_p20090530.ebuild Found it!
Created attachment 201097 [details] mplayer-1.0_rc2_p20090530-fix-mp3lib-use-local-labels-2.patch You'll need this file too. Unless this version was a security problem, I agree, it was a blunder to delete such a recent stable version from the tree.
Works again after masking 0730 and downgrading to 0530. I'm also using x86: emerge --info Portage 2.1.6.13 (default/linux/x86/2008.0, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r3 i686) ================================================================= System uname: Linux-2.6.30-gentoo-r3-i686-mobile_AMD_Athlon-tm-_XP-M_3200+-with-glibc2.0 Timestamp of tree: Thu, 13 Aug 2009 01:45:02 +0000 ccache version 2.4 [enabled] app-shells/bash: 3.2_p39 dev-java/java-config: 1.3.7-r1, 2.1.8-r1 dev-lang/python: 2.4.4-r13, 2.5.4-r3 dev-python/pycrypto: 2.0.1-r6 dev-util/ccache: 2.4-r7 dev-util/cmake: 2.6.4 sys-apps/baselayout: 2.0.1 sys-apps/openrc: 0.4.3-r3 sys-apps/sandbox: 1.6-r2 sys-devel/autoconf: 2.13, 2.63-r1 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.27-r2 ACCEPT_KEYWORDS="x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://portage.home http://lug.mtu.edu/gentoo/ http://gentoo.netnitco.net " LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" LDFLAGS="-Wl,-O1" LINGUAS="en ru" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage/layman/sunrise /usr/local/portage" SYNC="rsync://server.home/gentoo-portage" USE="3dnow 3dnowext X a52 aac acl acpi adns alsa apache2 audiofile automount avi bcmath bdf berkdb bzip2 calendar caps cdda cddb cdparanoia cdr chardet cjk clamav cli cracklib crypt ctype cups curl curlwrappers dbus directfb dri dts dvb dvd dvdnav dvdread encode exif fbcon ffmpeg flac foomaticdb fortran ftp gd gdbm gif glib gmp gnutls gpm gstreamer gtk gtk2 gzip hal hash iconv ieee1394 imagemagick imap imlib innodb ipv6 isdnlog java javascript jpeg jpeg2k kde kson lcms ldap ldap-sasl libcaca live logrotate lzo mad matroska mcal mhash mime mjpeg mmx mmxext mng mp2 mp3 mp4 mpeg mplayer msession msn mudflap mysql mysqli ncurses network nls nptl nptlonly nsplugin nss nvidia offensive ogg openal opengl openmp osc oss pam pch pcntl pcre pdf pdo perl php png posix ppds pppd python qt3 qt3support qt4 quicktime readline reflection rtc samba sasl sdl seamonkey session simplexml snmp soap sockets spell spl sqlite sse ssl subversion suhosin svg sysfs syslog tcpd theora tidy tiff tokenizer transcode truetype unicode usb v4l v4l2 vcd vorbis wddx win32codecs wxwindows x264 x86 xforms xine xinetd xml xorg xpm xv xvid xvmc zip zlib" ALSA_CARDS="emu10k1" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en ru" SANE_BACKENDS="hp" USERLAND="GNU" VIDEO_CARDS="nvidia vesa" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
I've still got mplayer-1.0-rc2-p20090530.ebuild here on another box, as well as installed on two other hosts. So if you need any files, just ask me. I've got the originals. ;-) (Glad to see I'm not the only one holding-off going HD. 4x3 suits me just fine here, if I ever watch tv/video along with my dual P3's.)
The XvMC issue does not seem to be reported upstream (or I just missed it), which doesn't help getting this fixed also for future versions.
(In reply to comment #7) > The XvMC issue does not seem to be reported upstream (or I just missed it), > which doesn't help getting this fixed also for future versions. > Not to mention everyone here has so fair failed to provide details other than "it doesn't work."
Well, dig some ditches for me, cut my grass, make me some dinner, and I might have time to debug further. ;-) If I get some time later today, I'll see if I can't further debug. With such a popular feature and the forced DTV upgrade, I was assuming there would be more people tackling this upstream. My main goal was just to get a stub in stating Gentoo removed a stable version.
This is the error XvMC users will see. Now to recompile with debug support. VO: [xvmc] 1280x720 => 1280x720 MPEG1/2 Motion Compensation and IDCT vo_xvmc: Found matching surface with id=54434449 on 355 port at 0 adapter vo_xvmc: Using Xv Adaptor #0 (NV17 Video Texture) vo_xvmc: Port 355 grabed vo_xvmc: Allocated Direct Context vo_xvmc: data_blocks allocated vo_xvmc: mv_blocks allocated vo_xvmc: Motion Compensation context allocated - 8 surfaces vo_xvmc: idct=1 unsigned_intra=0 vo_xvmc: looking for OSD support Subpicture id 0x34344149 vo_xvmc: OSD support by additional frontend rendering [VD_FFMPEG] XVMC-accelerated MPEG-2. MPlayer interrupted by signal 11 in module: decode_video - MPlayer crashed by bad usage of CPU/FPU/RAM. Recompile MPlayer with --enable-debug and make a 'gdb' backtrace and disassembly. Details in DOCS/HTML/en/bugreports_what.html#bugreports_crash. - MPlayer crashed. This shouldn't happen. ...
Starting program: /usr/bin/mplayer -vo xvmc -vc ffmpeg12mc /stored/mythtv/video/1111_20090824182100.mpg [Thread debugging using libthread_db enabled] [New Thread 0xb6eea740 (LWP 21558)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb6eea740 (LWP 21558)] 0x085943f4 in clear_blocks_sse (blocks=0xb6c60008) at x86/dsputil_mmx.c:532 532 x86/dsputil_mmx.c: No such file or directory. in x86/dsputil_mmx.c Ok. I'm stumped. Why would it be looking for a *.c file? Or am I reading this wrong?
Created attachment 202221 [details] GDB output of mplayer-20090731-r1 using XvMC
Eh. Never mind my stupification at being stumped. Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb6f33740 (LWP 22366)] 0x085943f4 in clear_blocks_sse (blocks=0xb6ca9008) at x86/dsputil_mmx.c:532 532 {\ (gdb) list 530,535 530 531 static void clear_blocks_sse(DCTELEM *blocks) 532 {\ 533 __asm__ volatile( 534 "xorps %%xmm0, %%xmm0 \n" 535 "mov %1, %%"REG_a" \n" x86/dsputil_mmx.c (lines 531-552) static void clear_blocks_sse(DCTELEM *blocks) {\ __asm__ volatile( "xorps %%xmm0, %%xmm0 \n" "mov %1, %%"REG_a" \n" "1: \n" "movaps %%xmm0, (%0, %%"REG_a") \n" "movaps %%xmm0, 16(%0, %%"REG_a") \n" "movaps %%xmm0, 32(%0, %%"REG_a") \n" "movaps %%xmm0, 48(%0, %%"REG_a") \n" "movaps %%xmm0, 64(%0, %%"REG_a") \n" "movaps %%xmm0, 80(%0, %%"REG_a") \n" "movaps %%xmm0, 96(%0, %%"REG_a") \n" "movaps %%xmm0, 112(%0, %%"REG_a") \n" "add $128, %%"REG_a" \n" " js 1b \n" : : "r" (((uint8_t *)blocks)+128*6), "i" (-128*6) : "%"REG_a ); } (gdb) info registers eax 0xfffffd00 -768 ecx 0x8 8 edx 0xb6ca9308 -1228238072 ebx 0x0 0 esp 0xbfaa3c08 0xbfaa3c08 ebp 0xbfaa3c08 0xbfaa3c08 esi 0x1 1 edi 0x8df0430 148833328 eip 0x85943f4 0x85943f4 <clear_blocks_sse+20> eflags 0x10282 [ SF IF RF ] cs 0x73 115 ss 0x7b 123 ds 0x7b 123 es 0x7b 123 fs 0x0 0 gs 0x33 51 (gdb) info args blocks = (DCTELEM *) 0xb6ca9008
Try mplayer-1.0_rc4_p20091026.
This is an alignment issue, XvMC does not align the buffers sufficiently to allow using SSE. Disabling SSE should "fix" it, though it would be much better if instead XvMC ensured sufficient alignment.
Bug is still present. Recompiling with USE="-sse" ...
# USE="-sse" emerge =media-video/mplayer-1.0_rc4_p20091026-r1 ... using xvmc still segfaults mplayer. vo_xvmc: idct=1 unsigned_intra=0 vo_xvmc: looking for OSD support Subpicture id 0x34344149 vo_xvmc: OSD support by additional frontend rendering [VD_FFMPEG] XVMC-accelerated MPEG-2. Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb6485740 (LWP 27980)] 0x085b87f4 in clear_blocks_sse (blocks=0xb6030008) at x86/dsputil_mmx.c:532 532 x86/dsputil_mmx.c: No such file or directory. in x86/dsputil_mmx.c
... and function "clear_blocks_sse" within x86/dsputil_mmx.c is introduced after =media-video/mplayer-1.0_rc2_p20090530. ... specifying title of bug as such.
That function is in FFmpeg and FFmpeg does not support disabling SSE on CPUs that support it.
In ref. to comment #19, negative. Function "clear_blocks_sse" is defined within x86/dsputil_mmx.c ... which is within mplayer's tree. It's clearly defined there, and was added after 20090530 to mplayer's source.
It is in libavcodec and libavcodec is part of FFmpeg. Whether MPlayer uses its included libavcodec or a separately compiled one is up to the distributions, even though using the included one (as I guess Gentoo does) is recommended and much better supported. However configuring with --disable-sse should actually disable that function. It will still be compiled in, but it should never be called, since the mm_support function never sets FF_MM_SSE. I'm missing a gdb backtrace (bt command) though to see if it is maybe called in some strange way...
sorry. under the weather here (both literally & non-literally) ... will be another week or so until I am able to post more backtraces from gdb. fyi, I have tried USE="-sse -mmx -mmxext" emerge mplayer and get the same error when using xmvc codec. Again, give me a week or so and I'll post more indepth backtraces.
It seems you need to use custom-cpuopts otherwise the sse etc. use flags will be ignored.
OK. Got a minute today and verified the quick hack/workaround for this bug is: USE="custom-cpuopts -sse" emerge mplayer This does effectively avoid the poorly coded function. ;-) ... which caused the break in the xvmc feature. Is anything more needed? (I'll post my verification to the mplayer mailing list when i get more time tomorrow.)
This is _not_ a poorly coded function, it is just not possible to use it with XvMC since XvMC was designed in a way that makes it impossible to use it with SSE (though IMO that would be easy to fix from the XvMC developer side), and FFmpeg developers so far do not want to add special hack that also reduce speed only to support the somewhat outdated/obsolete XvMC. From looking at the Intel XvMC code it is just a matter of changing XvMCCreateBlocks to use memalign instead of malloc, or alternatively wrapping malloc so it always returns sufficiently aligned memory (e.g. by using some *BSD and their libc instead of glibc).
... mind if i post that little tidbit to the mplayer mailing list for historical documentation purposes (for googlers)?
USE="custom-cpuopts -sse" stiil doesn't help. # USE="custom-cpuopts -sse" emerge -q mplayer >>> Verifying ebuild manifests >>> Emerging (1 of 1) media-video/mplayer-1.0_rc4_p20091026-r1 >>> Installing (1 of 1) media-video/mplayer-1.0_rc4_p20091026-r1 Odin ~ # emerge --info Portage 2.1.7.16 (default/linux/x86/10.0, gcc-4.3.4, glibc-2.10.1-r1, 2.6.31-gen too-r6 i686) ================================================================= System uname: Linux-2.6.31-gentoo-r6-i686-AMD_Athlon-tm-_XP_3200+-with-gentoo-1. 12.13 Timestamp of tree: Sun, 31 Jan 2010 13:15:02 +0000 ccache version 2.4 [enabled] app-shells/bash: 4.0_p35 dev-java/java-config: 2.1.10 dev-lang/python: 2.6.4 dev-util/ccache: 2.4-r7 dev-util/cmake: 2.6.4-r3 sys-apps/baselayout: 1.12.13 sys-apps/sandbox: 1.6-r2 sys-devel/autoconf: 2.13, 2.63-r1 sys-devel/automake: 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6b virtual/os-headers: 2.6.27-r2 ACCEPT_KEYWORDS="x86" ACCEPT_LICENSE="* -@EULA Nero-EULA-US dlj-1.1" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/ fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /et c/terminfo /etc/udev/rules.d" CXXFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests ccache distlocks fixpackages news parallel-fetch protec t-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.bg/ http://mirror.yandex.ru/gentoo-distf iles/ ftp://mirror.yandex.ru/gentoo-distfiles/ http://distfiles.gentoo.bg/ http: //ftp.gentoo.bg/ http://ftp.fi.muni.cz/pub/linux/gentoo/ ftp://ftp.fi.muni.cz/pu b/linux/gentoo/ http://gentoo.mirror.web4u.cz/ ftp://gentoo.mirror.web4u.cz/ htt p://ftp.linux.ee/pub/gentoo/distfiles/ ftp://ftp.linux.ee/pub/gentoo/distfiles/ http://mirror.ovh.net/gentoo-distfiles/ ftp://mirror.ovh.net/gentoo-distfiles/ f tp://gentoo.imj.fr/pub/gentoo/ ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ ftp://f tp.tu-clausthal.de/pub/linux/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub /Linux/gentoo http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ ftp://l inux.rz.ruhr-uni-bochum.de/gentoo-mirror/ http://ftp.uni-erlangen.de/pub/mirrors /gentoo ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.join.uni-muenster .de/pub/linux/distributions/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gento o ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo http://mirrors.s ec.informatik.tu-darmstadt.de/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirro rs/gentoo/ ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp.gentoo. mesh-solutions.com/gentoo/ ftp://pandemonium.tiscali.de/pub/gentoo/ http://gento o.mneisen.org/ http://de-mirror.org/distro/gentoo/ ftp://de-mirror.org/distro/ge ntoo/" LANG="ru_RU.UTF-8" LC_ALL="" LDFLAGS="-Wl,-O1" LINGUAS="ru en" MAKEOPTS="-j1" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclu de=/local --exclude=/packages" PORTAGE_TMPDIR="/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="3dnow 3dnowext 7zip X a52 aac acpi alsa amr aotuv asf async audio avahi bas h-completion berkdb bittorrent boost bzip2 caps ccache cdb cdda cddb cdio cdpara noia cdr cg clamav consolekit cracklib crypt cups custom-optimization cxx cyrill ic dbus dga dhcp directfb dnd dvd dvdr fame ffmpeg firefox firefox3 flac fontcon fig foomaticdb ftp gdbm gif gnutls google google-gadgets gpm grub hal hddtemp hi stman hpijs http i18n iconv icq id3 jabber java java-external javascript jpeg jp eg2k kde lame lastfm libnotify logitech-mouse logrotate lzma matroska mime mmx m mxext modules mozilla mozsha1 mp2 mp3 mp3tunes mp4 mp4live mpeg mpeg2 mplayer mp pe-mppc mpu401 mrim mudflap music mysql mysqli ncurses network nforce2 nls nptl nsplugin nut nvidia odk ogg123 openal opencore-amr opengl openmp openssl openssl crypt pcre pdf perl php plasma png posix ppds pppd python qt3support qt4 quickti me rar rdesktop readline reflection reiserfs samba scanner semantic-desktop serv er session sndfile spl srt sse ssh ssl svga sysfs tcpd tga themes threads tiff t ools udev unicode usb vcd video vidix vkontakte vmware vorbis wav web webinterfa ce webkit win32codecs winbind wma wmf x264 x86 xanim xinerama xorg xpm xv xvid x vmc yandexnarod zip zlib" ALSA_CARDS="emu10k1 intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol " APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm aut hn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_o wner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env e xpires ext_filter file_cache filter headers include info log_config logio mem_ca che mime mime_magic negotiation rewrite setenvif speling status unique_id userdi r usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_ DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru en" RUBY_TARGETS="ruby18" SANE_BACKENDS="mustek mustek_usb mustek_us b2 gt68xx" USERLAND="GNU" VIDEO_CARDS="nvidia" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_CO MPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
This issue is fixed since 2010-01-04 with libavcodec r21011
(In reply to comment #28) > This issue is fixed since 2010-01-04 with libavcodec r21011 > But how - the latest version of media-video/ffmpeg in portage tree is 0.5_p20373?
I'm a MPlayer/FFmpeg developer, I am only informing people about the situation upstream (mostly to make sure communication between Gentoo and MPlayer/FFmpeg developers is at least a bit functional), for anything else you'll need to find a Gentoo developer.
Well, in some future, when version with this problem solved, would be in portage - evthng will be ok, but what can I do now to make it somehow works?:)
Thanks Reimar for your time fixing, providing a wrapper, etc. I have to apologize I wasn't able to volunteer some coding time, but I'm so busy here fixing others screw-ups. :-/ lexx: Haven't rescanned the history, but I may have forgot to submit the hack or temporary workaround for this bug. # echo "media-video/mplayer debug -custom-cflags custom-cpuopts -sse" >> /etc/portage/package.use To interpret, basically disabling sse fixes the bug, however, in order for sse compile time support to be completely disabled, one also needs to disable "custom-cflags" and then enable "custom-cpuopts". One has to kind of lol at the loopiness used. ;-)
(In reply to comment #28) > This issue is fixed since 2010-01-04 with libavcodec r21011 has been fixed long ago then -> closing, thx Reimar