MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000192JANABugpublic2012-01-31 23:392012-03-27 10:10
Reporterdavidl 
Assigned Todavidl 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Summary0000192: Cannot call JApplication::Run() multiple times
DescriptionMauri 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);

1 app.Run(diProc);
2 app.Run(myProc);

    delete myProc;
    delete diProc;


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 InformationI 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.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000325)
davidl (administrator)
2012-03-27 10:10

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

- Issue History
Date Modified Username Field Change
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 - 2024 MantisBT Team
Powered by Mantis Bugtracker