Bug 14376 - length is not determined with certain LANG + LC_MESSAGES settings
Summary: length is not determined with certain LANG + LC_MESSAGES settings
Status: CLOSED WONTFIX
Alias: None
Product: Sisyphus
Classification: Development
Component: smplayer (show other bugs)
Version: unstable
Hardware: all Linux
: P2 minor
Assignee: drool
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-10 08:58 MSK by Ivan Zakharyaschev
Modified: 2016-08-11 14:58 MSK (History)
4 users (show)

See Also:


Attachments
one-two.wav.bz2 (287.77 KB, application/x-bzip2)
2008-02-10 08:59 MSK, Ivan Zakharyaschev
no flags Details
smplayer.out (12.08 KB, text/plain)
2008-02-10 08:59 MSK, Ivan Zakharyaschev
no flags Details
screenshot (296.06 KB, image/png)
2008-02-15 23:35 MSK, swi
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Zakharyaschev 2008-02-10 08:58:32 MSK
smplayer-0.6.0-alt0.rc1
mplayer-1.0-alt35.25957.1
Steps to Reproduce:
1. I recorded a 7 sec WAV file in audacity-1.3.3-alt0.2 (one-two.wav -- attached)
2. smplayer one-two.wav &> smplayer.out
3.
Actual Results:  
The progress indicator show 0 sec, the length indicator also shows 0 sec.

Expected Results:  
The progress and length indicators show the actual values.

mplayer-1.0-alt35.25957.1 does this:

$ mplayer one-two.wav
MPlayer dev-SVN-r25957-4.1.1 (C) 2000-2008 MPlayer Team
CPU: Intel(R) Pentium(R) M processor 2.00GHz (Family: 6, Model: 13, Stepping: 8)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
117 audio & 242 video codecs

Playing one-two.wav.
Cache fill:  8,35% (700460 bytes)   
Audio file file format detected.
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 44100 Hz, 1 ch, s16le, 705,6 kbit/100,00% (ratio: 88200->88200)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
AO: [alsa] 48000Hz 1ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A:   2,1 (02.0) of 7,0 (07.0)  0,9% 5% 

MPlayer interrupted by signal 2 in module: enable_cache


MPlayer interrupted by signal 2 in module: play_audio
A:   2,1 (02.1) of 7,0 (07.0)  0,9% 5% 
Exiting... (Quit)
$ 

Also, simple play from sox-13.0.0-alt3 does this:

$ play one-two.wav

