You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the following function in your sample application causes a access violation,
because g_broker == 0;
void PaintMainWindow(HDC dc, PAINTSTRUCT* /*ps*/) {
...
::wsprintfW(buf, L"worker file calls : %ld", g_broker->GetNumCallsPerArea(Broker::FILES));
...
}
this function is triggered by calling CreateMainWindow in BrokerMain.
The broker instance is created after CreateMainWindow, therefore when
PaintMainWindow first gets called, g_broker is still empty.
int BrokerMain(HINSTANCE instance, const wchar_t*) {
HWND win = CreateMainWindow(instance);
if (!win) {
return -1;
}
Broker broker(win);
broker.SetPolicy(Broker::FILES, true);
broker.SpawnWorker(kWorkerCmdline);
g_broker = &broker;
...
}
This issue is reproducible with vs2012 on win8. for now, I'm doing this:
if (g_broker)
::wsprintfW(buf, L"worker file calls : %ld", g_broker->GetNumCallsPerArea(Broker::FILES));
Original issue reported on code.google.com by [email protected] on 1 Oct 2013 at 4:07
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 1 Oct 2013 at 4:07The text was updated successfully, but these errors were encountered: