PNGEncodedImage.getBitmapImpl ()-> IllegalArgumentException


I would immediately suspect corruption in the transfer.  Take a very small file, send down, empty the bytes that you get to make sure they are really the same thing as you wait for discharge, even in the server.

A perhaps easier option is to do it and save to SD card, and then use the PC software to make the comparison.

Tags: BlackBerry Developers

Similar Questions

  • IllegalArgumentException in PIMItem.getString (int, int)

    int[] intarray = cont.getFields();
    for(int x = 0; x < intarray.length; x++)
    {
        System.out.println(cont.getString(intarray[x],0));
    }
    

    This is just one example of code, but it throws the same exception is my real application.  Suite is a Contact object that I've initialized from the context object in the address book.  Whenever I get to the line getString, it throws an IllegalArgumentException for anything other than the constant of PIMItem.TEL despite the fact that other objects are not null.  I develop for the Blackberry 7290 with Handheld Software version 4.1 and JDE version 4.1.  Is there a reason that I'm getting this exception?

    EDIT: Sorry, Contact.TEL not PIMItem

    You don't want to read a string if it * is * a string.  Try something like:

    int[] intarray = cont.getFields();
    for(int x = 0; x < intarray.length; x++)
    {
        if (myPimList.getFieldDataType(intarray[x]) == PIMItem.STRING) {
            System.out.println(cont.getString(intarray[x],0));
        }
    }
    
  • Push registration: (Berr java.lang.IllegalArgumentException) network error

    Hello

    We try to get WebWorks push the work but are a problem with blackberry.push.openBISPushListener. The onRegister function returns a status of 1 (network error).

    The log file shows the following:

    11/9 10:00:54 W net.rim.blackberry.api.push - Berr java.lang.IllegalArgumentException
    11/9 10:00:21 a Contapp - PushDaemon is started.
    11/9 10:00:21 a Contapp - Register push application
    11/9 10:00:21 a Contapp - open BIS push listener
    

    This application is used to work so I wonder if something might have changed in the upgrade of the server push.

    The application code is the following:

    
    
    
        
    
    
        

    And the following push configuration in the config.xml file:

    
    
    
    
    
    
    
    
    
      BIS-B
      MDS
      TCP_WIFI
      TCP_CELLULAR
      WAP2
      WAP
    
    
    
      read_device_identifying_information
      access_shared
    
    

    It is all tested on a device 9300.

    Any ideas as to why we get this error?

    Thanks in advance for the help!

    Nick

    This issue should now be resolved, please let me know if you continue to have problems with the registration with the EVAL server.

  • ApplicationMessageFolderRegistry registerFolder IllegalArgumentException

    I have the same problem Visual as described in this post solved, however my way to get there is slightly different than in my opinion. To explain, I am trying to save a folder of messages for the purpose of issuing alerts and notifications on certain events. My app is, technically, neither demand nor a UIApplication - it is a top-level class who will then create one or the other according to the entry point. My background AEP monitor is an Application and my ASP UI is a UIApplication. In other words the main function is not in a class of each types.

    I need to create an application folder in which the background AEP monitor can send messages. The folder must be registered with the ASP of the UI so that it's what opens when the dossier is typed on the home screen. I get the IllegalArgumentException When calling ApplicationMessageFolderRegistry.registerFolder and I think it is because my main application is not strictly speaking a UIApplication.

    Can anyone confirm that it is the expected exception in this situation and what I might be able to do about this please? It will be difficult for the redesign of my application at this point... I'd like that there is another solution. Here is the code that generates the exception. What is strange, is that sometimes it seems to work ok, but sometimes it does not work and I then two icons of the application in the notification bar.

    ApplicationDescriptor uiAppDesc = null;
    
    int moduleHandle = CodeModuleManager.getModuleHandle("my_app_module_name");
    ApplicationDescriptor des[] = CodeModuleManager.getApplicationDescriptors(moduleHandle);
    for (int i = 0; i < des.length; i++)
    {
        String descName = des[i].getName();
        if (descName.equals("UI AEP Name"))
        {
            uiAppDesc = des[i];
        }
    }
    
    if (uiAppDesc == null)
    {
        Debug.Log("Could not find ApplicationDescriptor for UI App entry point", Debug.DBG_NOTIFICATIONS);
        return;
    }
    
    ApplicationFolderIntegrationConfig config = new   ApplicationFolderIntegrationConfig( false, true, uiAppDesc);
    
    //Register the ApplicationMessageFolder
    //ReadableListImpl source is available in the messagelistdemo.
    ApplicationMessageFolder folder = ApplicationMessageFolderRegistry.getInstance().getApplicationFolder(AppMain.APPLICATION_ID_LONG);
    if (folder == null)
    {
        folder = ApplicationMessageFolderRegistry.getInstance().registerFolder(
            AppMain.APPLICATION_ID_LONG, APPLICATION_MESSAGE_FOLDER_NAME, new ReadableListImpl(), config);
    }
    

    It seems I have fixed this problem. The solution was to place the call to my code above inside a new workable with invokeLater. I was using an executable elsewhere in the code, that's why the problem seemed to be intermittent.

    By comparing the two code sections was the only way I stumbled upon this fix. The document does not indicate that this could cause an IllegalArgumentException thrown so I wonder now how would I know otherwise. I don't know * why * this fixes it for me... any other comments welcome!

  • Blackberry Simulator running: IllegalArgumentException

    Hello

    Recently I had to reinstall Eclipse and I when I try to run the simulator of eclipse, I get this error:

    Cannot start the Simulator. Verify that this file exists.

    (java.lang.IllegalArgumentException: name of the executable integrated quote, divide the arguments)

    If I open the plugin file and run "fledge.exe" from there the Simulator opens. This was happening to anyone else?

    Thanks for your advice,

    Ben

    I ended up reinstalling Eclipse in "C:\Eclipse\" rather than "C:\Program Files\Eclipse\" because of the white space in "Program Files". Works fine now! @Nelvin I am sure that your solution works just as well.

    Thank you

    Ben

  • TextField + NumericTextFilter = IllegalArgumentException

    Hello

    I have a text field with a NumericTextFilter

    net.rim.device.api.ui.component.TextField t = new TextField();

    t.setFilter (new NumericTextFilter());

    Let me do not allow inserting non-numeric characters, instead, when I press on a tank that is not a number, I get an IllegalArgumentException. Can you tell me how I can solve this problem?

    Thanks in advance.

    Kind regards

    Gianni.

    So you say that when your username is centered on an EditField with this standard TextFilter in place, and they type an alphabetic characters, and not a numeric characters, your program gets an IllegalArgumentException?

    To be honest I find it hard to understand.  In all cases where use filters, the invalid keystrokes are ignored.

    What I think is happening, is that you are trying to fill this field with data, so that your setText (...) is failing in this way.  As your user, when you try to put data in this area should be matching the filter.

  • IllegalArgumentException in SQLiteDemo on CodeSigningKey (int, String)

    Hi all

    I am trying to run the SQLiteDemo on my BlackBerry Simulator (5.0) (using Eclipse plug-ins, JDE). The project will build without any problem. When I try to launch the project of the Simulator, however, I get an IllegalArgumentException on CodeSigningKey.get (int, String) on line 308 of CodeSigningKey.class (whose source is not found).

    I suppose it comes from the following line of code in SQLiteDemo.java:

    // Retrieve the code signing key for the XYZ key file
            CodeSigningKey codeSigningKey = CodeSigningKey.get(CodeModuleManager.getModuleHandle( "SQLiteDemo" ), "XYZ");
    

    The values of int, String at this stage are:

    moduleHandle = 0

    signerId = XYZ

    I use the XYZ.key provided in the BlackBerry sqlitedemo.zip. Anyone know why I get this error?

    Thank you!

    My project was not «enabled for BlackBerry»

  • ApplicationPermissionsManager get "object already exists" IllegalArgumentException

    I have the following code on a storm running OS 4.7:

    Permanent ApplicationPermissions = new ApplicationPermissions();

    perms.addPermission (ApplicationPermissions.PERMISSION_INTERNET);

    ApplicationPermissionsManager permMgr = ApplicationPermissionsManager.getInstance ();

    If (perms.difference (permMgr.getApplicationPermissions () .length! = 0) {}
    permMgr.invokePermissionsRequest (perms);
    }

    When I run this code the first time I install my application, invokePermissions() throws an IllegalArgumentException, and I see a pop error dialog box saying "the item already exists."  The application seems to work normally after that.  Y at - it something I do to cause this error, or is this a bug in BlackBerry OS?

    The fundamental problem was that I wonder the thing first authorizations in main() for CLDC app with multiple entry points.  Apparently the operating system does not support multiple applications at the same time.  The solution was to take an entry point and don't have this one do the permanent checks.

  • App not install on tour: 907/IllegalArgumentException

    I have a potential user who simply can not get my KeePassBB2 app to install on a Sprint 9630 Tour (4.7.1.40).  OTA, he gets a "907 invalid cod" and from the Office Manager, it becomes "a fatal error has occurred. in updating the software of your device Please try again. "In the system log, he sees:

    Name: IllegalArgumentException
    GUID: 9c3cd62e3320b498
    Time: July 20, 2009 23:04:34
    No detail message
    net_rim_cldc-7 (4A42F4E8)
    CodeModuleGroup

    0x898D
    net_rim_bb_browser_lib-1 (4A42FE06)
    ApplicationDownloadManager
    run
    0x17D
    net_rim_cldc-1 (4A42F4E8)
    Thread
    run

    0xB3F1

    The same combination of jad/COD (compiled under 4.2.1) installs and works fine on other devices of an 8700 to 9530.

    Anyone got any ideas?

    Looks like this same user has the same problem with Docs-To-Go.  Apparently the migration done one Assistant watch something upward when it was upgraded to the tour and removing migrated versions of the software and re - install from scratch, solved the problem.

  • Eception exception: java.lang.IllegalArgumentException 9800 simluator and device

    First of all, let me say that this forum has been very useful development councils, of the examples and answers to difficult questions.  Thank you.  But now I have a problem that I can not find a solution for or to understand.

    I created an application that listens to the calls and when the call is disconnected it displays a screen, allows entry and persists the results.  I developed in JDE 5.0.0.25 and it worked fine on the Simulator.  When I installed on a Torch 9800, I get "Eception exception: java.lang.IllegalArgumentException" when it tries to display the entry screen.  I downloaded and installed the ATT 6.0.0.246 for 9800 Simulator and traveled the code.  I get the same exception on the Simulator.  It seems that he fails once the code that creates the screen is executed and control is returned to the operating system.  The code to display the screen looks like

    {Synchronized (application.getEventLock ())}
    UI UiEngine is Ui.getUiEngine ();.
    ui.pushGlobalScreen (oEFDS, 10, UiEngine.GLOBAL_MODAL |) UiEngine.GLOBAL_SHOW_LOWER);

    If the questions are

    1. any ideas why it worked in version 5 and not 6? I thought developing in version 5 allow more devices run the application.

    2. is there something specific for the Torch 9800 that may be cause of tha?

    OK, I found the answer to this problem.  Guess I should have looked before asking for help.

    http://supportforums.BlackBerry.com/T5/Java-development/differences-between-V5-0-OS-and-V6-0-OS-for-...

  • Graphics.ROP throws IllegalArgumentException

    I'm an IllegalArgumentException (with null backtrace and message) when I do the following in the paint for a custom field method:

    g.ROP (Graphics.ROP_SRCMONOEXPAND_COPY, x, y, FONT_CHAR_WIDTH, FONT_CHAR_HEIGHT, font_, left, top);

    However, the following works (though without the colorization, I want):

    g.drawBitmap (x, y, FONT_CHAR_WIDTH, FONT_CHAR_HEIGHT, font_, left, top);

    font_ is a Bitmap loaded from a custom PNG (a monospace font) file. I use the Eclipse plugin and a 4.5.0 Simulator. ROP() worked from 4.2 and 4.5 API documentation made no mention that he has changed since then. ROP_SRCMONOEXPAND_COPY is not obsolete, is it?

    Does anyone have insight into this? Thanks in advance.

    Never mind, you were right - the file PNG itself stores 1 bit per pixel, but for some reason Bitmap.getBitmapResource () that converts a bitmap with 16 bits per pixel. The documentation for Graphics.rop () does not indicate that there is a problem, and indeed it works when compiled with the 4.2 API on devices physical time 8830 and 9000. When I give a 1-bit Bitmap to Graphics.rop (), it works with ROP_SRCMONOEXPAND_COPY.

    RIM, please update the documentation of the JDE to tell API Graphics.rop () is no longer can use any image, and it will throw an IllegalArgumentException if he dislikes the Bitmap image, he is given.

  • Re: Alternative to PNGEncodedImage.encode () for the 4.2.1?

    Does anyone know if there is an alternative to the PNGEncodedImage.encode () method that can be used in 4.2.1?

    I created a bitmap of a reduced EncodedImage and now I need to save the Bitmap as a file as a png.

    I can't understand anyway to encode a bitmap in 4.2.1.

    Thank you!

    -Tom B.

    Oh, just need to search the archives for an hour, here is the solution:

    http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&thread.ID=58817

  • Puzzled on IllegalArgumentException

    Hello

    I have an app that works well on multiple devices and multiple versions of the OS, but on the simulator of the storm, I get an IllegalArgumentException in the libraries of blackberry as a field is painted.

    The exception occurs when my code for this;

    -building a secondary screen screen called "ListScreen.

    -Adds a specialized ObjectListField class called "ItemListField" with about 10 objects inside a HorizontalFieldManager

    -each object in the list field overload of toString to create a line of text... which part is wider than the screen.

    -the HORIZONTAL_SCROLL and HORIZONTAL_SCROLLBAR style bits are enabled in the HorizontalFieldManager

    Elsewhere in my application this same approach of ListScreen and ItemListField is used in a similar way, with no problems.

    I wrapped around my builders of exception handling, but nothing is taken by my code... just the debugger catches the exception. The exception seems to occur more deeply in the libraries of BlackBerry. I copied the trace at the bottom.

    I use error to isolate the problem, but I have a version which is currently controlled by this problem and it crumbles. Suggestions on the forum to assist in the resolution of the problem or the isolatiing are greatly appreciated.

    Randy

    Installation of Eclipse

    ===========

    -componentpack V4.7.0.36

    -JDE v1.0.0.50

    Trace of thread

    ==========

    Bitmap image. line (int, int, int, byte [], boolean, boolean, boolean): 550
    Bitmap image. line (int, int, int, byte [], boolean, boolean): 456
    Bitmap image. line (int, int, int, byte [], boolean): 437
    Bitmap image. (int, int, int) line: 391
    Bitmap.createScaledBitmap (int, int) line: 762
    ScaleBitmap.scaleBitmap (int, int, int, boolean, Bitmap) online: 481
    ScaleBitmap.scaleBitmap (Bitmap, int, int, int) online: 427
    Line BitmapBackground.draw (Graphics, XYRect): 193
    ListScreen$ ItemListField (field) .drawHighlightRegion (Graphics, int, boolean, int, int, int, int) line: 1463
    ListScreen$ ItemListField (field) .drawFocus (icon, boolean) online: 1326
    ListScreen$ ItemListField (ListField) .drawFocus (icon, boolean) online: 495
    ListScreen$ ItemListField (field) .paintSelf (graphics, boolean, int, int) line: 4252
    Line .paintChild (graphic design, field) HorizontalFieldManager (Manager): 2596
    HorizontalFieldManager.subpaint (Graphics) line: 245
    HorizontalFieldManager (Manager) .paint (Graphics) line: 2540
    HorizontalFieldManager (field) .paintSelf (graphics, boolean, int, int) line: 4237
    Line .paintSelf (graphics, boolean, int, int) HorizontalFieldManager (Manager): 2601
    Line .paintChild (graphic design, field) VerticalFieldManager (Manager): 2596
    VerticalFieldManager.subpaint (Graphics) online: 536
    VerticalFieldManager (Manager) .paint (Graphics) line: 2540
    VerticalFieldManager (field) .paintSelf (graphics, boolean, int, int) line: 4237
    Line .paintSelf (graphics, boolean, int, int) VerticalFieldManager (Manager): 2601
    Line .paintChild (graphic design, field) TitleStatusManager (Manager): 2596
    TitleStatusManager (Manager) .subpaint (Graphics) line: 3006
    TitleStatusManager (Manager) .paint (Graphics) line: 2540
    TitleStatusManager (field) .paintSelf (graphics, boolean, int, int) line: 4237
    Line .paintSelf (graphics, boolean, int, int) TitleStatusManager (Manager): 2601
    Line .paintChild (graphic design, field) FieldMapListScreen (Manager): 2596
    FieldMapListScreen (Screen) .paint (Graphics) line: 3556
    FieldMapListScreen (field) .paintSelf (graphics, boolean, int, int) line: 4237
    Line .paintSelf (graphics, boolean, int, int) FieldMapListScreen (Manager): 2601
    .DoPaint0 (boolean, boolean) FieldMapListScreen (screen) line: 1368
    UiEngineImpl.paintToBackingStores (line): 444
    UiEngineImpl.doPainting (line): 275
    UiEngineImpl.processMessage (subject, Message, boolean) online: 2436
    AcireJournalApp (app) .processNextMessage (Message) line: 1799
    AcireJournalApp (app) .enterEventDispatcher () line: 1043
    Line AcireJournalApp.main (String []): 47

    I found the cause of the exception, they wore the style bits being passed to the constructor of the HorizontalFieldManager.

    The following code caused the exception on V4.7 but not on earlier versions (V4.2, tested V4.6).

    HFM HorizontalFieldManager = new HorizontalFieldManager)
    HorizontalFieldManager.HORIZONTAL_SCROLL
    | HorizontalFieldManager.HORIZONTAL_SCROLLBAR);

    The exception does not occur when the code is changed

    HFM HorizontalFieldManager = new HorizontalFieldManager();

  • IllegalArgumentException encoding bmp image

    Things I have learned:

    -There are over there of the image files in bmp format in which the file size of the header field is zero.  It's legal for bmp whose field type of compression files is also null, that is, uncompressed.

    -If you load a bmp that file into a byte array and feed in the array of bytes to EncodedImage.createEncodedImage (), you get an IllegalArgumentException.

    -If set you the byte array so that the bytes that contain the file size field is estimated to be the actual size of the file, createEncodedImage() accepts the array and creates a good EncodedImage.

    I would like to know things:

    -Is a known bug in BlackBerry land?

    Is there a more elegant than my gross solution solution?

    Mark,

    I have been using an 8700 4.5.1.124, 2.7.0.92 running platform.

    I also run it on an 8830 running 4.2.2.176, platform 3.0.0.79.

    I tried earlier to run on a 8530 Simulator claiming his execution 5.0.0.337 and hey, lookit that, she doesn't get any exception.

    That's what I get for running the old stuff, eh?

    Well, DIY go that is not so painful, so maybe I'll just have to leave it as what.

    Thanks and sorry about that.

    "Too bad!"

    -Emily Litella

  • IllegalArgumentException in Resource.instantiateMIDlet, line 209

    I have a very basic application that has a single class that extends the MIDlet. When I run the application from the applications screen in the Simulator, I always get an IllegalArgumentException in Resource.instantiateMIDlet, line 209.

    Going up the stack trace I see MIDletMain.activate (), Application.processnextMessage (), Application.enterEventDispatcher () and MIDletMain.main (String [])

    I don't think that the source code of the resource class is on my machine anywhere. So I can not provide debugging much more without decompile, which I will not go.

    I use the JDE right now. Would I be able to see more if I used Eclipse or something for development?

    This is my first mobile application. So I'm a little weak on what would be best practices.

    Thank you.

    I solved this problem with the project properties.

    Give the full name of your class created MIDlet (name of class and package in dotted format).

Maybe you are looking for