Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - Crashes and asserts in V19 skin code
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Crashes and asserts in V19 skin code

 Post Reply Post Reply
Author
Message
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 886
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Topic: Crashes and asserts in V19 skin code
    Posted: 07 November 2019 at 11:55am
When I run with skins, I am getting a variety of issues. For example, I used the Codejock.cjstyles shipped with 19 and when I exit the app, I get a read access violation:

>    ToolkitPro1900vc150x64UD.dll!CXTPSkinManagerApiHook::OnHookGetModuleHandleW(XTPSkinFrameworkApiFunctionIndex nFunctionIndex=xtpSkinApiGetModuleHandleW_KERNEL32, const wchar_t * lpModuleName=0x0000000000000000) Line 3639    C++    Symbols loaded.
     ToolkitPro1900vc150x64UD.dll!CXTPSkinManagerApiHook::OnHookGetModuleHandleW_KERNEL32(const wchar_t * lpModuleName=0x0000000000000000) Line 3204    C++    Symbols loaded.
     System.Windows.Forms.ni.dll!00007ff8738f7560()    Unknown    No symbols loaded.
     System.Windows.Forms.ni.dll!00007ff8738955a9()    Unknown    No symbols loaded.
     System.Windows.Forms.ni.dll!00007ff87385a277()    Unknown    No symbols loaded.
     System.Windows.Forms.ni.dll!00007ff873855e79()    Unknown    No symbols loaded.
     clr.dll!CallDescrWorkerInternal()    Unknown    Symbols loaded.
     clr.dll!CallDescrWorkerWithHandler()    Unknown    Symbols loaded.
     clr.dll!DispatchCallSimple()    Unknown    Symbols loaded.
     clr.dll!InvokeNotifyInner()    Unknown    Symbols loaded.
     clr.dll!InvokeNotify()    Unknown    Symbols loaded.
     clr.dll!DistributeEventReliably()    Unknown    Symbols loaded.
     clr.dll!AppDomain::RaiseOneExitProcessEvent()    Unknown    Symbols loaded.
     clr.dll!AppDomain::RaiseOneExitProcessEvent_Wrapper()    Unknown    Symbols loaded.
     clr.dll!AppDomain::RaiseExitProcessEvent(void)    Unknown    Symbols loaded.
     clr.dll!FinalizerThread::FinalizerThreadStart(void *)    Unknown    Symbols loaded.
     clr.dll!Thread::intermediateThreadProc(void *)    Unknown    Symbols loaded.
     ToolkitPro1900vc150x64UD.dll!CXTPSkinManagerApiHook::ThreadProcHook(void * lpThreadData=0x00000000425e2cf0) Line 2021    C++    Symbols loaded.
     kernel32.dll!00007ff8d10c4034()    Unknown    No symbols loaded.
     ntdll.dll!00007ff8d3c93691()    Unknown    No symbols loaded.

Run with Office2010.cjstyles and I get an assert and quick shutdown (I'm in debug and I can't even react quickly enough to the assert to stop the debugger) occurs at line 658 in XTPSynchro.h because the pObject input is null.

template<class T>
AFX_INLINE CXTPAsyncGuard<T, CXTPRWCriticalSection::CSharedLock>
    XTPAccessShared(T* pObject, long& nConditionCounter)
{
    ASSERT(NULL != pObject);
    return CXTPAsyncGuard<T, CXTPRWCriticalSection::CSharedLock>(
        *pObject, pObject->CXTPSynchronized::GetAccessCriticalSection(), nConditionCounter);
}

Run with WinXP.Royale.cjstyles and the same happens as with Offic2010.cjstyles. But, then the process hangs as it won't exit due to the crt seh :

     ntdll.dll!NtWaitForSingleObject()    Unknown    Symbols loaded.
     KernelBase.dll!WaitForSingleObjectEx()    Unknown    Symbols loaded.
     d3d10warp.dll!ThreadPool::WaitWhileBusy(struct WarpPlatform::Event *,int)    Unknown    Symbols loaded.
     d3d10warp.dll!DeinitDLL(void)    Unknown    Symbols loaded.
     d3d10warp.dll!DllMain()    Unknown    Symbols loaded.
     d3d10warp.dll!dllmain_dispatch()    Unknown    Symbols loaded.
     ntdll.dll!LdrpCallInitRoutine()    Unknown    Symbols loaded.
     ntdll.dll!LdrShutdownProcess()    Unknown    Symbols loaded.
     ntdll.dll!RtlExitUserProcess()    Unknown    Symbols loaded.
     kernel32.dll!ExitProcessImplementation()    Unknown    Symbols loaded.
     mscoreei.dll!00007ff8b609ee58()    Unknown    No symbols loaded.
     mscoree.dll!ShellShim_CorExitProcess()    Unknown    Symbols loaded.
     ucrtbased.dll!try_cor_exit_process(const unsigned int return_code=0) Line 98    C++    Symbols loaded.
     ucrtbased.dll!exit_or_terminate_process(const unsigned int return_code=0) Line 143    C++    Symbols loaded.
     ucrtbased.dll!common_exit(const int return_code=0, const _crt_exit_cleanup_mode cleanup_mode=_crt_exit_full_cleanup, const _crt_exit_return_mode return_mode=_crt_exit_terminate_process) Line 282    C++    Symbols loaded.
     ucrtbased.dll!exit(int return_code=0) Line 294    C++    Symbols loaded.
