Zurück zu Willert.de

Event handling problem w/Visual Studio build(s)

If your question doesn't fit in any other category below ask in here.

Event handling problem w/Visual Studio build(s)

Postby FYoung » March 30th, 2011, 8:17 pm

I'm new to this forum. Anyway, I've been beating my head against a wall with this problem, so perhaps one of you Rhapsody gurus can shed some light on this for me.
Scenario:
1. Legacy project was built w/Rhapsody 4.2 and VS 2003 .NET (C++ project). Has been working out in the field w/o any issues for years.
2. Upgrading to Rhapsody 7.5.2 w/VS 2010. Started the app and it just hung in the Rhapsody code.
3. Went back to Rhapsody 7.5.2 w/VS 2003. App started OK, but when main processing started, it crashed on the Rhapsody event handling code in OMThread.
4. Then tried Rhapsody 7.5.2 w/ VS 2008. Incurred exact same problem as #3.
5. Issue: It appears that an empty (or null) IOxfEvent object ends up on the OMThreads' event message queue. When OMThread::Execute attempts to call the event Id property (ev->getId), it crashes on the pure virtual call. The actual event it needs to process is the next item on the message queue.
6. Rebuilt the oxf.lib file with debug info and I can see the message queue gets corrupted. I get the feeling there is a compile/link error, i.e. mixing release and debug components, etc. But I've gone over the Rhapsody and Visual Studio compile/linker/config settings in nauseating detail and didn't find anything out of order.
NOTE: This crash occurs in both debug and release builds.
Any thoughts on this would be appreciated . Getting desperate.
Thanks
FYoung
 
Posts: 8
Joined: March 30th, 2011, 5:00 pm
Location: Massachusetts, USA

Re: Event handling problem w/Visual Studio build(s)

Postby Farquad » March 30th, 2011, 8:28 pm

I don't suppose you can put the model on here?

Is the 7.5.2 version full of settings? If so, those settings are trying to ensure that the code is generated as per 4.2. That's a huge step. About 10 years!
Farquad
 
Posts: 407
Joined: September 13th, 2007, 9:34 pm
Location: London

Re: Event handling problem w/Visual Studio build(s)

Postby FYoung » March 30th, 2011, 8:40 pm

Here you go:
Rhapsody 7.5.2 project file is 'IP Build.rpy'.
Attachments
Analyzed.zip
(1.61 MiB) Downloaded 746 times
FYoung
 
Posts: 8
Joined: March 30th, 2011, 5:00 pm
Location: Massachusetts, USA

Re: Event handling problem w/Visual Studio build(s)

Postby FYoung » March 30th, 2011, 8:42 pm

And yes, the 4.2 settings were carried over to 7.5.2.
10 years is a long time. But as with all SW developers, mine is not to question why,
mine is but to do or die.
FYoung
 
Posts: 8
Joined: March 30th, 2011, 5:00 pm
Location: Massachusetts, USA

Re: Event handling problem w/Visual Studio build(s)

Postby Farquad » April 1st, 2011, 4:47 pm

I've taken a look at your model. I can't get it to compile because you didn't provide the include directory.

There are a lot of events in the packages. I've never been in a situation where I've had to increase the max events for a package. It may or may not the a problem though. Blind shot in the dark but perhaps try creating some sub-packages and moving the events into those packages to spread the load. I think I'm talking nonsense here though. Without the ability to run it that's all I can offer.

Have you got IBM support? I wonder if SkyWalker could help?
Farquad
 
Posts: 407
Joined: September 13th, 2007, 9:34 pm
Location: London

Re: Event handling problem w/Visual Studio build(s)

Postby FYoung » April 1st, 2011, 5:24 pm

Thanks for checking that out. I will experiment with your suggestion(s).
The includes are attached, sorry about that.
Attachments
AnalyzedIncludes.zip
(864.01 KiB) Downloaded 728 times
FYoung
 
Posts: 8
Joined: March 30th, 2011, 5:00 pm
Location: Massachusetts, USA

Re: Event handling problem w/Visual Studio build(s)

Postby FYoung » April 1st, 2011, 5:32 pm

BTW: SkyWalker?
FYoung
 
Posts: 8
Joined: March 30th, 2011, 5:00 pm
Location: Massachusetts, USA

Re: Event handling problem w/Visual Studio build(s)

Postby Farquad » April 1st, 2011, 11:06 pm

FYoung, I've managed to get some level of compilation but I had to hit it with many compatibility settings for both VS and Rhp and even then the warnings pour out.

The first thing that springs to mind is that the OXF that supports your generated code is compiled with normal VS settings.

The second thing is that there are a number of places when an event is GENed that should take a parameter but it's missing. Early versions of Rhapsody let you off and allowed you to GEN(ev1) when you now need to GEN(ev1(x)) if ev1 is defined as needing x.

If I were you I'd strip all the compatibility settings out, e.g. CGCompatibilityPre71Cpp etc. I'd also use the default CompileSwitches. You'll then have to systematically work through the code errors and you may not fancy that but you'll end up with a better product that you understand. I know you said "it's been working in the field" but legacy code wears out and this looks to be hanging by a thread.

Sorry...
Farquad
 
Posts: 407
Joined: September 13th, 2007, 9:34 pm
Location: London

Re: Event handling problem w/Visual Studio build(s)

Postby che » April 4th, 2011, 7:49 am

Another suggestion:
Generate all your code with both the 4.2 and the 7.5 Rhapsody versions and diff them. You will learn a lot on the changes in Rhapsody's code generation.
"I love deadlines. I like the whooshing
sound they make as they fly by." - Douglas Adams
che
 
Posts: 7
Joined: December 4th, 2007, 5:25 pm
Location: Zürich

Re: Event handling problem w/Visual Studio build(s)

Postby FYoung » April 5th, 2011, 7:08 pm

I stripped out the compatibility settings. However, the VS 2008 compiler is now yelling about no default constructors for the various events. Should I add default constructors for my events? Or add back in one or more of the compatibility settings?
FYoung
 
Posts: 8
Joined: March 30th, 2011, 5:00 pm
Location: Massachusetts, USA

Next

Return to General Question

Who is online

Users browsing this forum: No registered users and 6 guests

cron