|Anonymous | Login | Signup for a new account||2020-08-13 22:37 EDT|
|My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000192||JANA||Bug||public||2012-01-31 23:39||2012-03-27 10:10|
|Summary||0000192: Cannot call JApplication::Run() multiple times|
|Description||Mauri reported this in an e-mail on 1/29/2012. The e-mail is:|
Remember that issue I had with event processor?
Here's another issue (I suspect it's related)
if I have two running event processor running, the second one will not execute the "init" statement.
EventProcessor *myProc = new EventProcessor(jsOpt);
DiagnoseProcessor *diProc = new DiagnoseProcessor(jsOpt);
whatever roc I put to app.Run first on line 1 will execute. Anything on line two will not init, brun, etc.
Unless I'm doing something wrong, this looks like a bug?
|Additional Information||I have confirmed this behavior. One can avoid it by using two JApplication objects, but the code should still be modified to produce the expected behavior. This is (as he suspects) related to the problem he reported in an e-mail to me on 1/28/2012.|
The problem stems from the init_called flag being set the first time JApplication::Init is called. The flag is checked upon entry to the Init method which is called from the Run method. This does many things, including creation of the event buffer thread and calling of the JEventProcessor::init() methods.
|Tags||No tags attached.|
I attempted a simple resetting of the init_called flag at the end of Fini so that Run (and therefore Init) could be called a second time. This did not work. There are numerous variables that would need to be reset for this to work.
The equivalent functionality of calling Run twice is obtained by just instantiating another JApplication after the first one is deleted. The code was modified to print an informative message when a second call to Init is made and then throw an exception. This change will appear in JANA 0.6.4
|2012-01-31 23:39||davidl||New Issue|
|2012-03-27 10:10||davidl||Note Added: 0000325|
|2012-03-27 10:10||davidl||Status||new => resolved|
|2012-03-27 10:10||davidl||Resolution||open => fixed|
|2012-03-27 10:10||davidl||Assigned To||=> davidl|
|Copyright © 2000 - 2020 MantisBT Team|