>    EdgeD.exe!__scrt_common_main_seh() Line 297    C++    Symbols loaded.
     EdgeD.exe!__scrt_common_main() Line 331    C++    Symbols loaded.
     EdgeD.exe!wWinMainCRTStartup() Line 17    C++    Symbols loaded.
     kernel32.dll!BaseThreadInitThunk()    Unknown    Symbols loaded.
     ntdll.dll!RtlUserThreadStart()    Unknown    Symbols loaded.

Run with Windows10.cjstyles and I see another AV (nConditionCounter was 0xFFFFFFFFFFFFFFFF) when trying to enter CXTPAsyncGuard.

>    ToolkitPro1900vc150x64UD.dll!CXTPAsyncGuard<CXTPSkinManagerApiHook,CXTPRWCriticalSection::CSharedLock>::CXTPAsyncGuard<CXTPSkinManagerApiHook,CXTPRWCriticalSection::CSharedLock>(CXTPSkinManagerApiHook & adaptee, CXTPRWCriticalSection & cs, long & nConditionCounter) Line 446    C++    Symbols loaded.
     ToolkitPro1900vc150x64UD.dll!XTPAccessShared<CXTPSkinManagerApiHook>(CXTPSkinManagerApiHook * pObject=0xdddddddddddddddd, long & nConditionCounter) Line 659    C++    Symbols loaded.
     ToolkitPro1900vc150x64UD.dll!CXTPSkinManagerApiHook::GetHookedFunction(XTPSkinFrameworkApiFunctionIndex nIndex=xtpSkinApiGetModuleHandleW_KERNEL32) Line 526    C++    Symbols loaded.
     ToolkitPro1900vc150x64UD.dll!CXTPSkinManagerApiHook::EnterHookedCall(XTPSkinFrameworkApiFunctionIndex nIndex=xtpSkinApiGetModuleHandleW_KERNEL32) Line 1253    C++    Symbols loaded.
     ToolkitPro1900vc150x64UD.dll!CXTPSkinManagerApiHook::OnHookGetModuleHandleW(XTPSkinFrameworkApiFunctionIndex nFunctionIndex=xtpSkinApiGetModuleHandleW_KERNEL32, const wchar_t * lpModuleName=0x0000000000000000) Line 3641    C++    Symbols loaded.
     ToolkitPro1900vc150x64UD.dll!CXTPSkinManagerApiHook::OnHookGetModuleHandleW_KERNEL32(const wchar_t * lpModuleName=0x0000000000000000) Line 3204    C++    Symbols loaded.
     System.Windows.Forms.ni.dll!00007ff8738f7560()    Unknown    No symbols loaded.
     System.Windows.Forms.ni.dll!00007ff8738955a9()    Unknown    No symbols loaded.
     System.Windows.Forms.ni.dll!00007ff87385a277()    Unknown    No symbols loaded.
     System.Windows.Forms.ni.dll!00007ff873855e79()    Unknown    No symbols loaded.
     clr.dll!CallDescrWorkerInternal()    Unknown    Symbols loaded.
     clr.dll!CallDescrWorkerWithHandler()    Unknown    Symbols loaded.
     clr.dll!DispatchCallSimple()    Unknown    Symbols loaded.
     clr.dll!InvokeNotifyInner()    Unknown    Symbols loaded.
     clr.dll!InvokeNotify()    Unknown    Symbols loaded.
     clr.dll!DistributeEventReliably()    Unknown    Symbols loaded.
     clr.dll!AppDomain::RaiseOneExitProcessEvent()    Unknown    Symbols loaded.
     clr.dll!AppDomain::RaiseOneExitProcessEvent_Wrapper()    Unknown    Symbols loaded.
     clr.dll!AppDomain::RaiseExitProcessEvent(void)    Unknown    Symbols loaded.
     clr.dll!FinalizerThread::FinalizerThreadStart(void *)    Unknown    Symbols loaded.
     clr.dll!Thread::intermediateThreadProc(void *)    Unknown    Symbols loaded.
     ToolkitPro1900vc150x64UD.dll!CXTPSkinManagerApiHook::ThreadProcHook(void * lpThreadData=0x0000000042b4c8f0) Line 2021    C++    Symbols loaded.
     kernel32.dll!BaseThreadInitThunk()    Unknown    Symbols loaded.
     ntdll.dll!RtlUserThreadStart()    Unknown    Symbols loaded.

All I have to do to get the above issues is merely start the app and then exit. Our app has native and .NET components in it. And, I only see this if I load a skin. I got that last one using skins I had used previously, including some that were downloaded from the 'net and which have worked for years. I got rid of all "old" skins and ran the test that resulted with the above issues using the V19 skins in the CJ Utils\Styles folders.

Is CJ V19 skin framework incompatible with the .NET runtime on Windows 10?
Back to Top
astoyan View Drop Down
Admin Group
Admin Group
Avatar

Joined: 24 August 2013
Status: Offline
Points: 303
Post Options Post Options   Thanks (0) Thanks(0)   Quote astoyan Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2019 at 3:33pm
Hello,

The fact that this kind of a severe issue is reported here for the first time makes me think that the problem is specific to either your application or your environment, no other users have reported such crashes on startup or application shutdown. The .NET SkinFramework samples included into SuitePro have been tested in all supported versions of Windows and no such issues were noticed. 

Taking this into account I can only suggest you submitting a support ticket with a sample project attached so that we can reproduce it reliably.

Regards,
   Alexander
Back to Top
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 886
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Posted: 10 November 2019 at 9:40am
When I update to a new CJ, do I need to make any changes wrt skins other than to reference the new skin files at load time? I had no skin issues until I dropped 19 in place of 18.3.
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1201
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Posted: 11 November 2019 at 3:08am
At least I have similar issues, but on shutdown. A lot of memory leaks that I didn't have with v18.5.

Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022
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.188 seconds.