Input File     : 'one-two.wav'
Sample Size    : 16-bit (2 bytes)
Sample Encoding: signed (2's complement)
Channels       : 1
Sample Rate    : 44100

Time: 00:03.34 [00:04.60] of 00:07.94 ( 42.1%) Output Buffer: 160.46K
Skipped.

Done.
$
Comment 1 Ivan Zakharyaschev 2008-02-10 08:59:20 MSK
Created attachment 2429 [details]
one-two.wav.bz2
Comment 2 Ivan Zakharyaschev 2008-02-10 08:59:38 MSK
Created attachment 2430 [details]
smplayer.out
Comment 3 swi 2008-02-15 23:35:02 MSK
Created attachment 2437 [details]
screenshot

try smplayer-0.6.0-alt0.rc2
on my rc2 this not reproduced
Comment 4 swi 2008-02-15 23:35:52 MSK
plays perfectly
Comment 5 Ivan Zakharyaschev 2008-02-18 21:04:47 MSK
smplayer-0.6.0-alt0.rc2

The situation remains the same.

It seems that on the first play the progress indicator works. But on subsequent
plays it doesn't work.

I checked this on a new user. The first time -- works, the second time --
doesn't work; after `rm -rf .smplayer/' works again, subsequent times doesn't
work again.
Comment 6 Ivan Zakharyaschev 2008-02-18 21:25:58 MSK
No, I was wrong about the test under a new user. Under the new user, it always
works. That time I didn't give him enough rights to access audio.

But under my user the progress indicator never works, even if a delete ~/.smplayer/.

I haven't understood yet what the important difference is...

If I understand this, I'll write.
Comment 7 Ivan Zakharyaschev 2008-02-18 21:47:29 MSK
Under my user "Options" > "View info and properties" shows (NB: length == 0):

one-two.wav
General
File
/space/ivan/OUT/ALT/bugreports/wav/one-two.wav
Size
684 KB (0 MB)
Length
00:00:00
Demuxer
audio

Under the other user where the progress indicator works (NB: length == 7 sec!):

one-two.wav
General
File
/space/ivan/OUT/ALT/bugreports/wav/one-two.wav
Size
684 KB (0 MB)
Length
00:00:07
Demuxer
audio

I don't know why.
Comment 8 swi 2008-02-18 22:41:33 MSK
(In reply to comment #6)
> But under my user the progress indicator never works, even if a delete
~/.smplayer/.
> 
try to delete ~/.config/RVM/smplayer (i dont' remeber is it actual or not now)

just try again with file you attached - play 3 times, start smplayer again and
play 2 times. Allways show indication.
Comment 9 Ivan Zakharyaschev 2008-02-19 01:30:03 MSK
no, deleting that one didn't help.

But 
$ unset LESSKEY HOSTNAME GPG_AGENT_INFO TMPDIR CVSROOT CCACHE_LOGFILE LIBCM_TFP
QTDIR QTINC http_proxy GCC_USE_CCACHE CCACHE_DIR USERNAME GTKLP_FORCEX MINICOM
MAIL INPUTRC LANG LC_MESSAGES SLINK_DEVICE SSH_ASKPASS TEXINPUTS GPG_TTY
DICTIONARY HOME MONO_EXTERNAL_ENCODINGS BASH_ENV G_FILENAME_ENCODING LESS
LOGNAME TMP QTLIB CVS_RSH MPAGE XDG_DATA_DIRS LESSOPEN LADSPA_PATH
G_BROKEN_FILENAMES

helped (these are almost all variables).

I'm going to investigate which ones are responsible for this bug.

These are not important:

$ unset QTLIB QTINC QTDIR

the bug is present after this.
Comment 10 Ivan Zakharyaschev 2008-02-19 01:32:46 MSK
Ha-ha, LANG was the one. unsetting LANG helped. I have LANG == ru_RU.KOI8-R.
Comment 11 Ivan Zakharyaschev 2008-02-19 01:38:19 MSK
Finally, the test:

in a new user's shell I unset all locale variables (in my case, LANG,
LC_MESSAGES) and:

$ LANG=ru_RU.KOI8-R LC_MESSAGES=POSIX smplayer /usr/share/sounds/KDE_Startup.wav

This way the indicator doesn't work. The combination of the 2 values causes the
bug, any single one of these variables' values doesn't cause the bug.
Comment 12 swi 2008-02-19 10:56:55 MSK
(In reply to comment #11)
> Finally, the test:
> 
> in a new user's shell I unset all locale variables (in my case, LANG,
> LC_MESSAGES) and:
> 
> $ LANG=ru_RU.KOI8-R LC_MESSAGES=POSIX smplayer /usr/share/sounds/KDE_Startup.wav
> 
> This way the indicator doesn't work. The combination of the 2 values causes the
> bug, any single one of these variables' values doesn't cause the bug.

Aha. That's reproduced :) Veeeery strange LC_MESSAGES and LANG you have there :)

Comment 13 Ivan Zakharyaschev 2008-02-19 16:39:21 MSK
(In reply to comment #12)
> Aha. That's reproduced :) Veeeery strange LC_MESSAGES and LANG you have there :)

No, I always found this to be a very reasonable combination. I want to have all
the interface messages in the default language (English), because translations
of UI are difficult to understand quickly. But I'm surrounded by Russia and
Russian, so I want all other localizable stuff to be set up for Russian:
filenames might be in Russian, I'm used to the Russian date format, Russian
metric units etc.
Comment 14 swi 2008-02-24 18:29:58 MSK
New from author.

citation:
"I've just run that command and I can't reproduce the problem, the length is 8
and the slider moves.

Anyway I guess the problem is with the decimals:

>   A:   2,3 (02.2) of 7,0 (07.0)  0,1% 5%

For me it displays this:

A:   5.3 (05.2) of 8.0 (08.0)  0.0%

With a dot, not a comma.
"

Is this bug reproduces with '.' as digit divider ?
What language in smplayer interface?

PS: i never thought that somebody will use smplayer as audio player :)
Comment 15 Ivan Zakharyaschev 2008-05-18 15:32:54 MSD
(In reply to comment #14)

> citation:
> "I've just run that command and I can't reproduce the problem, the length is 8
> and the slider moves.
> 
> Anyway I guess the problem is with the decimals:
> 
> >   A:   2,3 (02.2) of 7,0 (07.0)  0,1% 5%
> 
> For me it displays this:
> 
> A:   5.3 (05.2) of 8.0 (08.0)  0.0%
> 
> With a dot, not a comma.
> "
> 
> Is this bug reproduces with '.' as digit divider ?
> What language in smplayer interface?

Of course, as it was shown in the comments above, the problem is connected with
the "strange" locale I have. I even gave there an exact way to reproduce the
problem:

$ LANG=ru_RU.KOI8-R LC_MESSAGES=POSIX smplayer /usr/share/sounds/KDE_Startup.wav


> PS: i never thought that somebody will use smplayer as audio player :)

That's not important; simply, my first thoughts were that this behavior depends
on the input file format.
Comment 16 Ivan Zakharyaschev 2008-05-18 15:35:44 MSD
(In reply to comment #15)

> $ LANG=ru_RU.KOI8-R LC_MESSAGES=POSIX smplayer /usr/share/sounds/KDE_Startup.wav

with other locale/language vars unset.

Perhaps, the author might have no ru_RU.KOI8-R locale in his system, but the
source of the problem should be obvious. Probably there is a mismatch between
the actual decimal format and the expected decimal format somewhere "inside".
Comment 17 Motsyo Gennadi 2015-07-25 23:06:50 MSK
Это еще актуально?
Comment 18 Motsyo Gennadi 2016-08-11 14:58:04 MSK
Как я понимаю - уже не актуально.