Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Error opening external sound file:/sound/.wav

Help
James UK
2012-04-24
2013-05-29
1 2 > >> (Page 1 of 2)
  • James UK
    James UK
    2012-04-24

    Hi, having some issues using my own sounds; have built a .jar that uses .wav sound samples and all is good, except for just one sound file; "again.wav"? Example: announcement "then + soon + hard + right + again", plays the first four words fine, then a java exception is thrown; "Error opening external sound file: /sound/.wav", implying it's looking for a file called ".wav" and can't find it?

    I've checked the file "again.wav" exists in the file directory and plays fine outside of GpsMid and it does. I have not altered the syntax.dat file or anything.

    Any ideas?

    Regards

     
  • James UK
    James UK
    2012-04-25

    Sorry, I meant to add this is running the app. on a Sony Ericssn C902, if that helps.

     
  • James UK
    James UK
    2012-04-25

    Hang on.. think I might have spotted what I've done wrong… I've just checked my source folders that I used when I built the jar file and found that the "again.wav" file was missing from the "sound" file.

    So I'm guessing it was missed in some way when the jar file was built, giving that error when it's run and there's no associated matching file for the file name in syntax.dat?

    Anyway, I've tried re-building a new jar file making sure that the again.wav file is present in the "sound" directory this time, so I'll test it and post back if that solves it.

     
  • James UK
    James UK
    2012-04-26

    Nope, no joy; the error is still given.

    I wonder if removing the %AGAIN% entries from the syntax.dat file would prove anything?

    Is there a way to suppress the exception error so the program would continue to run without user intervention (I.E. having to press a button to choose "OK"?

     
  • Jyrki Kuoppala
    Jyrki Kuoppala
    2012-04-26

    I've occasionally seem error message like this with my own sound files, but I don't know what the problem was. I think the file name I got the error about was the same, .wav, appearing occasionally (in the same places so it was deterministic, but I didn't look closely enough to say if it was with "again". Don't have the errors any more, though.

    Which version are you using? When thinking about this, it may be the problem I had is with the latest signed release version. Maybe there's a bug in the latest release version which has been fixed after that - I'm using snapshots now and haven't seen the problem. I also looked at the current code, trying to see where things might go wrong with the current snasphot, but didn't find anything suspicious.

     
  • Jyrki Kuoppala
    Jyrki Kuoppala
    2012-04-26

    Doesn't look like there's been changes to syntax.cfg after the last release, so maybe it's not that.

     
  • Jyrki Kuoppala
    Jyrki Kuoppala
    2012-04-26

    I made the situation silent (as it is for internal sounds; actually that could be the reason I'm not seeing this now, as I'm using midlets with internal maps on my J2ME device, so it may well be the bug of trying to show .wav still is there on J2ME, I just don't see it as it's silent).

     
  • James UK
    James UK
    2012-04-26

    Hi, thanks for taking the time to investigate this and post back here. At least I know it's not just myself that's seen this.

    To answer your question, I've been using GpsMid version 0.7.7-map69, with Osm2GpsMid-0.7.7-map69 for creation. I'll get hold of some earlier versions and try those, so thanks for the tip.

    Given that I'm fairly sure it's the "again.wav" file or AGAIN command that's causing the problem, could my idea of removing all occurances of "AGAIN" in the syntax.dat file make the error cease to appear, as it's not then going to be called at all, or is there some deeper-seated coding that will still try and play the file, regardless of the syntax, and throw the error?

    Is there a way to stop or "block" these exception errors from occurring possibly?  When it does happen, it's hard to try and press "OK" whilst driving to get the application to carry on! ;-)

    (I know I shouldn't really be operating it whilst driving…;-)

    Thanks again for all your input.

    Regards

     
  • Jyrki Kuoppala
    Jyrki Kuoppala
    2012-04-26

    From the description, I suspect it's not the AGAIN sounds as such, but something in the audio instructions code which causes an empty file to be attempted to play, and the situation appears when AGAIN is played. So I think removing the AGAIN string from syntax might or might not not solve the issue.

    I blocked the exception alerts, so they shouldn't be bothering you anymore. For my own test version I added the alerts to the Android version, so I should be able to get some more info on the issue.

     
  • James UK
    James UK
    2012-04-26

    Hi, and thanks again for the continuing help.

    Yes, I agree it's probably something in the audio code itself, so that was a long-shot altering the syntax.dat file.

    May I ask how you blocked the exception alerts? How can I achieve this? I couldn't see an option in the GUI when using the program on the phone.. or do you mean there's a "properties" file command to use, to build a version with exception alerts disabled? I couldn't see such an option when I looked through the Wiki again.

    You didn't mean you'd made a special version for me, did you? ;-) If you did, where should I download it from?

    Thanks again

    Regards

     
  • Jyrki Kuoppala
    Jyrki Kuoppala
    2012-04-26

    Hi,

    I blocked the alerts in the under-development GpsMid (meaning for everyone), you can download that from http://gpsmid.sourceforge.net/nightlies/ and test.

     
  • James UK
    James UK
    2012-04-26

    Hi again,

    That's great thanks.

    I've checked that link, but couldn't see any non-android GpsMid files, or a section on the page called "under-development"… only many Osm2GpsMid java files?

    Did you mean for me to download this Osm2GpsMid file;

    "Latest (non-debug) version: Osm2GpsMid latest ( 11M,Thursday, 26-Apr-2012 11:17:10 UTC)"

    …and then run it to create a new GpsMid midlet or .zip bundle, which will include the new GpsMid .jar file and that will have the exceptions disabled in it?

    Forgive my ignorance, and misunderstanding, but if that's the wrong file and not the one you meant, can you point me to the direct link for the file you mean on that page?

    Again, many thanks for the help.

    Regards

     
  • Jyrki Kuoppala
    Jyrki Kuoppala
    2012-04-26

    "Did you mean for me to download this Osm2GpsMid file; "Latest (non-debug) version: Osm2GpsMid latest ( 11M,Thursday, 26-Apr-2012 11:17:10 UTC)" …and then run it to create a new GpsMid midlet or .zip bundle, which will include the new GpsMid .jar file and that will have the exceptions disabled in it?"

    Yes.

     
  • Jyrki Kuoppala
    Jyrki Kuoppala
    2012-04-26

    .. and an addition to that, using Osm2GpsMid to build a map .zip won't be enough, as the midlet itself (GpsMid program itself) needs to be updated.

     
  • James UK
    James UK
    2012-04-26

    Ah, thanks for clarifying that. Really appreciated.

    I'll download that file, then use it to make a map zip and extract from that the "new" exceptions-blocked GpsMid.jar file.

    I'll give that a try and post back here with the results.

    Again, many thanks for your help. ;-)

     
  • Jyrki Kuoppala
    Jyrki Kuoppala
    2012-04-26

    OK; if you want to do it that way, ie. if you just want to extract the midlet from the zip and use an external map, then you probably can manage just by extracting the appropriate GpsMid (generic or whatever) from the Osm2GpsMid jar, no need to actually run Osm2GpsMId.  ("probably" is because of this: whether this works depends on what name midlet you have and how your platform handles installing midlets / midlet settings / keeping old settings).

     
  • James UK
    James UK
    2012-04-26

    "extracting the appropriate GpsMid (generic or whatever) from the Osm2GpsMid jar, no need to actually run Osm2GpsMId.

    Thanks for that suggestion, it sounds like the quickest method, so I'd like to try it.

    How does one accomplish this? Is there a Command Line switch to use to extract the GpsMid .jar file from the Osm2GpsMid.jar file? I did search the Wiki to try and find out and save asking you again, but couldn't see anything.

    I also renamed the Osm2GpsMid.jar file to Osm2GpsMid.zip and opened it as a zip archive but couldn't see any GpsMid jar files within the archive?

    Sorry for being such a pain!

    Regards

     
  • Jyrki Kuoppala
    Jyrki Kuoppala
    2012-04-26

    Just use zip to extract the jar(s) inside - jar files are for practical purposes zip files with some additions. If your zip program doesn't want to handle the jar, you can first rename it to .zip.

     
  • James UK
    James UK
    2012-04-26

    Sorry, my fault… I renamed the WRONG file. Doh!

    Found them now inside the right file. Thanks again and sorry for being so stupid!

    I'll let you know how I get on. ;-)

    Regards

     
  • Jyrki Kuoppala
    Jyrki Kuoppala
    2012-04-26

    Oops, didn't read all of your message - strange, the the jar files should be there, and do show up for me:

    $ unzip -l Osm2GpsMid-0.7.71-map71.jar |grep -i jar
    Archive:  Osm2GpsMid-0.7.71-map71.jar
      2731402  2012-04-26 15:43   GpsMid-Generic-blackberry-0.7.71-map71.jar
      2008839  2012-04-26 15:43   GpsMid-Generic-editing-0.7.71-map71.jar
      1984412  2012-04-26 15:43   GpsMid-Generic-full-0.7.71-map71.jar
      1939617  2012-04-26 15:43   GpsMid-Generic-minimal-0.7.71-map71.jar

     
  • James UK
    James UK
    2012-04-26

    Sorry, it was me being an idiot… ;-) I was opening the wrong file.

    I've now opened the right file and extracted the "GpsMid-Generic-full-0.7.71-map71.jar" file, so I'll give this a try and let you know if the exceptions error stops appearing at that certain point.

    Thanks again. Have sent an email to you too. ;-)

    Regards

     
  • James UK
    James UK
    2012-04-26

    OK, here's the results of my further testing;

    The nightly build GpsMid-0.7.71-map71.jar would not run correctly once installed. It generated the following errors in a continuous loop, and never got to / past the splash screen;

    "map format error null"
    "names thread crashed unexpectedly with error could not find file  /urls names-idx in jar"
    "failed to load basic map data could not find file /dict-0.dat in jar"

    (they were looping very quickly so apologies for any omitted text. I tried to copy them to the best of my ability)

    Trying an older version next;

    GpsMid-0.7.6 map67 failed to play the "again" sound, with either .amr or .wav files, with all the preceding sounds for both .amr and .wav versions  played correctly as before, when part of a route that played "THEN SOON HARD RIGHT…" (with AGAIN being the last word that should have played); same "exception" missing ".wav" or ".amr" file error.

    So, still no closer to working out what's wrong here, or whether it's a symptom of my phone, the number of continuous phrases or something else that's causing this error.

    I don't think I installed the nightly build incorrectly, so I'm unsure how we can progress that; could the changes you made have caused that undesired effect by accident?

    Anyway, I will say again, thanks for all this support. Much appreciated. I will still continue to use the app.

    Regards.

     
  • Jyrki Kuoppala
    Jyrki Kuoppala
    2012-04-26

    Hi,

    "The nightly build GpsMid-0.7.71-map71.jar would not run correctly once installed. It generated the following errors in a continuous loop, and never got to / past the splash screen;"

    OK; that's because it's not finding the map. On the phones I've tested with, current GpsMid will go to setup after some error messages, but apparently that's not the case with all phones.

    To find out whether current GpsMid nightly version will work on your device (without the map troubles you're experiencing), you could just go by the instructions for building your own map in the wiki "Getting started" page, and install the bundle created by GpsMid (no unzipping or anything like that, just the bundle with the internal map - if you don't intend to use the internal map, you can just define it to be a small area, as the function of it is just  to bypass the missing map errors so you can set up map location).

    See https://sourceforge.net/apps/mediawiki/gpsmid/index.php?title=Getting_started#Using_Osm2GpsMid_to_build_your_own_midlet

    Apparently you were hit by the possibility I mentioned: ("probably" is because of this: whether this works depends on what name midlet you have and how your platform handles installing midlets / midlet settings / keeping old settings).  - if the midlet you install has a different name, it will install as a new program and will not keep the old GpsMid map setting. Also, on some devices, old config is not kept on new installs even if the midlet name is the same. So, to make sure GpsMid works it's safest to just build the map as described in the "Getting started" wiki topic, and install the resulting jar in the phone.

     
  • Jyrki Kuoppala
    Jyrki Kuoppala
    2012-04-26

    "GpsMid-0.7.6 map67 failed to play the "again" sound, with either .amr or .wav files, with all the preceding sounds for both .amr and .wav versions played correctly as before, when part of a route that played "THEN SOON HARD RIGHT…" (with AGAIN being the last word that should have played); same "exception" missing ".wav" or ".amr" file error."

    That's to be expected with that GpsMid version, the change I made affects only the latest nightly 0.7.71 version.

    It would probably be a good idea to modify the nightly build process so that even the nightlies will include a small demo map (perhaps even include in the bundle, or at least as separate jars), that'd avoid the kind of trouble you're having now. But you can overcome that by building the map yourself.

     
  • Jyrki Kuoppala
    Jyrki Kuoppala
    2012-04-26

    I checked with 0.7.57-map69 on Android, and current 0.7.71 on Android, and on both the following sequence works:

    Generic/microemulator: IN;100;METERS;RIGHT;THEN;SOON;RIGHT;AGAIN

    Also, doesn't seem to be anything wrong with the code.

    A couple of things you could check

    - in syntax.dat (a binary file), you should find a list of sound files, where there should be "SOON", and after that (a few binary bytes in between, namely 0x0 and ctrl-e at least for me) "AGAIN"

    -  recheck that you use the right map settings and that the map really does have AGAIN.WAV (or whatever the format you're using)

    - limit sounds to just wav (or whatever the format you're using) by adding useSounds = wav in .properties

    - recheck syntax.cfg that it has again.sound = AGAIN

     
1 2 > >> (Page 1 of 2)