loadBytes fails silently

Hi all

I have a flash/as3 project, which prompts the user to choose a mp3 file on his playbook a game simply it.

I put the file in blackberry permissions - tablet.xml

It works fine when running on the desktop, but fails silently when running on the device!

So I have set some alerts in my code, but can't figure out why it stops to try / catch statement (see code)

Let tell them bytes of length is 300 000 bytes.

the ProgressEvent is triggered twice, once to display 0 / 300 000, then /300 000 0.

On the desktop, the difference is that the 2nd time it shows 300 000 / 300,000.

I have no idea why it does not read the byte array on the device and why it works fine on my desktop.

No additional to set permissions can be?

Thanks for the tips

Loïc

BTW, the code that calls the mp3 files and get them as sound objects comes here where it is much more readable. I just put the charger as a world class and change the event handler variable so that I can see the intermediate steps. I could not indent correctly here:


public class MP3FileReferenceLoader extends EventDispatcher
{
private var mp3Parser:MP3Parser;
private var m:MovieClip;
private var swfBytesLoader;

public function MP3FileReferenceLoader(loader:Loader)
{
    swfBytesLoader = loader;
    mp3Parser=new MP3Parser();
    mp3Parser.addEventListener(Event.COMPLETE,parserCompleteHandler);
}

public function getSound(fr:FileReference, mc:MovieClip):void
{
m = mc;
    mp3Parser.loadFileRef(fr);
}
private function parserCompleteHandler(ev:Event):void
{
    var parser:MP3Parser=ev.currentTarget as MP3Parser;
    generateSound(parser);
}
private function generateSound(mp3Source:MP3Parser):Boolean
{
    var swfBytes:ByteArray=new ByteArray();
    swfBytes.endian=Endian.LITTLE_ENDIAN;
    for(var i:uint=0;i 
         
        

It works!

So I hope this helps someone else:

I wanted to load mp3 from a FileReference: I used this

But some default security settings are not the same in Flash player and AIR so here is how to change the code in the MP3FileReferenceLoader class.

Finally, I have a free signed AIR application that runs on the desktop, a SWF that does NOT work on the desktop, but once the package as a BAR file and deployed on the Playbook, it works.

Great! now, I'm close to finishing this app if all goes well,

Happy coding!

Loïc

Tags: BlackBerry Developers

Similar Questions

  • Mac: R26 Adobe Content Viewer Installation fails silently

    I want to install desktop tools DPS 26.0.0 and Adobe Content Viewer fails silently.  In the Setup log:

    #####

    CustomHooks.dylib: successful installation

    CustomHooks.dylib: Call to LSRegisterURL failed!

    CustomHooks.dylib: Words of delay, to allow a previous installation ends.

    [0] Thursday, may 2, 12:28:31 2013 INFO

    CustomHooks.dylib: Full time.

    CustomHooks.dylib: In InstallAirApp()

    CustomHooks.dylib: Installation files are located:

    / Library/Application Support/Adobe/installers/AdobeDigitalPublishingCS6/ContentViewer/install Adobe Viewer.app/Contents/MacOS/Install content Adobe Content Viewer

    [0] Thursday, may 2, 12:28:35 2013 INFO

    CustomHooks.dylib: failed installation

    Custom action return code: 0

    : TIMER END: [Post payload: {A2C5268E-1455-4D84-AAB0-5AB4FE1CD907}] taken 31895 milliseconds (31,895 seconds) DTR = 1399,59 Kbps (1,36679 Mbps)

    No operation.  We finished:

    [0] Thursday, may 2, 12:28:37 2013 INFO

    #####

    Most disturbing is the installer claims installation succeeded, even if the installation of the ACV has failed.  I can install LCA by hand (by running 'Install Adobe Content Viewer.app').  This happens inside a computer virtual de VMware Fusion with Mac OS X 10.8.2 (I use a virtual machine because I have to build a distribution of the proceeds of the installation setup of base of AIR DPS Desktop Tools.  This was not a problem with previous revisions of DPS Desktop Tools).

    -Patrick

    We don't see not this happens from time to time, but chasing the root cause is difficult. The re - install manual our workaround is suggested for the moment.

    Neil

  • Catch Erros or that they fail silently? Which Option to choose?

    I heard that there is a problem with the Flash players when dealing with errors of execution, so I all advnatage if I take the error
    in the catch block, create an alert class and display it to the user?


    Above this option to let happen to fail silently.


    Please share your ideas on this.
    Thanks in advance.

    There is no rule of thumb for this. It depends on your condition. If you encounter an error for which you wish to inform your user name (may be giving them alternatives or simply asking them to try again later), you can choose to capture and display pop-up windows. If the error does not affect your user name, you can choose to let them fail silently.

  • Simulator of fails silently load App for unknown reason

    Hi, I am a new Blackberry development.

    I spent some time writing some of my own MVC stuff and recently set up what should be the first alpha version of an application to use it. My big problem is that the Simulator is not load my application and I can't seem to find any information explaining why.

    I tried to run my application directly through the JDE plug-in in eclipse (run as and debug as with the Simulator) and I've tried it in several simulators. I put breakpoints in the main method to trap any successful attempt to even start the application and no breaking point are affected.

    I also tried to load the .cod file set up by eclipse in several simulators does not. I checked in the Simulator for all logs directory that may have hidden exception notice but so far I can't find anything in any newspaper that has anything other than details of startup modules, loads of Simulator (and other startup tasks.)

    When I try to load the app (in one of the above ways) all that happens is that an hourglass appears on the main screen to show his attempt to load the application, and then disappears without any other indication that something had happened.

    Anyone know where I should be looking to find the problem here? I'd appreciate any help that anyone can give, thanks to a ton. -Chris

    Expand the main screen using the menu key ("berry") ("Insert" of the keyboard for the simulators), scroll to the "Downloads" folder by using the arrows and click on it (NumPad 5 with Num Lock off, left click on the trackball/touchpad, left-click on the icon for the simulators of the touchscreen) and find your application here.

  • RoboHelp 11 - JavaHelp JDK-selection fails silently - is there all the newspapers that I could consult?

    Hello

    I'm migrating a RoboHelp project from Version 9 to Version 11, and so far everything went smoothly.

    But now I faced a problem that is a show-stopper:

    • In the ssl for the java generation dialog help I have a prompt to select a JDK after you click 'Next', 'Save' or 'save and move forward. "
    • After you select a JDK the guest closes and I'm back in the dialogue of ssl
    • When you click 'Next', 'Save' or 'save & proceed' JDK selection prompt opens again...

    I guess that something is wrong in the background that is not sent to the user. If I select a bad record JDK on purpose, then I don't get a 'normal' error message indicating that no java.exe and so on, could be found...

    I was able to reproduce the behavior on two different PCs.

    So my Question is: How can I find what goes wrong?

    Is there a basis that I could look at?

    -Can I put some sort of debug mode to get the logs?

    BTW: I'm using Version 11.0.4


    Any help would be much appreciated as the generation of JavaHelp is essential for us.

    Best regards

    Andy

    I have not found an answer to the party 'where are the newspapers' of my question, but with a lot of trial and error, I found a solution to the original problem that stood in the way of generating the JavaHelp:

    I downloaded and installed a very old version of the Java SDK (1.2.2_017) and installed on the system, which I'm working. After installing that version of the JavaHelp 2.0 Java has generated again.

    Best regards

    Andy

  • vmblock compilation fails silently in the 64-bit Fedora 17 comments

    I can't compile vmblock for a 64-bit Fedora 17 running guest in version 9.0.1 workstation on a Windows 7 host. I created the guest, installed Fedora inside, updated all the packages to their latest stable versions and installed perl, gcc and kernel-devel. Then I installed VMware Tools and run vmware-config - tools.pl to configure.

    The Setup process found CCG my headers of the core (in lib/modules/3.6.6-1.fc17.x86_64/build/include), and it compiles other modules (vmci, vsock, vmhgfs, vmxnet); but when I told him to 'activate' vmblock, he immediately asked the next question of configuration:

    ...

    The vmblock allows to drag or copy files between the host and guest in one
    Virtual merger or post work.  You want to enable this feature?
    [Yes]

    !!! [EXPERIMENTAL]!
    Automatic VMware kernel modules allows automatic construction and installation of
    ...

    Then user vmware does not start automatically, and when I try to start it manually, it complains: "can't open/proc/fs/vmblock/dev". Nor the user or X session-cycling (logging out and back in; and restart the session X) makes a difference.

    What could be the problem and how can I solve it?

    Well, I took a guest of 64-bit Fedora 17 who had been fully updated and then started to stock kernel and issued the following command to cover all the bases before installing VMware Tools:

    yum install gcc make binutils perl kernel-devel-`uname -r`
    

    Long story short-everything went very well and without errors and finished with extract following end:

    Creating a new boot initrd for the kernel image.
    Starting to feel like virtual daemon: fact
    From vmware-tools (via systemctl): [OK]
    The configuration of VMware Tools 9.2.2 build-893683 for Linux for this race
    kernel completed successfully.

    Then I rebooted (return to stock kernel) and tested copy/paste, shared folders and Drag n Drop and everything worked as expected.

    Looking at messages in the viewer of the journal, each entry with "vmware-tools" that he had "[OK]" after her.

    So everything worked for me, as expected.  I don't have time tonight to test with the updated kernel and 3rd party however patch I'll try as soon as I can.

    Did you find everything about the error message you received?

  • the installation fails silently on windows Server 2003 R2 SP1

    Hi I just installed a new Win server 2003 R2 on my computer (toshiba satellite M70). Everything is OK...

    Just trying to install Vmware Server 2 siltently failure...

    find a log in %Temp% file shows an error... but I can get my hands on what causes this error...

    could you help a little?

    Hello

    Problem of sotware restriction is described as a known issue.  If no software restrictions are defined, you must add the new strategy of SRPs without modification in the registry.

    http://support.Microsoft.com/kb/925336

    J.

    ---

    If you have found this device or any other answer useful please consider the use of buttons useful or Correct to award points.

  • Links of some (but not all) of an external application fail.

    Some external application links fail to open in Firefox (but open fine when IE is the default browser instead). This problem occurred in the 3-point-something version thing, I was running previously, as well as in the 6.0 I run now. If Firefox does not work when I click on the external link I get an error dialog "there was a problem sending the command to the program." Otherwise, it fails silently.

    The links are provided by an RSS feed in an external player. Food has recently changed the formatting to their URLs.

    The links that work will look like:
    http://catalog.SPL.org/ipac20/IPAC.jsp?profile=dial & Full = 3100001 ~! 2725646 ~! 6

    Links that do not work are similar to:
    http://catalog.spl.org?profile=dial & view = items & uri = full = 3100001 ~! 2732159 ~! 2 & term ="science fiction".

    I'm not clear on the question of whether the problem is the lack of a / between the host name and the query string (a violation of the RFC, but that Firefox handles if the URL is just pasted in the address box) or something else. I have also contacted the authors of RSS, but hold on to other entries on if that is the problem (and, if there is a way I can fix it on my end, where there is no rapid change in people generating streams).

    Maybe the search term in quotes that contains spaces is at the origin of the problem: & term = "science fiction".

  • Can not start up and the utility disk first aid failed

    I have an iMac 27 "retina 5K (end of 2015) El Capitan (10.11.2) and 10 Windows via Bootcamp.   This morning when I had finished work on the Windows of the machine side, I tried to start in El Capitan, but it failed silently and turned off the machine itself about the 2 minute point.  I tried new and same problem.  So I checked if I could go back to Windows and ran 10 Windows without problem.  Then I started in the Mac recovery partition to run disk utility and it revealed a considerable number of errors on the Macintosh partition such as:

    -Previous ID in a string of hard link is incorrect (ID =-1130612101)

    (it should be 3164355194 instead of 0)

    Several of the above errors appeared with different numbers

    -Volume bitmap minor meds of repair for orphans blocks

    -County of block free invalid volume

    -Volume header needs minor repairs

    -Lack of notice of thread (id =-1130634630)

    Several of the above errors appeared with different numbers

    Finally the process 'done' with the 'first aid process has failed.  If possible to backup the data on this volume.

    Then I started in an installed USB version of the El Capitan, and while it was successful, he launched a warning when he mounted the volume that I had the problem with: "OS X cannot repair the disk"Macintosh HD"" but I was able to copy the files from this volume and even run applications that have been stored on it.  Tried to run disk utility and first aid in vain as above.

    So here are the questions.

    1 should I guess that nothing can do otherwise erase that partition and reinstall El Capitan?

    2 delete the partition and reinstalled El Capitan will affect my Bootcamp partition or the ability to use Win 10?

    3. I have a Time Machine backup. restore it re - will present the same problem?

    4. I have never had such a massive and unrecoverable failure on a Mac drive and I had used it the day before without problem.  Should I assume that the drive itself is defective and have it replaced?  I ran an Apple Hardware Test and were not problems.

    1 fix

    2. Yes

    3 NO.

    4 NO.

    Back up all data on this disc, including your Bootcamp partition.

  • HP Deskjet F2480 fails to install

    Hello

    I tried to install Windows 7 (64-bit) version of the driver for the printer HP deskjet F2480 on my wife's cell phone. I tried this on my PC and installed properly and no problems at all.

    However, on my wife's machine, is the version of the download (driver only or 'full software') fails to make it beyond the stage of "Extraction XX %" of the installer. Once it reaches 100%, the program fails silently (I checked the Task Manager and the process seems to just die by itself after a few seconds).

    I already tried the following:

    * Restart in safe mode to disable the antivirus to my wife (free antivirus Avira)

    * Downloaded and run the installation wizard HP (which is just impossible to change anything and went back to the first menu at the end).

    * A tried to run the program as administrator.

    * Tried to launch the program under Windows XP compatibility.

    Who have failed to get beyond the mining phase.

    My wifes laptop is an Acer "Aspire One 722"

    1. try to install first the next update:

    2. when the installation window appears, click the OK button:

    3. restart the computer.

    4. try again to install the software for the Deskjer F2480

    .... And now, you will be able to install your printer to the Acer laptop.

    * Click the stars KUDOS to say thanks

    * Click the accepted Solution if the answer to the question.

  • OS5 HTML5 gear - openDatabase fails - undefined database

    Hello..

    Today, I tried to create a simple widget with intervention from the database. I started with reading a few articles on the blackberry developer pages and found some interesting resources. Especially since the support gear was abandoned with OS6.  Widgets my future must run on OS5 OS6 devices, so I followed the instructions to support the gears using HTML5 in the BlackBerry Widget applications.

    After reading a few things about this Api WebSQL, I tried to create a little Gizmo, which stores a simple text input in the database. I tried the WebSQL Code in my browser (Opera) normal and it worked, but not when I test it in the BlackBerry Simulator.

    I created my widget as described in the tutorial "how to avoid recompiling a BlackBerry Widget during development.

    In my widget, the "openDatabase" call fails, even if this function exists. I tried to get the error with a try-catch block information, but the call fails "silently". After investigating this feature (display its content in a textarea component) I found creating a database object in a try-catch block.

    When I try to create these objects in database for me, it throws the following exception: ReferenceError: "Database" is not defined.

    You have any ideas?

    I use the widget in a Curve 8520 Simulator, OS Version 5.0.0.50 9, Version 2.13.0.97 Simulator.

    If you would like more information, please ask!

    Thank you for your help and I hope that my English is not too bad. (It is not my native language)

    Here is my html and javascript code:

    
    
    
        Test
        
        
        
        
        
        
    
    
    
    

    You simulate a SD card inserted in the Simulator?  A SQLite database on 5.0 must either be stored on a card inserted SD or built in the MEM card.  Built in card MEM is only on storm devices and 9000 "BOLD".

    If you simulate a SD card on your curve Simulator, the database must be created

  • CAPTCHA does not load in the Web site.

    Im trying to comment on OXMonline.com site and it will not show the captcha, in other browsers, it does, so I suspect its firefox.

    When Firefox retrieves the script that inserts the CAPTCHA, the certificate (at least in my test) does not match, so the recovery fails silently. The certificate says that he has been issued for www.google.com, not API - secure.recaptcha .net.

    If you want to allow the script to run in any case, go directly to the address of the script, which is

    https://API-secure.reCAPTCHA.NET/challenge?k=6Ldz0wYAAAAAAA5AEkGSWpUqI8_ir4G2YlFFTLKs

    You can then add an exception (I didn't add it permanently). Then when you reload the comment form (or the registration form, which is what I have read), the CAPTCHA should appear.

    Google is pretty good at server stuff, so I hope they fix this soon.

  • 3rd party notifications do not arriving by e-mail

    Hello

    Not sure if this is the right forum for this. We regularly (attempt to) send email to @me.com but they fail silently (without trash or spam); mainly the activation user and password resets.   I understand that @me.com is no longer available in the field of user's email a new, but my company has many customers and that's a frustration for them. Thanks for the advice/direction.

    Kind regards

    Marcel

    Emails sent to the account could be a silent Apple filtering problem, although it is difficult to say.  You say that the email (s) are sent to this account do not appear?  Is that all emails or some emails from a specific source?

    Here is the link to the silent filtering - http://www.macworld.com/article/2029570/silent-email-filtering-makes-icloud-an-u nreliable - option.html.  This is an article by 2013, but if you do a search, you will find many and recent reports about it on forums, blogs, etc.

    Regarding the other issue you mentioned, i.e. do not receive emails for verification or resets, you can take a look at this - If you don't receive your check or reset email - Apple Support

  • Remove the 'fake' lost files transfer

    If I try to transfer this file to a device (e.h. iPod) my iTunes has lost the link to the originally imported files, iTunes don't tell me that the files are not actually present, and it seems that the transfer happens. The drop works, the icon has fallen flashing well, and then nothing happens. Is there a checkbox somewhere saying "iTunes must check whether the files are actually there, or give an error that the transfer may not happen as expected?

    Use Ctrl + B to activate so hidden menu, and then edit > Preferences > advanced > reset warnings. This may begin to show a warning indicating that you have previously deleted. iTunes expects that all the elements that have been added to remain in the library. When he can't do what he is asked he often fails silently, except of course when you want, as in your thread: Auto check all applications during the import.

    TT2

  • Lose the links to external HARD disk of

    If I import something in iTunes 12.3 from an external HARD drive, as soon as I turn off the computer, or remove the external hard drive, he'll never find the files again, even if the drive designation is the same. Why? How can I prevent this?

    Whenever I then tr to import something on my iPod, the program does not give me a warning that the files not found, instead, I drag-and - drop folders on the iPod, and the interrupted icon flashes 3 times, as it does when the transfer normally woks. If I look carefully on the row of the SECOND high, and no level of "work in progress" does not appear behind the file in the background, indicating that a transfer is in progress, then nothing happens, and no files are transferred. Then I noticed once I walk around with the camera. Given that I don't want to wait half a day for my library do a new import every time I turn on the new PC, I just use the old memory of the files, select what I want, then re - import only this folder on top the already existing folder. If I do that several times, I can finish with several times the files in the folder, all but the last loaded then have the exclamation make indicating that the file has been lost. This can last indefinitely (e.g. 20 identical files with the explanation marks and the other without if I imported the record 21 times). Of course, only the last import is transferred to the device.

    THX.

    Marmoset500 wrote:

    If I import something in iTunes 12.3 from an external HARD drive, as soon as I turn off the computer, or remove the external hard drive, he'll never find the files again, even if the drive designation is the same. Why? How can I prevent this?

    It's not quite like that. If iTunes starts up and has reason to notice that a drive where other titles are supposed to be stored is offline, then it flags those followed with the exclamation point. If subsequently put you at the disposal of the player and import the same tracks it will make fresh entries in the library for them. If you close iTunes and then reopen it, you should find that the two entries of work. The perfect way to work with iTunes is for her to have a content library internal computer discs auto if there is room, or on an external drive connected normally. and in both cases keep a backup on a separate disk. See make a split cell library for more details

    Whenever I then tr to import something on my iPod, the program does not give me a warning that the files not found, instead, I drag-and - drop folders on the iPod, and the interrupted icon flashes 3 times, as it does when the transfer normally woks. If I look carefully on the row of the SECOND high, and no level of "work in progress" does not appear behind the file in the background, indicating that a transfer is in progress, then nothing happens, and no files are transferred. Then I noticed once I walk around with the camera.

    As stated in your feed to repress 'fake' lost files transfer when iTunes is unable to do what he is asked he often fails silently. The answer is to keep your library organized correctly there is no broken links and not duplicates.

    Given that I don't want to wait half a day for my library do a new import every time I turn on the new PC, I just use the old memory of the files, select what I want, then re - import only this folder on top the already existing folder. If I do that several times, I can finish with several times the files in the folder, all but the last loaded then have the exclamation make indicating that the file has been lost. This can last indefinitely (e.g. 20 identical files with the explanation marks and the other without if I imported the record 21 times). Of course, only the last import is transferred to the device.

    When iTunes has multiple entries for the same file there is only one of them on the device. Broken entries are not copied over. It seems that you manually manage the device that takes the most effort than syncing playlists selected from a well-trained library.

    Duplicates in iTunes are usually the result of re-import content located outside the media folder where your settings allow for the songs imported to copy in the media folder. iTunes is not keep a record of the external paths, so if you add the same record twice, you get two copies. If you start iTunes with the media on an external drive disconnected, then plug in the hard drive and then add files to iTunes iTunes can contain multiple references to the same files. If the reader has several times different drive letters, or you manually move media autour, then this can lead to broken links.

    Official notice of Apple on the duplicates is here: find and remove duplicates in your iTunes library. This is a manual process and article fails to explain some of the potential pitfalls such as the lost coast and membership of playlist, or sometimes the same file can be represented by multiple entries in the library as well as a removal and recycling the file will break all the others.

    Use MAJ > view > show items to reproduce exactly to display the duplicates because it is normally a selection more useful. You must manually select all but one of each group to remove. Sort the list by Date added can make easier select appropriate tracks, but it works better when executed immediately after the dupes were created.  If you have several entries in iTunes connected to a same file on the disk hard then don't not send to trash.

    Use my DeDuper script (Windows only) If you are not sure, do not want to do it by hand, or want to maintain ratings, play counts and playlist membership. See this background thread , this post for detailed instructions and Please take note of the warning to back up your library before deduping.

    (If you don't see the menu bar press ALT to temporarily view or CTRL + B to keep displayed.)

    The latest version of the script can put away the dead links as long as there is at least a double live to merge his stats and membership of the playlist and must deal wisely when the same file has been added through multiple paths.

    You can also take a look at my comments in this thread Re: why iTunes double, triple or even quadruple songs I import there? and hhgttg27 for some more information on the Organization of the library and the effects of the different options in iTunes.

    TT2

Maybe you are looking for

  • Recent versions of thunderbird have white text on grey white or clear tabs and buttons that cannot be read. How can I fix it?

    Upgrade to 38.2.0 from the previous version did not help. I use the default theme of Thunderbird. I tried the themes of the add-on, and they are not satisfactory. I prefer vanilla, but inactive tabs at the top and the menu bar are unreadable. How to

  • Firmware for Toshiba ODD-DVD SD - R5272

    Dear support, I have a Toshiba ODD-DVD SD - R5272 installed in my computer. This drive can write according to technical specification, DVD - R, but my drive, can not because my firmware is outdated. Even after several searches online and on tohsiba-S

  • Satellite U400 - update BIOS for Vista 32 bit to Windows 7 64-bit

    I currently have Vista 32 bit on my U400. I intend to do a clean install of Windows 7 64-bit. I downloaded all the necessary drivers on the Toshiba site for the 64-bit Windows 7 update. I noticed there is a BIOS of Vista 64 bit driver. Do I need to i

  • Replace the flat sequence Structure?

    I read a bit in the forum and a lot of people discouraged to use the structures of the sequence. Here's the situation: I have a tick count at the beginning for the iteration (and another at the end). I want to force them to count before (and after) a

  • Driver IHC9M LPC Interface Controller - 2919

    Does anyone know of a 64-bit driver to Windows 7 for this (driver IHC9M LPC Interface controller - 2919) that works?  It comes to dv6t-1000 CTO Entertainment notebook (product ID FY848AV).  One located on the HP support site does not load.  I always