IllegalStateEx: UI engine accesed without hoding the event lock LocalDevice.getLocalDevice)

I get IllegalStateExeption: UI engine accesed without hoding the lock of the event, when I call LocalDevice.getLocalDevice (). In the code below get following list: 1, 2, 3, 4, Exception: java.lang.IllegalStateExeption: UI engine accesed without hoding the lock of the event.

It is interesting, but this code worked yesterday.

What means this exception means and how to fix this?

The device is 8820 4.2.2.160 version. BlackBerry JDE is 4.2.1.

Thank you!

try {   testList = new List("Testing", List.EXCLUSIVE);     testList.append("1", null);     testList.setCommandListener(this);  testList.append("2", null);     testList.addCommand(Commands.CMD_EXIT);     testList.append("3", null);     display.setCurrent(testList);   testList.append("4", null);         try {       local = LocalDevice.getLocalDevice();       testList.append("5", null);         agent =  local.getDiscoveryAgent();         testList.append("6", null);         agent.startInquiry(DiscoveryAgent.GIAC, this);      testList.append("7", null);     } catch (BluetoothStateException ex) {      testList.append("Problem in searching the Bluetooth devices", null);        testList.append("Exception: " + ex.toString(), null);   } } catch (Exception ex) {  testList.append("Exception: " + ex.toString(), null); }

My application is pure MIDP. We already had for HP iPAQ application that we are porting to BB. And now we try to connect bluetooth with barcode reader. I used no debugger. I used printing in the text box after each line of code, and printing stops after LocalDevice.getLocalDevice)

Now I call the method LocalDevice.getLocalDevice () of the new thread, and it seems to work OK:

(new Thread() {}
public void run() {}
try {}
myDevice = LocalDevice.getLocalDevice ();
} catch (BluetoothStateException ex) {}
testBox.insert ("u run() Exception:" + ex + "\n", testBox.size ());
}
}
({. start()});

Tags: BlackBerry Developers

