Zurück zu Willert.de

Using Rhapsody Generated Library

Rhapsody Model or Codegeneration topics

Using Rhapsody Generated Library

Beitragvon BadRoy » Dezember 3rd, 2013, 12:34 am

I've built an GHS Integrity library with Rhapsody and include it in an existing Integrity project. During main(), I create an instance of the main library object (Let's call it myRhapBuilderObject) - in the constructor I initialize the framework and call start ( OXF::initialize(64, 0, true) { OXF::start(true); } ). This all appears to work and I can see the framework threads in the Multi debugger. The problem then is that my main OMThread (the myRhapBuilderObject thread) comes up halted. If I manually start it (within the Multi debugger) it runs fine. I just can't seem to get it to come up running out of the gate - probably something dumb. Anyone else run into this?
Beiträge: 1
Registriert: Dezember 2nd, 2013, 11:18 pm

Re: Using Rhapsody Generated Library

Beitragvon Skywalker » Dezember 5th, 2013, 12:25 pm

Does not sound familiar to me... but from what I see you should at least verify the right ordering.
A valid sequence is:
1. initialize framework (calling OXF::initialize() with appropriate arguments),
2. create your objects which may later use the OXF,
3. start framework main thread as background task (calling OXF::start(true)),
4. return to caller and continue there.

If you create user objects to early (before OXF::initialize), then they may try to access framework singleton objects before they were explicitly initialized. In that case they will be initialized with default arguments and your later initialization arguments will be ignored, since the OXF was initialized implicitly.

If you create user objects (which shall run on main context) to late (after OXF::start(true)), then you may cause race conditions, since these objects could fire events during their construction (if startBehavior() is called in Ctor), and so the dispatching context (which is running in the background already) may try to handle them (e.g. OMStartBehavior or short tm()), even before the construction was fully completed.

Which version of Rhapsody do you use in that project?
You ensured to link the non-instrumented version of oxf?

Hope this helps.
May the force be with you ...
Beiträge: 74
Registriert: Oktober 31st, 2007, 5:09 pm
Wohnort: Milkyway, classic 9-planet solar system

Zurück zu Modelling with Rhapsody

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 3 Gäste