Hi, Brent, It is my fault that I didn't initialize "CFRunLoopTimerContext
ctx;". I just found this struct doesn't have constructor. After I reset its
members to empty, the exception is gone. This is really a good lesson to me.
Thanks so much for your help that I can find problem when I reviewed my codes
again!!Best regards, Zhe ----- 原文 ----- 发件人: hou...@sohu.com 主 题:
Re: [webkit-help] Help: how to implement CFRunLoop logic on Windows Webkit
version 157099时 间: 2013年10月10日 6:43:24抄 送: webkit-help, Hi,
Brent, thanks for your response! Because debug information is missed in
WebKitSystemInterface.lib, I cannot dump the detail information of calling
stack of WinLaucher. I compiled WebKit on 64bit system, and I fould following
error messages in Output window when the exception was thrown: ERROR !!!
HeapSetInformation failed to set g_Heap to LFHERROR !!! HeapSetInformation
failed to set g_SpyHeap to LFHbut I don't know whether they mean the root
cause. The exception is raise after the callback function is called/returned,
as I already saw the callback function's output when the application
crashed. Just for your information that bellow is the analyze information
of the
exception. ********************************************************************************
**
Exception Analysis
**
***********************************************************************************
ERROR: Symbol file could not be found. Defaulted to export symbols for
libdispatch.dll - *** ERROR: Symbol file could not be found.
Defaulted to export symbols for CoreFoundation.dll - *** ERROR:
Symbol file could not be found. Defaulted to export symbols for
pthreadVC2.dll - FAULTING_IP: ntdll! ??
::FNODOBFM::`string'+4779770ee 6f
outs dx,dword ptr [esi]EXCEPTION_RECORD: ffffffff --
(.exr 0xffffffffffffffff)ExceptionAddress: 779770ee (ntdll! ??
::FNODOBFM::`string'+0x00000004) ExceptionCode: c0000096
ExceptionFlags: 00000000NumberParameters: 0PROCESS_NAME:
WinLauncher.exeERROR_CODE: (NTSTATUS) 0xc0000096 - {EXCEPTION}
Privileged instruction.EXCEPTION_CODE: (NTSTATUS) 0xc0000096 -
{EXCEPTION} Privileged instruction.DEFAULT_BUCKET_ID:
INVALID_POINTER_READAPP: winlauncher.exeFAULTING_THREAD:
00003618PRIMARY_PROBLEM_CLASS: INVALID_POINTER_READBUGCHECK_STR:
APPLICATION_FAULT_INVALID_POINTER_READLAST_CONTROL_TRANSFER: from
10003eae to 779770eeSTACK_TEXT: 000cf978 10003eae 00000000 c1236e93
41b806ae ntdll! ?? ::FNODOBFM::`string'+0x4WARNING: Stack unwind information
not available. Following frames may be wrong.000cfae4 004013d0 00400000
00000000 00242b64 WinLauncher_10000000!dllLauncherEntryPoint+0x9ae000cfef0
004037d7 00400000 00000000 00242b64 WinLauncher!wWinMain+0x3d0000cff84 75738543
7ffde000 000cffd4 7798bf39 WinLauncher!__tmainCRTStartup+0x158000cff90 7798bf39
7ffde000 2e5f7adb 00000000 kernel32!BaseThreadInitThunk+0xe000cffd4 7798bf0c
0040390a 7ffde000 ffffffff ntdll!__RtlUserThreadStart+0x72000cffec 00000000
0040390a 7ffde000 00000000 ntdll!_RtlUserThreadStart+0x1bIf you have any ideas,
please let me know. Thanks a lot in advance!Best regards, Zhe ----- 原文
----- 发件人: Brent Fulgham 主 题: Re: [webkit-help] Help: how to implement
CFRunLoop logic on Windows Webkit version 157099时 间: 2013年10月10日 11:30:08抄 送:
webkit-help, Hi Zhe,You can see how the various CoreFoundation types are
used in some of the CFLite examples I posted to my GitHub account
(e.g., https://github.com/bfulgham/WinCairoRequirements/tree/master/src/opencflite/examples/CFRunLoopTimerExample).I'm
not sure I understand what you mean when you say "Everytime, when 'tick'
function is called, there is an exception raised". Can you show the
callstack at the time the exception is generated?Do you mean that the exception
is thrown at the time the tick should have fired, before you enter your 'tick'
function? Or is it called when you return from the call?Thanks,-BrentOn Oct 9,
2013, at 5:28 AM, hou...@sohu.com wrote:I am trying to add some CFRunLoop logic
in WinLauncher.cpp on Windows Webkit version 157099. There always are
exceptions raised. My codes look like this: // callback functionvoid
tick(CFRunLoopTimerRef timer, void *info) {
Logger::Instance()->WriteLog("I am going to dump DOM tree now.
Tick...");}extern "C" __declspec(dllexport) int WINAPI
dllLauncherEntryPoint(HINSTANCE, HINSTANCE, LPTSTR, int nCmdShow){// no change
until around following line// Main message loop: __try {#if
USE(CF) // my codes start CFRunLoopTimerContext
ctx; CFRunLoopTimerRef timer =
CFRunLoopTimerCreate(NULL,
CFAbsoluteTimeGetCurrent() + 10.0,
0, 0,
0, tick,
&ctx);
CFRunLoopAddTimer(CFRunLoopGetMain(), timer, kCFRunLoopCommonModes);
// my codes end#endif while (GetMessage(&msg, 0,
0, 0)) {#if USE(CF)
CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, true);#endif
if (!TranslateAccelerator(msg.hwnd, hAccelTable,
&msg)) {
TranslateMessage(&msg);
DispatchMessage(&msg);
} } }
__except(createCrashReport(GetExceptionInformation()),
EXCEPTION_EXECUTE_HANDLER) { }exit:
gPrintDelegate->Release(); // other codes without
change}Everytime, when 'tick' function is called, there is an exception raised.
As no debug information is in WebKitSystemInterface.lib, I cannot trace
the program line by line either. Can anybody let me know how shall I implement
the logic? Thanks, Zhe--------------------------------专业的邮件发送服务
SendCloud
_______________________________________________webkit-help mailing
listwebkit-help@lists.webkit.orghttps://lists.webkit.org/mailman/listinfo/webkit-help愿所有的笨鸟们万岁!
--------------------------------SendCloud 满足开发者需求的邮件发送服务
愿所有的笨鸟们万岁!
_______________________________________________
webkit-help mailing list
webkit-help@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-help