google-code-export / mobbler

Automatically exported from code.google.com/p/mobbler
0 stars 0 forks source link

Mobbler crashes playing radio with Nokia N8 (Symbian^3) #654

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1. Start playing radio on a Nokia N8

Good:
-> Downloads track list ok
-> Album art shown ok
-> Starts buffering audio ok
-> Play buffered audio

Bad:
-> No audio is actually heard
-> Pressing volume keys puts the volume at something like 10050% and 
crashes it

(It scrobbles local tracks ok and uploads them.)

Original issue reported on code.google.com by hugovk@gmail.com on 20 May 2010 at 12:36

GoogleCodeExporter commented 9 years ago
I have noticed the same problem too, but I could add that playback with stereo 
BT
headsets (e.g. BH-214) works if you do not control the volume from phone but 
from the
headset. Volume control from BT headset adjusts only the internal volume of the
headset, so the volume control from phone is clearly the problem.

Original comment by avi...@gmail.com on 26 May 2010 at 7:38

GoogleCodeExporter commented 9 years ago
Thanks aviita. So when using the BT headset, can you hear the music Mobbler is 
playing?

Original comment by hugovk@gmail.com on 26 May 2010 at 8:30

GoogleCodeExporter commented 9 years ago
Yes, at least after adjusting the volume from the BT headset.

Original comment by avi...@gmail.com on 26 May 2010 at 8:35

GoogleCodeExporter commented 9 years ago
And the volume I see before the crash is something like '19669%'.

The crash reason is - Panic (category, id): USER, 11

And the Call stack looks like this:
Program counter  8042D7D4 ExitCurrentThread(TExitType, int, const TDesC8*) 0018
uc_exec_.o(.emb_text)
Link register  804398AB User::Panic(const TDesC16&, int) 003D us_func.o(.text)
This is current stack pointer 00435718 80441E2C ,.D.
0043571C 80441DF1 Panic(TCdtPanic) 0015 us_utl.o(.text)
00435720 80441E2C ,.D.
00435724 804462B3 Des16PanicDesOverflow() 0009 des16.o(.text)
00435728 8043CADB TDes16::AppendFormatList(const TDesC16&, std::__va_list,
TDes16Overflow*) 00C3 us_des.o(.text)
0043572C 80B7C9C7 CFbsBitGc::DrawText(const TDesC16&, const
CGraphicsContext::TTextParameters*, const TPoint&, CGraphicsContext::TTextAlign,
CFont::TTextDirection, const TRect*) 051B TEXT.o(.text)

Original comment by avi...@gmail.com on 27 May 2010 at 8:30

GoogleCodeExporter commented 9 years ago
Thanks.

"USER 11 — raised when an operation to modify a 16-bit descriptor fails 
because the 
operation would cause the descriptor's data area to exceed its maximum 
allocated 
length."

So the USER 11 crash is because the volume is being set to a crazy value that 
doesn't fit in the TBuf<6> volumeText descriptor. We could easily make that 
bigger, 
but there's a more important underlying cause -- why is no sound heard and why 
doesn't the volume adjustment work?

Original comment by hugovk@gmail.com on 27 May 2010 at 9:37

GoogleCodeExporter commented 9 years ago
That's what I figured and looked through the code a bit, but could not figure 
it out
yet. The max volume is used somewhat funnily since on some classes it is hard 
coded
to 10. I think the max volume might be something like 10000 on that phone and
probably mobbler messes up the volume calculation somehow.

One odd thing is also why the value gets updated on the screen if the panic 
happens
because of the buffer that is used to print it.

Original comment by avi...@gmail.com on 27 May 2010 at 12:30

GoogleCodeExporter commented 9 years ago
Yes, the volume is hardcoded as 10 as that's what it's always been in the past. 
But 
if as you say the max volume has changed, that's a very likely candidate for 
the 
problem.

The odd thing -- Well, "19669%" is ok because it's 6 characters long. I presume 
a 
moment later the value is something like "123456%" and that causes the panic.

...

I just tried changing the TBuf size to <256> and it can now change the volume 
without crashing. it shows the volume changing to wildy to values like 27453%, 
-177732%, 223434% and I can hear bursts of the song as it changes, and 
sometimes 
it'll settle on something silent, or something audible.

So hopefully it'll work if we replace the hardcoded 10 values, and instead look 
up 
the real MaxVolume() supported by the sound device and scale it properly.

Thanks!

Original comment by hugovk@gmail.com on 27 May 2010 at 2:54

GoogleCodeExporter commented 9 years ago
Eartle has fixed this in ra8370dae17 by creating a dummy audio stream to get 
the real 
max volume and use that instead of the hardcoded value.

Thanks for the assistance aviita!

Original comment by hugovk@gmail.com on 27 May 2010 at 4:17

GoogleCodeExporter commented 9 years ago
Good to hear it was fixed already. So when will the fix be downloadable as a 
sis from
the web page?

Thanks for the fix!

Original comment by avi...@gmail.com on 28 May 2010 at 7:15

GoogleCodeExporter commented 9 years ago
No have no set release date. We are planning on making a new release quite 
soon, but 
have a couple of things to finish off first (Twitter and signup). We'll do a 
beta 
version first:
http://code.google.com/p/mobbler/wiki/BetaTesting

Of course, you can always build a sis file yourself from the latest source for 
testing.

Original comment by hugovk@gmail.com on 28 May 2010 at 10:28

GoogleCodeExporter commented 9 years ago
Yep, I'll probably build it my self, but I'll need to do that from home, since 
I am
having trouble to get the source code at work (because of firewall probably).

Original comment by avi...@gmail.com on 28 May 2010 at 11:17