Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Skin Framework
  New Posts New Posts RSS Feed - App crashes on exit when mixing MFC and ActiveX sk
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

App crashes on exit when mixing MFC and ActiveX sk

 Post Reply Post Reply
Author
Message
voltus View Drop Down
Newbie
Newbie
Avatar

Joined: 17 April 2008
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote voltus Quote  Post ReplyReply Direct Link To This Post Topic: App crashes on exit when mixing MFC and ActiveX sk
    Posted: 17 April 2008 at 6:26pm
My team is currently using the Codejock MFC skin framework to skin our MFC app.  We wanted to extend the functionality of our MFC app by using .NET forms.  The problem we found is that Codejock skin framework that we were using does not extend to any .NET forms we may call from our MFC app.  To skin these we downloaded the demo version of the ActiveX suite to see if we should buy that product also.  We were able to get the skinning to work, Now when we call the .NET forms from MFC we get the correct skins.  The problem is that when we exit the app we get a crash that says "The string binding is invalid".
 
Looking online it looked like this may be a problem with some linkage in mixed Managed and unmanaged dll's.
 
Can anyone provide me with any input or suggestions?
 
Thanks.
Voltus
Back to Top
voltus View Drop Down
Newbie
Newbie
Avatar

Joined: 17 April 2008
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote voltus Quote  Post ReplyReply Direct Link To This Post Posted: 17 April 2008 at 9:12pm
Actually, as we looked into it further, it was actually an unhandled exception that was handled by something.  The app doesn't "crash" but allows you to "continue".  The message only comes up in debug mode.  In release it "looks" like it exits gracefully.
 
I am still concerned that there is a problem.  Any ideas?
Voltus
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 18 April 2008 at 1:01am

Hi,

Small sample will be great. Please send one to support@codejock.com.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Smucker View Drop Down
Senior Member
Senior Member
Avatar

Joined: 02 February 2008
Status: Offline
Points: 156
Post Options Post Options   Thanks (0) Thanks(0)   Quote Smucker Quote  Post ReplyReply Direct Link To This Post Posted: 20 April 2008 at 4:32am
You can "cheat" and call TerminateProcess(GetCurrentProcess(), 0) once you've closed any buffered streams or connections. Your application will exit very quickly with no errors. Everything should be cleaned up fine (on true Win32/64 and server OSes) unless Microsoft decided to break something horribly with .NET.

Product: Xtreme Toolkit Pro version 13.2 (Unicode, static build)

Platform: Windows 200x/XP/Vista/Win7 (32/64 bit)

Language: Visual C++ 9.0 (Studio 2008)

Back to Top
voltus View Drop Down
Newbie
Newbie
Avatar

Joined: 17 April 2008
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote voltus Quote  Post ReplyReply Direct Link To This Post Posted: 21 April 2008 at 1:30pm
Thanks Sev.  I would rather not  cheat. :-)
 
Oleg,
 
I am working on a sample app now.  Unfortunately, I've run into another problem that I don't see in our commercial app.  In my sample app, if I call CodeJock's MFC LoadSkin() to apply the skin on the MFC side when I try bring up a .NET winform through a COM interface the debugger reports the class as not registered.  However, when I comment out the LoadSkin(), it makes the call to bring up the winform just fine.
 
Any hints?
Voltus
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 21 April 2008 at 2:45pm

Hi,

Sorry again I need to try it myself to help. I need some code to debug.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
voltus View Drop Down
Newbie
Newbie
Avatar

Joined: 17 April 2008
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote voltus Quote  Post ReplyReply Direct Link To This Post Posted: 21 April 2008 at 8:15pm
I sent you some sample code for the second problem.  Hopefully we can get passed this so we can try to reproduce the initial problem.  The initial problem is preventing us from purchasing the ActiveX SkinFramework stuff.  I would really love to not use MFC for the GUI I am working on.
Voltus
Back to Top
voltus View Drop Down
Newbie
Newbie
Avatar

Joined: 17 April 2008
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote voltus Quote  Post ReplyReply Direct Link To This Post Posted: 22 April 2008 at 1:54pm
Oleg,
 
You mentioned that it worked on you 12.0 beta, but unfortunately, my management won't accept a non- release version.  I need to get it working on the version that we can buy now which I believe is 11.2.2.  I s there any way you can help me with that version.  If I had a few months to wait, I would love to wait for the latest version.  Unfortunately, that does not fit into our development schedule.
 
Thanks for your help.
Voltus
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 22 April 2008 at 2:37pm
Hello,
 
Yes, thank you for sample, we modified SkinFarmework, so  with 12.0 release you will be able to skin both MFC and .NET parts using only MFC SkinFramework code.
Please wait 12.0 release, it will be soon.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
voltus View Drop Down
Newbie
Newbie
Avatar

Joined: 17 April 2008
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote voltus Quote  Post ReplyReply Direct Link To This Post Posted: 22 April 2008 at 3:04pm

Oleg, unless that version is coming out this week, I will be unable to use it.

Voltus
Back to Top
voltus View Drop Down
Newbie
Newbie
Avatar

Joined: 17 April 2008
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote voltus Quote  Post ReplyReply Direct Link To This Post Posted: 30 April 2008 at 9:15pm
Oleg,
 
I brought down the 12.0 evaluation and it does look like my sample app is working.  I then used the 12.0 version of the skin framework on our commercial application.  The skinning went through to the .NET forms beautifully.  Unfortunately, we still received the original problem where the string binding is invalid.  It seems like something in our very large and complicated app is not meshing very well with your framework. 
 
I debugged the problem for a while and finally started looking at what methods we were calling on your framework.  We were pretty much just calling LoadSkin() in the InitInstance() of our app.  I thought there must be something that can be called during ExitInstance() for cleanup of whatever the skin framework set up.  After trying a couple of methods I finally tried XTPSkinManager()->RemoveAll() during the ExitInstance(). This cleared up the string binding problem and allowed us to exit.
 
Do you see any problem with this?
 
If not, I can present this to my management and most likely move forward with getting the latest version of your product.
 
Thanks very much for your help.
Voltus
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 01 May 2008 at 1:42am
Hello,
Yes, its  right. Also try in ExitInstance add
XTPSkinManager()->LoadSkin(NULL, NULL);
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
akur View Drop Down
Senior Member
Senior Member


Joined: 16 May 2006
Status: Offline
Points: 139
Post Options Post Options   Thanks (0) Thanks(0)   Quote akur Quote  Post ReplyReply Direct Link To This Post Posted: 30 May 2011 at 6:33am
We've got the same problem -> already using MFC skinning, but would like to skin WinForms dialogs, as well (still in the same process).

Does the current version of 15.0.2 still require to use both the MFC SkinFramework and the ActiveX SkinFramework in order to skin both MFC and WinForms dialogs within the same process?
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.