Link to debug runtime?

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
roytam1

Link to debug runtime?

Unread post by roytam1 » 2017-12-07, 07:06

It seems that I can't link compiled dlls to debug version of C runtime even I have --enable-debug flag set:

Code: Select all

16:43.54 mozcrt.lib(newaop_s.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in Unified_cpp_angle_src_libGLESv20.obj
16:43.54 mozcrt.lib(locale0_implib.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in Unified_cpp_angle_src_libGLESv20.obj
Did I miss something?

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35474
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Link to debug runtime?

Unread post by Moonchild » 2017-12-07, 09:15

Are you manually trying to link things? When do you get this error? Are you using the normal build system? Did you clobber when changing the debug option? (it's recommended never to build non-debug and debug in the same objdir)
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

roytam1

Re: Link to debug runtime?

Unread post by roytam1 » 2017-12-07, 11:31

Moonchild wrote:Are you manually trying to link things?
No, all done by mach build. I need goanna libraries linking with debug version of C runtime. I specified "-MDd" optimize option in mozconfig.
Moonchild wrote:When do you get this error? Are you using the normal build system?
When mach build is building GL libraries, and also the stub executable.

It seems that mozcrt is not patching debug version of import library?
Moonchild wrote:Did you clobber when changing the debug option? (it's recommended never to build non-debug and debug in the same objdir)
I use new folder for debug build in mozconfig:

Code: Select all

mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-dbg-@CONFIG_GUESS@
so release build and debug build are separated.

roytam1

Re: Link to debug runtime?

Unread post by roytam1 » 2017-12-08, 04:19

I'm trying to play with old WinEmbed, and xul.dll accessing 0x00000000 and crashes. mTransactionIdAllocator is NULL here.

Code: Select all

> 	xul.dll!mozilla::layers::ClientLayerManager::ForwardTransaction(bool aScheduleComposite) Line 557	C++
	xul.dll!mozilla::layers::ClientLayerManager::EndTransaction(void (mozilla::layers::PaintedLayer *, gfxContext *, const nsIntRegion &, mozilla::layers::DrawRegionClip, const nsIntRegion &, void *) * aCallback, void * aCallbackData, mozilla::layers::LayerManager::EndTransactionFlags aFlags) Line 320	C++
 	xul.dll!nsWebBrowser::PaintWindow(nsIWidget * aWidget, nsIntRegion aRegion) Line 1634	C++
 	xul.dll!nsWindow::OnPaint(HDC__ * aDC, unsigned int aNestingLevel) Line 530	C++
 	xul.dll!nsWindow::ProcessMessage(unsigned int msg, unsigned int & wParam, long & lParam, long * aRetValue) Line 4830	C++
 	xul.dll!nsWindow::WindowProcInternal(HWND__ * hWnd, unsigned int msg, unsigned int wParam, long lParam) Line 4382	C++
 	xul.dll!CallWindowProcCrashProtected(long (HWND__ *, unsigned int, unsigned int, long) * aWndProc, HWND__ * aHWnd, unsigned int aMsg, unsigned int aWParam, long aLParam) Line 24	C++
 	xul.dll!nsWindow::WindowProc(HWND__ * hWnd, unsigned int msg, unsigned int wParam, long lParam) Line 4334	C++
 	user32.dll!_InternalCallWinProc@20()	Unknown
 	user32.dll!_UserCallWinProcCheckWow@32()	Unknown
 	user32.dll!_DispatchClientMessage@24()	Unknown
 	user32.dll!___fnDWORD@4()	Unknown
 	ntdll.dll!_KiUserCallbackDispatcher@12()	Unknown
 	user32.dll!_NtUserDispatchMessage@4()	Unknown
 	user32.dll!_DispatchMessageWorker@8()	Unknown
 	user32.dll!_DispatchMessageW@4()	Unknown
 	winEmbed.exe!AppCallbacks::RunEventLoop(int & aRunCondition) Line 1164	C++
 	winEmbed.exe!main(int argc, char * * argv) Line 274	C++
 	winEmbed.exe!__tmainCRTStartup() Line 626	C
 	kernel32.dll!@BaseThreadInitThunk@12()	Unknown
 	ntdll.dll!___RtlUserThreadStart@8()	Unknown
 	ntdll.dll!__RtlUserThreadStart@8()	Unknown

Locked