You Are Here:

Community: Developer Discussion Boards

#1 Old Unhappy midi player crashes app on 6233, 6280, 6288 - 2006-11-22, 21:52

Join Date: Apr 2004
Posts: 7
flomef
Offline
Registered User
Hi there,
I wrote an app that is working well on over 55 series of 10 different cellphone manufacturers. But porting the app to series40 with 240x320 displays such as 6280 or 6288 causes great difficulties.

The app freezes unpredictably every now and then during player changes.
I already figured out that it has something to do with sound changing, because it works fine with sound turned off in my app. Then there is no loading, prefetching, realizing and so on. I know, that there can only be one player prefetched in series40 and explicitly check for that before creating and playing the next player!
I should mention that the same file works perfect on the 6270 device (same series)!? but crashes without any error message or exception on 6280 and 6288, and with a MediaException: "device error" on 6233 that I catch stoping the player like this:

player.stop();
while (player.getState() == Player.STARTED)
{
Thread.yield();
}

player.close();
// for series 40 cannot have two players prefetched
while(player.getState() != Player.CLOSED)
{
Thread.yield();
}

player = null;

Can anyone please tell me what could cause such an error. I'm very thankfull for the slightest hint! (excuse my bad english, I'm no native speaker)

greets flo
Reply With Quote

#2 Old Re: midi player crashes app on 6233, 6280, 6288 - 2007-01-08, 10:02

Join Date: Feb 2004
Posts: 6
laxity
Offline
Registered User
Hmm.. I've just had the same problem. Seems there's a bug in the implementation of the mmapi (once again I might add!). On the 6280, I had as you have a "Device error" exception (which is not a documented java exception I might add!) once I tried to start() a player that had been playing previously.

I start the players like this:
Code:
player.realize();
player.prefetch();
player.start();
.. the start player code works the first time, but not after I've stopped the player like this:
Code:
player.stop()
while(player.getState()==Player.STARTED) { 
}
player.deallocate();
... For it to work I hacked the stop code as I noticed that the music would play once I had selected sound off (stopping music), sound on (having exception), sound off (still silent), sound on (music playing again) in a game I've been working on.. The resulting stop code look like this!

Code:
player.stop();
while(player.getState()==Player.STARTED) {
}
player.deallocate();
player.stop();
player.deallocate();
This works for me on the 6280, and I suspect it works on the other ones as well.

Cheers,
Thomas Egeskov Petersen
Reply With Quote

#3 Old Re: midi player crashes app on 6233, 6280, 6288 - 2007-01-08, 15:25

Join Date: Apr 2004
Posts: 7
flomef
Offline
Registered User
hi thomas,

thanx a lot for your reply. I had given up all hope for an answer and/or solution already...

I've worked around the problem by reducing the amount of sounds in the app to such an extent that there is no player to stop for the next one. no solution at all, I know!

unfortunately I have no time to check your solution. but I think it very likely to work! when the player won't deallocate, deallocate it once more, for sure. ; )

thank you very much!
kind regards,
flo
Reply With Quote

#4 Old Re: midi player crashes app on 6233, 6280, 6288 - 2007-01-08, 17:38

Join Date: Feb 2004
Posts: 6
laxity
Offline
Registered User
No sweat.. Didn't ever see the problem on the 6280 before today, but then I hadn't looked closely enough. (I wonder how it passed testing!..).. Anyway, this is just another hack to add to the list of wonderfull hacks needed to make audio work. So much inconsistancy in the mmapi implementation on all handsets (and I don't just mean Nokia!). I think 90% of the bugs reported in my last project were related to sound.. And THAT sucks!
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
E60 App crashes at StringLoader::LoadLC( R_CHAT_SERVICE_NAME ); zdenko General Symbian C++ 5 2006-12-08 02:03
using Midi player for interactive app in 6230 - makes clicking sound mks@megansmitley.org Audio 0 2006-01-10 16:56
MediaException: cannot create player (while trying to play a midi) njzk2 Mobile Java Media (Graphics & Sounds) 2 2005-03-21 14:42
My app crashes when the call is in progress michalpleban Symbian User Interface 0 2004-10-15 18:43
including midi player j2me_raj Mobile Java General 0 2003-07-23 06:45

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d134434X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtopicQUqfnTopicZmediaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