Thread problems
I'm trying to start a thread after clicking a button from settings in the threads of editfields that are on the page.
The thread is used to access a php script that checks the values on a data base.
This causes the Simulator just close, no error nothing:
final EditField login = new EditField("Name: ", "", 20, EditField.EDITABLE); final PasswordEditField password = new PasswordEditField("Password: ", "", 20, EditField.EDITABLE); ButtonField submit = new ButtonField("Submit"); FieldChangeListener submitListen = new FieldChangeListener() { public void fieldChanged(Field field, int context) { String name = login.getText(); String pass = password.getText(); LoginRunnable log = new LoginRunnable(name, pass); Thread th = new Thread(log); th.start(); } }; submit.setChangeListener(submitListen);
Is there a better way to do it?
Hello
Add debug output and debug your application to find the code that kills the Simulator.
Maybe then you will find the problem.
Kind regards
Jochen
Tags: BlackBerry Developers
Similar Questions
-
I call a thread class that receives an object (Almond), so that some variables can be written to the class for use later in the application.
I've been this debugging for hours but cannot get anywhere with it.
Basically the faulty code at line 13 on below the class level, the debugger written «Source not found - change the Source search path...» "And in the debug window, he says that there is a problem in sms_listener_thread.
(line): 307 sms_listener_thread.
(kernel) line: 13 screen.
(line): 24 ...
...
...
The debugger is not what anyone in the run() method, seems to fail on line 13:
public sms_listener_thread(kernal kernal1){
I've included both the sms_listener_thread class and the screen so you can see what is happening.
I ' t probably something to do with the way things are called
Thanks in advance
import java.io.IOException; import net.rim.device.api.ui.component.*; import net.rim.device.api.ui.container.*; class screen extends MainScreen { public kernal kernal; public screen() throws IOException { super(); System.out.println("DEBUG: Screen Loading"); LabelField applicationTitle = new LabelField("Test"); setTitle(applicationTitle); RichTextField helloWorldTextField = new RichTextField("Main Screen"); add(helloWorldTextField); this.kernal = new kernal(); sms_listener_thread sms = new sms_listener_thread(this.kernal); sms.start(); //sms.stop(); kernal.send_info(); } public boolean onClose() { Dialog.alert("Closing Application"); System.exit(0); return true; } }
import java.io.IOException; import javax.microedition.io.Connector; import javax.microedition.io.Datagram; import javax.microedition.io.DatagramConnection; public class sms_listener_thread extends Thread { private boolean _stop = false; private DatagramConnection _dc; kernal kernal1; public sms_listener_thread(kernal kernal1){ this.kernal1 = kernal1; } public synchronized void stop() { _stop = true; try { _dc.close(); // Close the connection so the thread returns. } catch (IOException e) { System.err.println(e.toString()); } } public void run() { try { _dc = (DatagramConnection)Connector.open("sms://"); for(;;) { if ( _stop ) { return; } Datagram d = _dc.newDatagram(_dc.getMaximumLength()); _dc.receive(d); String address = new String(d.getAddress()); String msg = new String(d.getData()); System.out.println("DEBUG: sms_listener_thread Message received: "+ msg); System.out.println("DEBUG: sms_listener_thread Message from: "+ address); this.kernal1.destination = address; this.stop(); } } catch (IOException e) { System.out.println("DEBUG: sms_listener_thread Cannot open SMS connection"); System.err.println(e.toString()); } } }
Bump
Any thoughts or do you need more information?
-
Thank you all, I can step vy
as the last message
I want to get the image to the server
simply, I just tested the 17times loop
while( i++ < 17) { Field imageField = new WebBitmapField(url) //Coderholic - Blackberry WebBitmapField add(imageField); }
He comes back: too much wire errror
I finally found "a single application can create up to 16 sons."
where should I turn off the wire in webBitmapField
For each field, this class creates a new Thread that does not close until the image is uploaded or it encounters an error. You can't 'turn off' the thread. In the event where you start your loop with i == 0, the problem is that you create 17 WebBitmapFields and thus too many Threads, basically all at once.
I suggest you to write your own worker Thread that will load the images one after another. Once finished, he can remind the event with a Runnable thread to create normal BitmapFields using images (for now). (If not, he can do that for each image as it comes.) You can use pieces of the WebBitmapField code as models for your own thread. (After all, Coderholic wrote: "Do not hesitate to use," then go for it!) )
-
OBIEE hit 11.1.1.7 thread problem
Hi all
How to check thread hit problems.
It records any newspaper on biserver journal about Struck threads
I checked the console > biserver > tab followed, but I see none here
Help, please
in the paper, in my view, that this occurs when the bisystemuser password is out of sync because users won't be able to connect then you will see these errors
SecurityService::assertUserWithLanguage [OBI-SEC-00015] could not find the user in the identity store
[2014-05-19 T 18: 39:41.482 + 02:00] [bi_server1] [WARNING] [OBI-SEC-00046] [oracle.bi.security.service] [tid: [ASSETS].]
but I think in your case, users can connect to the right? the only thing is, it crashes when executing the graphics? Have you try applying the latest patches? This phenomenon happens for only one report/chart or for each graph u run does crash?
you have all implemented in it outside the default authenticator LDAP authentication?
-
duplication Oracle10g tnslistener thread problem
Hello
Database: Oracle Database 10 g Enterprise Edition Release 10.2.0.1.0 - 64 bit Production
System: IBM AIX 5.3 64-bit
I have a strange problem.
Sometimes, I find that my service cannot create a new connection to the database, and all existing connection without problem. I think that it maybe something wrong with tnslistener, so I order of aix and the type of connection, here is the result:
bash-3. $00 ps - ef | grep tns
Oracle 581872 1306654 0 19:42:34 - 0:00 /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr EARPHONE-inherit
Health 1278132 1314848 0 09:44:11 pts/2 0:00 grep tns
Oracle 1306654 1 0 Nov 02-0:16 /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr EARPHONE-inherit
There are two tnslistenre thread system! Why? And the thread with 581872 pid unwanted forked by the thread of origin with 1306654 pid.
I kill him:
bash-3. $00 kill-9 581872
Now, everything is ok.
Any advice will be helpful for me.
Thank you.
See Note MetaLink #340091.1
Set SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER = OFF in the listener.ora and rename ons.config in $ORACLE_HOME/opmn/conf, if it is not used
OR
apply Patch 4518443
OR
upgrade to 10.2.0.3Hemant K Collette
http://hemantoracledba.blogspot.com -
Thread problem - after getting thread information, not able to change the main screen
Hi all
I'm new BB please help me in this issue
It is that I have a few options in the menu when I click on the first menu. A thread calls its responsibility is to obtain the list of records and change the field with the new record to the screen, but after obtaining records from the internet, I try to extract the field on the Edit screen but application gives null pointer exception.
in simple words how to change the field of screens according to new information.
Thanks in advance
To expand a little more on this answer, only the user interface thread can access the user interface.
The API provides several methods to the user interface to perform this work, or to synchronize a different thread with the UI thread.
See UiApplication, invokeLater (), UiApplicaiton.invokeAndWait (), UiApplication.getEventLock)
-
What happened to the thread problem light red import screed?
I was about to buy the ambient light for use with my items 11 and found this very interesting thread. Where at - it go?
SG
Hoping that you will read this thread, please emply some of your messages to your private Message Inbox so that messages from our private for you are not rejected because your private Message Inbox is overflowing.
Thank you.
RTA
-
Thread: Problem of development: I have 1600 line query
The problem of development: I have 1600 line queryy but report generator 1320 lines. But I m cannot create views because many parameters is used in it please give solution how can I paste line 1600 report bulder.Yet once, by using functions to replace subqueries or views seem to average achievable.
-
Problem with window painted and scrollbars when editing (LabVIEW 8.0.1)
I'm under LabVIEW 8.0.1 in Windows XP SP3. For my main VI, I came across a strange problem about 5 months ago. The front window - both in edit mode and run mode - arrested repaint itself on the right side which is no longer visible when you scroll from top to bottom, but also visible overlapping Windows. Coinciding with the repaint problem, both bars scroll search disabled grey arrows and no boxes in the bars that you can click and drag to scroll the window. The scroll bars work still partially if you pass the mouse over it and roll the mouse wheel but does not work by clicking and dragging.
The façade has a lot of controls and indicators, including containers of tab control and is greater in the horizontal directions and vertical so the two scroll bars must be active. But I deleted everything in the Panel before and everything in the schema and the problem persists. If the problem is not directly related to a control/led display.
I saved the simple VI to this problem (using a line of large text and a high box rounded to test), and then created a new VI and copied the two elements at the new VI. This new VI didn't paint it and the problem of the scroll bar. The two screws are slightly different in the memory usage and the revision number (bad is review 1785 and the good is revision 3), but otherwise the two screws are identical. I have attached two screws at this announcement. When you first open the bad VI, you will see the scroll bars disabled while the good VI has active scroll bars. To replicate the repaint problem, scroll the window up and down with your mouse wheel. If it's good when you first open the VI, click on another window, then click on the window of VI and try again the mouse wheel. This by clicking sur-loin-and-return always causes the problem of repaint for me. I tried the screw on two different computers, both running Windows XP SP3 and LabVIEW 8.0.1 with identical results.
Here's what I discovered simple troubleshooting with the screws:
always off scroll bars
* repaint the problem in the main window for larger then 680 pixels of window widths
* repaint the problem in the menu bar of the main window for widths of more than 646 pixels
* entire window becomes disabled than 1348 pixels window width
* can paint window minimize and restore, but only repaints only once
* scrollbar boxes sometimes flicker in the display, but then disappear
* Scroll left and right hovering mouse over the bar and horizontal scroll by using the mouse wheel
I found something similar on this forum (thread: problem with refresh of façade)-it could be linked to the CAR on the Panel being offset internally. I don't have access to LabVIEW 8.5 or later and do not plan to upgrade - I have not tried the trial version, as this user has done. I could try to copy and paste my set of the block for a new VI diagram but the VI is so important I'm afraid something would break, plus I don't want to do it again in a few months. The problem seemed to occur after a certain number of stops (or revision number). I save copies of backup often and when the problem first happened, I was able to go to a previous version, make the missing changes and save it without any problem, but this only delayed the problem and he came later. It is therefore perhaps the revision number. It seems not related to a change or a particular addition in the front panel and the graph.
The attached picture shows the repaint problems and scroll bar in bad VI.
This raises a question I have - if this problem is a bug has been fixed in 8.5 and later, is it possible to apply bug fixes for older versions? Or what I need to pay for an update fix these bugs?
Seems that something got corrupted with this VI. Things to copy on a cool VI and things should be OK.
-
Update of the problems after the installation of July 2016
I've just updated Lightroom using the update of July 2016.
I then went to Edit/Preferences to see what setting the GPU, I had and the suspended system. I rebooted my computer and tried the same thing again. Hooked again!
Hi Yar.Dranrab,
Please follow the suggestions mentioned in this thread problem with preferences and let us know if this helps.
Kind regards
Assani
-
Nikon D500 NAVE High ISO NR problem with the LR [double wire: locked]
Hello
My setup is D500 (firmware: C1.01, LD2.013) + LR v6.51.
I pulled two photos of test ISO = 25600. One with NR off and a NR = norm. Of the LCD screen, I can say that each NR is noisier.
Guess what? previews of these two files are the same in LR, i.e., both are very loud. The output files JPEG (with the default expansion parameter and no reduction of noise in LR) are also very loud. Two 10 MB JPEG files are only 2 bytes off the coast!
However, using Irfanview 4.35 directly display both files NAVE works as expected. In other words, the NR = norm is cleaner.
Obviously, LR v6.51 ignores parameter NR of D500.
If anyone can check this?
Thank you!
Steve
[Read https://forums.adobe.com/docs/DOC-7273]
[Moved from the living room Forum to forum specific program... MOD]Duplicate thread: problem of LR with Nikon D500 NAVE High ISO NR parameter
Kind regards
Mohit
-
I just bought (got free, rather) a new contract with AT & T and the Backflip refurbished. I was previously on the go phone prepaid service. I read a lot of threads problem concerning the backflip and am worried now to get this phone. Should I worry that I will be one of the unlucky ones who has problems with him? I know that most people do not come to a forum to praise of a carrier or the manufacturer but by seeing so many discussions about the problems with the backflip makes me tired. The phone has not delivered yet because of the holidays and I should receive Tuesday if it ships Monday. I had one night free shipping. Woohoo!
In any case... I hope that I have no problem with it that I came across some bad phones in my day. I was happy to get a phone screen touch android * with * a hardware keyboard. I hope I won't be disappointed... Your thoughts?
Brittany
He is not a bad Starter android smartphone, but you want more from your phone you end up pushing to its limits and started having some problems
-
Update of address of the card "shared Variable.
Hello Experts!
I have a question about shared variables:
Now I create a variable Shared (81O_G01) in the library, and it is related to:
My Computer\SVCREATION.lvlib\Modbus1\410611
Question is: How can I change this address SV (410611) when tha variable has already been opened? is this possible?
Thanks in advance!
Anibal
Hey Anibaldos,
Looks like you're trying basically change the binding of a /A1 to
/A2 variables at run time. I think that there are a few options for this: (1) in LabVIEW DSC, you can access a hosted variable and change the link address by using a property node. If you run the server modbus on a windows machine, this is the best option. Otherwise, I'm guessing you don't have a DSC. If this is the case you can always edit links by editing the library manually, but it seems that this will not help you.
(2) it may be possible to open a variable connection shared using pallets (Data Communication > shared Variable) to this specific address, to which cases you have no need to use the shared variable. You can simply open a connection to two addresses different modbus and read one or the other as needed.
(3) if #2 does not work, then I think you can still use datasocket API to perform such an operation. There is a bit of research you need to do to use it (for example, URL editing and UI thread problems), but it does not work. In my opinion, this is the approach taken by this document: https://decibel.ni.com/content/docs/DOC-13508 (I know from experience, you have to dig a little to find the screw, but they are there).
(4) you can use the Ni Labs library: http://ni.com/labs
-
ObjectDisposedException with ChartCollection a WPF chart
When I start the following program (WPF. net4.0, NI.common (13.0.40.190), OR.) Controls.Graph (13.0.40.242)) I get the following in the debugger error message
ObjectDisposedException was not handled
The data store has been modified.
Name of the object: ' Buffer'. Source : NI.Common
I have a device class that generates some milli seconds of random data. I inform my main class through events and then pass the values via the parameter.
XAML I bind the data graphic to a ChartCollection as follows: (the bold lines are the most relevant)
The error occurs only when the time of my data provider crosses a certain threshold.
500 ms - all right
200ms - works ok, but hangs at the exception, when I change the size of the window
20 ms - always ok
10ms - crashes instantly with the exception
{
Data = new Data();
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged (string propertyName)
{
var Manager = PropertyChanged;
If (Manager! = null) Manager (this, new PropertyChangedEventArgs;
}
Private ChartCollection_chartCollection1 = new ChartCollection (1000);
private ChartCollection= new ChartCollection _chartCollection2 (1000);
private ChartCollection= new ChartCollection _chartCollection3 (1000);
private ChartCollection= new ChartCollection _chartCollection4 (1000); public ChartCollection
Chart1
{
get {return _chartCollection1 ;}
set
{
If (_chartCollection1.Equals (value))
{
return;
}_chartCollection1 = value;
OnPropertyChanged ("Chart1");
}
}
public ChartCollectionGraph2
{
get {return _chartCollection2 ;}
set
{
If (_chartCollection2.Equals (value))
{
return;
}_chartCollection2 = value;
OnPropertyChanged ("Graph2");
}
}
public ChartCollectionGraph3
{
get {return _chartCollection3 ;}
set
{
If (_chartCollection3.Equals (value))
{
return;
}_chartCollection3 = value;
OnPropertyChanged ("Graph3");
}
}
public ChartCollectionGraph4
{
get {return _chartCollection4 ;}
set
{
If (_chartCollection4.Equals (value))
{
return;
}_chartCollection4 = value;
OnPropertyChanged ("Graph4");
}
}public Window1()
{
InitializeComponent();GraphView graphView = new GraphView();
ContentControlGraph.Content = graphView;
ContentControlGraph.DataContext = this;data.dataReadyEvent += dataEventHandler;
Closing += MainWindow_Closing;
}Sub MainWindow_Closing (ByVal sender As Object, e CancelEventArgs)
{
data. Stop();
Environment.Exit (0);
}' private void ButtonBase_OnClick (object sender, RoutedEventArgs e)
{
data. Start();
}private int j;
' private void dataEventHandler (object sender, EventArgs e)
{
j ++ ;
If (j == 1)
{
Graph1.Append ((double[]) sender);
}
Else if (j == 2)
{
Graph2.Append ((double[]) sender);
}
Else if (j == 3)
{
Graph3.Append ((double[]) sender);
}
on the other
{
Graph4.Append ((double[]) sender);
j = 0;
}
}
}The exception occurs in the DLL, so I can not catch it either.
I think that you run in the multi-threading problem described here: could not get Graph.DataSource to work in WPF, I (thread problem?).
In short, your chart add calls must be marshaled to the user interface thread.
-
Error number: 0 x 80240036 appears when I start updating windows
Dear Sir.
When I started to update windows, after selecting the EXPRESS, the message is given as 'the site has encountered a problem and cannot display the page you are trying to view. The options provided below may help you solve the problem. «with the error number 0 x 80240036.» So I can't update my windows professional. PL. send the solution.
Hello
I found a solution for you in this thread:
In short, you need to install XP Service Pack 3.
If this solution does not help you please let me know.
Kind regards
Joel
Maybe you are looking for
-
Firefox will not npr Media Player launch
Firefox 27 on Win 7. I found that the only way to solve this problem of not being able to launch the npr media player is to reinstall Firefox. I wouldn't do it. What are the possible solutions? When I click to listen to a program that does nothing. T
-
Screen touch Portege 7020ct not workin with XP
Hey I got a computer laptop touch motion of 7020ct of a companion and it had windows 98 on it and the touch sreen worked well, but he had a load of stuff away I wanted not so I installed a new copy of windows xp pro top, but now the touchscreen does
-
FaceTime do not receive calls on Mac Book 12
I have a Mac mini that is on an ethernet connection and a macbook. I signed up with my identifier apple on both devices. I can make FaceTime calls on the two device but I can't receive calls on my macbook 12 - I can't on the mac mini - it sounds but
-
When I print color prints that prints the first half okay, but the other half prints in a pink color.
-
XP Pro shortcuts do not work after the removal of virus
had a virus (XP Internet Security 2011), cleaned and ran cc cleaner - now the shortcuts don't work unless I right click to uncheck the option «protect data...» "under the currently logged-on user account, or choose 'run as administrator '. Also if I