Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » 2.51 problem (ASSERT_VALID fails with illegal vtable pointer.) Additional info Collapse All
Subject Author Date
George Ross Jan 6, 2006 - 12:02 PM

Hi again


 


i recompiled the project to use profuis and mfc from dll and works.


Unfortunately i need to use static link


 


regards


George

Christophe Guibert Jan 22, 2006 - 2:29 PM

Hello,


I experiment similar problems with 2.51 version (static build) : assertion failed while using the g_PaintManager object, but this occurs BEFORE any explicit call to the Prof-UIS library (between the constructor of the CWinApp derived class - with no call to Prof-UIS - and the call of the InitInstance() method.


The 2.52 version seems to solve this but present other problems :


- assertion failed while using the SetBasicCommands of menus (this can be overcome when disabling the expandable menu feature : also encountered with the 2.50 version, and it worked fine with the 2.42)


- if I tear the control bar off the frame, it can’t be docked again since the docking outline is not drawn any more, and it remains floating.


I need the static build, so the only solution to have the application working correctly was to revert to the Prof-UIS 2.50 version (without expandable menus).


Besides these temporary problems, I find Prof-UIS very useful !


Best Regards,


Christophe Guibert

Technical Support Jan 23, 2006 - 8:53 AM

We guess you just have not noticed some improvements which we made in the static LIB Prof-UIS version introduced in 2.52. The static library now has exactly the same features as the DLL version. All the Prof-UIS features are now available in the applications based on statically linked Prof-UIS. You can use customizable toolbars and menus, dynamic resizable control bars, icon editor dialog and other resource-dependent features. This allows you to hide Prof-UIS inside your application completely. Just make a small change in the .RC2 file of your project:

#if ( !(defined _AFXDLL && !defined __STATPROFUIS_WITH_DLLMFC__) )
    #include <Resources/Resource.rc>
#endif
You also need to specify the .../Prof-UIS/Include folder in the Additional Include Folders list of the resource compiler. This will include Prof-UIS resources into your application. All the static configurations of our sample projects are now based on this rule and they have no problems at run time.

Christophe Guibert Jan 23, 2006 - 1:36 PM

Hello,


Good guess ! I understand now how the lack of binary resources added in the .rc2 file could lead to all the problems I encountered.


This was not obvious to find in your documentation, and I thank you for the quick and accurate answer. All is correctly working now with the 2.52 Prof-UIS version.


Best Regards,


Christophe Guibert

Technical Support Jan 7, 2006 - 6:56 AM

Prof-UIS 2.51 indeed introduces one "feature" which may lead to crashes in static builds. It deals with a new mechanism of the global paint manager component which is now can notify all the other components about its events. The paint manager simply keeps pointers to CExtPmBridge objects. Many of Prof-UIS classes now include the CExtPmBridge class as one of their base classes. If some Prof-UIS class is used as a global variable, then its constructor registers the object in global g_PaintManager object. The initialization sequence is not defined for the global objects. The crash may occur due to accessing the uninitialized global paint manager object. This error should never occur if you use Prof-UIS as DLL because the paint manager is completely initialized when the DLL is loaded and only after that all your global objects get created. Please check this issue.