[Bf-committers] I found a GHOSTBuster ;)
Ton Roosendaal
ton at blender.org
Mon Apr 29 09:56:47 CEST 2013
Hi Jürgen,
Cool stuff, we welcome a bit of love for our Windows GHOST code!
-Ton-
------------------------------------------------------------------------
Ton Roosendaal Blender Foundation ton at blender.org www.blender.org
Blender Institute Entrepotdok 57A 1018AD Amsterdam The Netherlands
On 28 Apr, 2013, at 20:15, Jürgen Herrmann wrote:
> Hi Campbell,
>
> it was quite hard to find because there were multiple exceptions on different points in the message loop.
> One was here:
>
> void GHOST_WindowWin32::bringTabletContextToFront()
> {
> ->> if (m_wintab) {
> .
> .
> .
>
> This had tob e fixed by making m_wintab static.
>
> Another one was here:
> LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
> {
> ...
>
> if (LOWORD(lParam) == HTCLIENT) {
> // Load the current cursor
> --> window->loadCursor(window->getCursorVisibility(), window->getCursorShape());
> ...
>
> And so on
>
> This was the point where i took a closer look at the window* at the beginning of s_wndProc
>
> It was:
> GHOST_WindowWin32 *window = (GHOST_WindowWin32 *)::GetWindowLong(hwnd, GWL_USERDATA);
>
> I changed it to:
> GHOST_WindowWin32 *window = (GHOST_WindowWin32 *)::GetWindowLongPtr(hwnd, GWL_USERDATA);
>
> I'll provide a patch on patchtracker for this ;)
>
> - Jürgen
> -----Ursprüngliche Nachricht-----
> Von: bf-committers-bounces at blender.org [mailto:bf-committers-bounces at blender.org] Im Auftrag von Campbell Barton
> Gesendet: Sonntag, 28. April 2013 20:01
> An: bf-blender developers
> Betreff: Re: [Bf-committers] I found a GHOSTBuster ;)
>
> On Mon, Apr 29, 2013 at 3:46 AM, Jürgen Herrmann <shadowrom at me.com> wrote:
>> I finally found the crashing factor in GHOST Win32 on Win8.
>> It was a nasty GetWindowLong that should have been a GetWindowLongPtr.
>>
>> I tested the change in MSVC 2008, 2010 and 2012. Everything seems to work fine and smooth.
>>
>> I'll upload 3 test builds and the patch to my site. This could take a while due to a slow Internet connection.
>>
>> Now I'll focus on fixing OpenCOLLADA and libmv compilation. Maybe I'll find time to build cuda binaries with 2012 too, this guide looks promising:
>>
>> http://blog.norture.com/2012/10/gpu-parallel-programming-in-vs2012-wit
>> h-nvidia-cuda/
>>
>> If someone wants to try: http://shadowrom.de
>>
>> Jürgen
>
> Good to hear you found the problem,
> Sounds like this fix should be applied to trunk too?, could you make a patch available?
>
> Out of curiosity what made this problem so hard to track down?
>
> --
> - Campbell
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
More information about the Bf-committers
mailing list