Similar Questions

  • Tap not triggered if the interaction has begun the upper bezel of the events

    Hello

    I develop a HTML5 / game WebWorks. The user must touch and move items to complete the game.

    I noticed, that when touch starts from the upper bezel and the finger moves down on the screen, no key event is fire.

    If something is near the top of the screen, it is actually quite common, the Unit considers that a key started the bezel, and the app is completely unaware on the finger movement.

    Is there a way to tell the webworks engine not to consume the events if they left the upper bezel?

    They all get fired if I touch the bezel left / right.

    I would appreciate greatly any help!

    Just as a reference: I managed to make it work, so that I have revceive touch events even if the interaction begins the upper bezel.

    I've converted the hybrid application and push touch events form cascades to the WebView control. There is a lot of work, but it can be done .

    Best regards !

  • Flashing light without the event Structure

    Hey everybody, this question should be worded a bit better than my past. I've finally finished Core 1 and 2 so now I really have a grip on what I ask. Haha!

    In any case, I have a game custom sensors that interface via a com port and a weight which is summarized output.  The weight is then put through a business structure to give different sizes "bucket".  The various cases of output values to a slider that the user sees. This is just to give you an idea of how the load is large.

    What I need to do, is make a Boolean flag that starts flashing if she sees a significant change in weight. The weight is anywhere between 0 and 20 pounds, so I thought that a change of 1 lb or more would be a great time to activate the flashing.  I also need to only flashes for a short period of time (10 seconds).

    I tried to use the structures of the event based on the cursor and a property node. I created an event based on a change in the value and put a flashing property node, but all that did was cause my Panel before locking.

    Any ideas?

    Well without seeing your VI do is to feed your weight measurement in a shift register on the right side of your loop. Take the register shift on the left side and slide it downwards. This will give you the previous iteration of displacement registry value that you can compare up to our days.

  • Does invalidate a field without a lock of the event, invalidate the field Manager?

    It is probably of a self-inflicted gunshot wound.

    Does invalidate a field without the lock of the event, invalidate the field Manager?

    In other words, if I cancel one or several fields individually, I see any changes made to the zone manager?

    Thank you.

    No, disabling the field does not affect the Manager. You must be confusing with disabling the Manager (repaint all managed fields) or make updateLayout field (including redispositions the display Assembly).

  • Oracle APEX 5 - modal Close event without sending the page

    Hi experts,

    Is there a possibility how to close the modal page using 5 APEX without submitting the page called from? (just refresh the region).

    I tried to use event close modal in the parent but to start it I have to close the modal page to redirect to the parent.

    It automatically submit the parent page.

    Concerning

    J

    Hi Patrick,

    I found the right solution for me. I left the treatment of the normal page on modal button (Submit form and option SQL INSERT). At the end of the processing of the page, I created another page dealing with DIALOGUE NARROW - one of the option in the LIST on the page that deals (no action). I created record and close modal just by using the processing of the page. In the parent page I got it before (update).

    Thank you for participation.

    J

  • Commons of edge SVG - how to reference an SVG element directly without a click or mouse over the event?

    I went through this tutorial to interact with the SVG files...

    http://www.YouTube.com/watch?v=4UEB6gaLKuw

    .. .and it was great. The example worked perfectly, and I was able to replicate the functionality in my own project.

    However, the example requires that there is a "select" event in the SVG file and an event listener in the Edge file animate. I'm dealing with a slightly different scenario, and I would like your help to understand.

    I have a card SVG of the USA, and when loading the map, I would like each State (separated in the SVG elements) color differently based on the data in the file Edge animate. Copy the following code in the tutorial refers to an element when it is passed in the select event...

    EC. . Done () SVG.accessSVG (sym.$("USA_Map_blue2"))

    {function (svgDocument)}

    Add the event listener

    svgDocument.addEventListener ("select", {function (event)}

    Remember selected state

    sym.setVariable ("selectedState", event.target);

    Show selected state

    SYM.$("selectedStateTxt").html (Event.Target.ID);

    });

    }

    );

    .. But how can I make reference to an SVG element directly on load without an event trigger?

    I thought about using something like:

    Penn var = svgDocument.getElementByID ("pennsylvania");

    $(penn) .css ("fill",("#00ff00"));

    But this doesn't seem to work.

    Your help is greatly appreciated!

    Hi Fred,.

    Thanks for the comments. You can use jQuery to put the hand in of the SVG DOM as well. Here's an example of my next side project animate Cookbook (will be published shortly on EdgeDocks.com). It shows an interactive map of the United States.

    The source code looks like this:

    It's basically simple jQuery with a context (the context of the SVG document).

    You can use something like this to access nodes (for example the path) in your animated model:

    $("path",_svgDocument).css ("fill", "#770000");    changes the color of all THE nodes in the path

    $("#some_id",_svgDocument).css ("fill", "#770000");    changes the color of a specific id

    I hope this helps. If you like my work as open source, please spread the word

    Simon Widjaja

    Adobe Certified Expert (ACE)

    Adobe certified instructor (ACI)

    ++++

    EdgeDocks.com - all Edge: tutorials, components, Extensions

    ++++

  • migration of events imovie to new Mac without using the Migration Wizard

    Hello

    I want to do the following:

    Migrate from iMovie events of an old MacBook Pro (10.6.8 Snow Leopard) created using iMovie ' 08

    TO

    (Yosemite 10.10.5) iMac with iMovie 10.1.1

    All events are stored on 3 external drives (Nothing on the internal drive of MBP). Disks have FireWire interfaces, I can't connect them directly to the iMac.

    The destination is another external drive, with Thunderbolt interface. I copied the serious events in 3 separate directories, but not tried opening them with iMovie. Wasn't sure if there was data stored elsewhere (in ~/Library for example) that might be needed; In addition, I didn't know if I could manually merge the 3 separate records events iMovie with the Finder, or need to do somehow with iMovie.

    I manually moved everything some time ago - I haven't used Wizard migration; I didn't have enough disk space attached to the iMac when I moved everything, so I carried on using iMovie on the old MBP.

    I googled and read several articles on the events to an external drive / to new Mac, but none of them totally covers my starting position and desired end result.

    Would appreciate any insight how to go on this issue, and how and where exactly iMovie keeps all the data you need.

    The articles are (among others):

    https://support.Apple.com/en-us/HT202853 "update of projects and events from previous versions of iMovie in iMovie (2014).

    http://help.Apple.com/iMovie/#mov3ac6d42c "copy or move a video in your library of events to an external hard drive.

    https://support.Apple.com/kb/PH2302 "iMovie 11: copy or move video from your library of events to an external hard drive.

    https://support.Apple.com/en-us/HT203049 "move your iMovie for Mac library (2014).

    If your iMovie ' 08 projects contain media from outside the record of events (for example, from iPhoto or iTunes) then we must first using iMovie ' 08 on your old computer to "consolidate" your support so that everything is copied in the events folder.  Details for the iMovie 11 version can be found at: http://help.apple.com/imovie/#mov3ac6c7c9

    I don't have the ' 08 version help files, but I think it will be the same - you can check with your old Mac.

    "Disks have FireWire interfaces, I can't connect them directly to the iMac.

    FireWire adapters Thunderbolt are available for about € 30, which would use these drives on your new Mac.

    In fact, you can copy the project files and events with the viewfinder of an old external drive to the root level of the new new external drive (which should be Apple - formatted), but it is probably best to do from in iMovie ' 08, as described in the help of Apple.   Do 'copy' and not 'move' - this way you always have a backup of the original on the old disks in case of problems.

    I would like to convert the project files and the events of each of the 3 discs one at a time, creating 3 libraries separate iMovie 10.1.1.  You can always rearrange these in iMovie 10 after you have everything updated and verified.  Some people have reported the update of blocking process at any given time, so update in small batches of events and projects is much better than trying to do everything at the same time.

    In fact I would try to first simply copy one (or a small group) project and its events associated with the new external with iMovie ' 08 HD then update to ensure that it will work - from iMovie ' 08 for iMovie 10.1.1 is a big jump.

    Good luck!

    Geoff.

  • Structure of the event without user interface

    I tried a quick and effective solution for a structure of event that is not a case of timeout and is part of a vi that has no user interface, but I have sent configuration data to the structure of the event.

    Let me be more clear: I have a camera that generates several events taken by a loop with the structure of the event inside.

    The provider of the camera give me this example of Labview code with all the events I'm interested and how they are implemented. I should mention that when you write a command of camera that a response to an event, but when you connect first to the camera there are more than 100 events generated by the latter, or when you download camera there are also several events. When there is no communication to the camera, the structure of the example event is inactive. The example includes a user interface to change settings and the program responds very well.

    I have to integrate this camera in great demand in which camera photo will be configured in a pragmatic way with number of the type of user interface in the example given by the manufacturer of the device.  First, I tried to design a loop with timeout cases in which a queue can send the data to the device setting configuration. Everything is good until the download when code needs to hold events in a certain way; in my case, an event is taken another goes to the time-out period and so on. After two sets of 100 images download, during the third round Labview gets blocked (Labview not responding) and I have to kill Labview. I got designer of the camera that if camera events are not taken they are kept on a pile and when the battery is full causes the Labview locked.

    Maybe I give too many details, but the question is: how to communicate with a struct event that is not a case of timeout and does not part of a user interface vi (it doesn't have a sign in my application)?

    Oops... Sorry about that.  I've attached an example what I'm talking about here.

    -Austin

  • Time after the event, without blocking the user

    Hi, I am creating a software to control a power supply. One feature that I have bad to add is a timer.

    I have a structure for the event that fires when the user clicks on the buttons, which most slowly increases the current for a period defined by the user. I want the timer to count so far defined by the user of time (in seconds) after the event fires. One thing, however, is that I need to be free to trigger another event (which stops the power supply in an emergency) so I can't have this synchronization process lock me up for snap buttons.

    I was experimenting with the millisecond timer, as well as with a loop that goes through with a defined time interval, but it is not quite give me the functionality I want. (I've been placing these loops of timing outside the structure of the event to other events run yet, but I want the timer to only is triggered after an event is triggered, is it still possible?)

    If you need more information, just ask, thanks!

    Thnigs to do to dramatically improve your code:

    You need not separate loop.  Put your code from timer inside the structure of the case of timeout event.  Set the time-out to 50 instead of 500 to match what is in your separate loop.  You can get rid of the becaue of queue, it is no longer necessary.  Create registry to offset on the main loop.  When the event occurs to start timer, pass the time for the shift on the right side register.  Wire the shift register on the left side in the event of timeout to use its value.  BTW, the shift in your separate loop register is used to nothing because you do not change the value on the wire.  Don't put all the loop in the case of timeout, get rid of the loop and just put the code of the loop, with the exception of the EndTime variable that can be removed and 50mS delay, which can be removed.

    Put the Boolean value of early Inc. inside the case to start Inc. value change event.  Same for all Boolean values.  Put them in their cases of particular event.

    Get rid of local variables now.  You'll race conditions if you do not, you doing wrong in that you don't need especially now.  Look at the current limit control.  Add a wire from the control of the current limit to where feeds the local variable of the current limit.  Delete the local section.

    Move all the controls from the inside of the structure of the event outside the structure of the event, but still within the main loop.  Wire controls where they are going.  Now you can eliminate all local variables of thos and just wire from control where they are needed.

    All outputs error.  One is enough.  Create an error in your front panel.  On the block-diagram wire the error in the first function of Sorrensen before the loop.  Where the error from the Sorrensen hit the loop function, change the terminal on a shift register (right click and select replace with shift register).  Move the error Out 2 to out of the loop on the right side.  Error 2 wire the register shift on the right side.  Everywhere, you need a mistake in, branch off the error in the thread because it is in the loop.  Wire all your outs of the error in the case of the event and the last Sorrensen function to a function of merge error.  Wire of this error on the shift register.  All your errors are combined in a single indicator.

    That should do for now.

  • Update the reference in the structure of the event

    Hello

    I would really appreciate if someone can help me with the next issue:

    I have a main VI with the structure of the event in the while loop.

    There is a case of a button initiating the Subvi, which extends an engine.

    To stop the loop inside the Sub - VI I pass a strict type reference him out of the main façade of VI.

    The problem is that in the event structure is not updated to reference, i.e. on press the abort button I can't stop the engine.

    The strange thing is that, without the structure of the event (only in time loop) it works. I try to put the button on the outside another loop: it does not depend on it. Without the structure of the event - everything works.

    LabVIEW 2012 32 bit

    Thanks in advance,

    Dirs

    You have the checkbox in the case where the matter set to Lock the front until the end of the case of the event?

    Is the case of the event start quickly, or is it stuck in the Subvi?

    Have you put in custody and recommendations for using events in LabVIEW - LabVIEW 2013 help ?

  • Structure of the event does not run

    Hello

    I have a Board who I am control with loop open using a stepper motor system.  I want to run some tests to measure to what extent and how constantly the motor can move the stage.  How my software works is that I give the engine a position (number of steps), then it runs until it reaches this position.

    The motor itself and then I want to set up a structure of event so that I can give different commands without having to restart the program each time.  The three cases, I want to implement are:
    (1) giving the engine a new job to run

    (2) telling the motor home again

    (3) stop the program at any time

    I watched tutorials on the structure of the event and cannot for the life of understand me why it won't work.  The motor houses himself, enters the while loop and just stays there.  When I change the values, nothing happens.  Can someone help me understand this?

    Riche29 wrote:

    Thank you for the answers.

    Would not has to do with the fact that I do run my software on a myRIO and not my PC, doesn't it?

    Yes, yes it would be.

    The myRIO is an on-Board Unit and has no video output, and therefore is not a concept of events based on user input.  I've never used a myRIO but I figured, would not allow even you put code on the myRIO if we used a structure of the event, but I guess you can have user events so maybe that's why no error was thrown.

    The code runs normally on Windows where I tested it.  I had to disable parts of the House and run the routine because I don't have the myDAQ or myRIO software installed but the structure of the event worked as expected.

    As for the change of Position value, the witness must be in case of structure, not only in the while loop.  If it isn't then you will read the last value not a new one.  You were probably just changes to test things because in the images you posted it was in the case of structure.

  • No start page, Google rises and there is no way out without using the Task Manager.

    I used to get the Google search engine at the start of Firefox, with bookmarks bar in side bars and tool at the top. Now, all I get is a Google search page, with a few buttons on the top like images, etc. There is no way to close the program without using the Task Manager. I downloaded the latest version of Firefox and installed, but the problem has not disappeared. Operating system is Windows XP Professional

    Make sure that you run not Firefox mode full screen (press F11 or Fn + F11 to toggle; Mac: Ctrl + Shift + F).

    It is possible that the screen is too wide or too high and bars scrolling down.

    • Use Restore or expand in the context menu of the taskbar icon to set the focus to the Firefox application if you do not see the window of Firefox.
    • Open the system menu of the window of Firefox via Alt + space and see if you can move and resize the window (use the arrows on the keyboard).

    If it works, then first close all other open windows of Firefox and then close Firefox via "file > exit/Quit" to save the setting.

    If the above didn't help then see:

  • using the structure of the event in the LabVIEW classes

    Hello

    I'm new in the use of LabVIEW classes, so don't know much how I can use them.

    In my main program, I have clusters with five elements in each. The elements are controls two States and in some groups, there are three States controls. The user will press the buttons (controls), and different things will happen. In my first program were I not using classes, I had a structure of the event and the controls were cases of event in the structure.

    Is it possible to somehow use an event of cases in one of the methods that is created in the classes, so that say, that's not in the main program?

    I have attached two photos: I wanted to have a structure of the event in servoTouchEvent (in left.tri.lvclass) who is a child.

    Let me know if my explanation is not clear.

    Grateful for the help!

    Hello

    Yes, you can have a structure of the event in a Subvi rather in your main VI of top-level UI. The trick is to use the 'Save for events' and passing in references to orders that you want to have the event trigger structure for. The refnum output since the function is entered in the terminal of dynamic event of the structure of the event who could live in a Subvi. You can add instances of event where you will see these control events as dynamic events then you can do something with. These excerpts from shows all the code in a simple diagram, but the stuff in the structure of disable diagram could easily transformed into a Subvi:

     

    All this can be done without classes. What will buy classes you include the ability to encapsulate your screws and also perform different code based on what object on the hierarchy of the parent-child classes is on a wire. If the behavior of your code is different between 2-3 State and controls (which I do not know what state controls 3 you are referring), you can take advantage of the classes.

  • Control the Structure of the event with text file

    I'm new relativaly in LabVIEW (experience only about 2 weeks). I am currently control a stepper motor using a structure of the event. Similar to the sample code given by LIFA, I entered my settings how the engine not move away, then press a button on the windows before, and it works this way. I also have other equipment that works as well in LabVIEW, as a transnational step; all components operate individually.

    Now, I'm trying to make the more automated system and to ensure that all the different equipment work in the same code. So, I tried to implement a structure of the event using a text as an input file to try to control events. The text file has a table 1 d of numbers going down vertically (only the line numbers change). So, I used a table of index function to take the numbers one by one, use a loop (while loop in this example) to go to the bottom of the column of numbers. However, the event not register the change, even if the indicator shows the value is changing.

    Attached, it's my test code and the text file that I use to try to control the structure of the event. Please let me know what I am doing wrong. Thank you.

    Oh, now I understand what you tried to say. I'm using a loop and a case structure to activate different events with the entries in the table. I thought case structures and event were the same, but you taught me the event structures are used just for the façade stuff. Thank you all!

  • The call of a Subvi without stopping the execution of the main thread

    Hello everyone, I have a rather simple demonstration VI, which opens a menu where the user can call a few screws, signal generation, reading and analysis, each contained in a Subvi and with their own front panel and chart controls. The idea is user just click a button and the required Subvi is in charge, I use a structure of the event to ease.

    Problem is, after I opened an option, said Subvi hogs the thread of execution and does not allow for new bodies until it is closed (this is inside a while loop it is so logical, I guess), the queue of events and the next before Panel charges only after that I have stop the Subvi. I would like to be able to simply open the front panels and let them run in parallel, without them in the meantime another at the end, is it possible?

    natasftw is right.

    A high school is a "hole" in your main panel.  You "insert" a separate VI in this 'hole' and then you see the Panel of VI inserted through the hole and mouse clicks through the hole of the Subvi below.

    You will need to run the Subvi separately, even if - by inserting just can't run.

    Aynchronous call will begin a Subvi running and then return to the calling thread with the Subvi running in parallel.

    You can then insert the Subvi in a secondary, or let it have its own window, as you choose.

    There are examples of both techniques.

Maybe you are looking for

  • How to remove the 20-20 for the web 3D viewer

    I downloaded a Viewer for Mozilla Plugin Web - v 5.0.94.0 20-20 3DI don't think I'll be using it and remove it. I have turned off, but it would be rather remove completely. Thank you

  • Satellite P855 - function keys do not work after the upgrade to Windows 10

    Function keys do not work after the upgrade to Windows 10I know that I need two drivers (Flash cards support utility) and (Toshiba function Key Utility), but on the page download Toshiba is not suitable for Windows 10.Anyone know when and if it will

  • Two AOL on Apple Mail accounts

    I created two accounts AOL on Apple Mail.  A single account will continually fail to connect and retrieve the mail and requests that I re - enter my password, I have repeatedly entered correctly without result. iMac 5K end 2014 8 GB - OS X El Capitan

  • XY Graph-Y-scale visible on the scale of Y corresponding watch still false Max and Min

    Hi guys,. I use the XY graph to display the data with 3 Y-scales. When I put any scale Y property visibility to False, its display even the Y scale Max and Min range lines in the plot area of the chart and cross line or additional parallel line with

  • copper MXI noise immunity

    Ladies and gentlemen, Advice me please on the copper MXI link noise immunity. that is, crashes to the top or other problems with it