Re: Bug in Win32Lib 0.70.4

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hi CChris,

Thank you very much for that. You've certainly fixed the original test code that Pete provided. Unfortunately the problem still exists in the main application. When the application is starting it runs restoreMousePointer({wResMan}) which leads to the crash. I turned on "with trace" on line 442 of win32lib.ew and put a trace(1) just before the application calls restoreMousePointer(). This from the ex_conv.err :-

c:\euphoria\win32lib\Include\w32msgs.e:113 in procedure fShowError()  
attempt to divide by 0  
    pParams = { 
                "getRect:GetWindowRect failed.", 
                472 
              } 
    pMode = 2 
    lErrCode = 472 
    lResponse = 1 
    lStyle = 16 
    s = "getRect:GetWindowRect failed." 
    lDispMsg = "Error code 472\ngetRect:GetWindowRect failed.\n\nWin32Lib v0.70.4 17-Jun-2008" 
    lTitle = "Win32Lib AppWindow - Fatal Error" 
 
... called from c:\euphoria\win32lib\Include\w32msgs.e:146 in procedure abortErr()   
    pParams = { 
                "getRect:GetWindowRect failed.", 
                472 
              } 
 
... called from c:\euphoria\win32lib\Include\Win32lib.ew:14656 in function getRect()   
    id = 36'$' 
    top = <no value> 
    bottom = <no value> 
    left = <no value> 
    right = <no value> 
    ctltype = 0 
    struct = 35704780 
    pt = <no value> 
    hdc = <no value> 
    mset = 10405380 
    bufsize = <no value> 
    hWnd = <no value> 
    xy = <no value> 
    retval = {0,0,0,0} 
    i = <no value> 
 
 
... called from c:\euphoria\win32lib\Include\Win32lib.ew:5586 in function isScreenPointIn()   
    id = 36'$' 
    pX = 560 
    pY = 319 
    lScreenRect = <no value> 
 
... called from c:\euphoria\win32lib\Include\w32resources.ew:5128 in procedure restoreMousePointer_()   
    id = 36'$' 
    depth = 2 
    lKids = {} 
    lCursors = {65555} 
    mouse_pos = {560,319} 
    i = 1 
 
... called from c:\euphoria\win32lib\Include\w32resources.ew:5118 in procedure restoreMousePointer_()   
    id = ")" 
    depth = 1 
    lKids = { 
              "$(", 
              {39,15}, 
              {40,19}, 
              "3(", 
              {63,15}, 
              {64,19}, 
              {65,15}, 
              {66,19}, 
              {68,17}, 
              {69,17}, 
              {71,17}, 
              "S/" 
            } 
    lCursors = <no value> 
    mouse_pos = <no value> 
    i = 1 
 
... called from c:\euphoria\win32lib\Include\w32resources.ew:5118 in procedure restoreMousePointer_()   
    id = {3} 
    depth = 0 
    lKids = { 
              {4,18}, 
              {5,18}, 
              {6,18}, 
              {7,18}, 
              {8,15}, 
              {9,18}, 
              {10,15}, 
              {11,16}, 
              {12,18}, 
              {13,15}, 
              {14,19}, 
              {15,15}, 
              {16,15}, 
              {17,2}, 
              {18,15}, 
              {19,15}, 
              {20,18}, 
              {21,15}, 
              {22,15}, 
              {23,15}, 
              {24,15}, 
              {25,18}, 
              {26,15}, 
              {27,18}, 
              {28,16}, 
              {29,18}, 
              {30,2}, 
              {31,15}, 
              {32,18}, 
              {33,15}, 
              {34,16}, 
              {35,16}, 
              "%'", 
              {38,15}, 
              {41,8}, 
              {42,15}, 
              {43,15}, 
              {44,19}, 
              {45,15}, 
              {46,15}, 
              {47,15}, 
              {48,18}, 
              {49,15}, 
              {50,19}, 
              {52,2}, 
              {53,2}, 
              {54,2}, 
              {55,2}, 
              {57,2}, 
              {58,19}, 
              {59,2}, 
              {60,3}, 
              {61,2}, 
              {62,16}, 
              {67,17}, 
              {70,17}, 
              {72,17}, 
              {73,17}, 
              {74,17}, 
              {75,17}, 
              {76,17}, 
              {77,17}, 
              {78,17}, 
              {79,17}, 
              {80,17}, 
              {81,17}, 
              {82,17}, 
              {98,1}, 
              {125,1}, 
              {239,1}, 
              {282,1}, 
              {386,24}, 
              {499,25}, 
              {510,25} 
            } 
    lCursors = <no value> 
    mouse_pos = <no value> 
    i = 35'#' 
 
... called from c:\euphoria\win32lib\Include\w32resources.ew:5157 in procedure restoreMousePointer()   
    id = {3} 
 
... called from .\ResManWindowRoutines.ew:3155 in procedure OnOpen_ResManWin()   
<snip> 



The final lines leading up to the divide by zero are:

Traced lines leading up to the failure: 
 
C:\EUPHORIA\include\machine.e:113	    machine_proc(M_FREE, a) 
C:\EUPHORIA\include\machine.e:114	end procedure 
C:\EUPHORIA\include\machine.e:63	    return a > 0 and a <= MAX_ADDR and floor(a) = a 
C:\EUPHORIA\include\machine.e:113	    machine_proc(M_FREE, a) 
C:\EUPHORIA\include\machine.e:114	end procedure 
C:\EUPHORIA\include\machine.e:63	    return a > 0 and a <= MAX_ADDR and floor(a) = a 
C:\EUPHORIA\include\machine.e:113	    machine_proc(M_FREE, a) 
C:\EUPHORIA\include\machine.e:114	end procedure 
C:\EUPHORIA\include\machine.e:63	    return a > 0 and a <= MAX_ADDR and floor(a) = a 
C:\EUPHORIA\include\machine.e:113	    machine_proc(M_FREE, a) 
C:\EUPHORIA\include\machine.e:114	end procedure 
c:\euphoria\win32lib\Include\Win32lib.ew:567	    vWinMainState = kFinished 
c:\euphoria\win32lib\Include\Win32lib.ew:568	end procedure 
c:\euphoria\win32lib\Include\Win32lib.ew:24996	end procedure 
c:\euphoria\win32lib\Include\Win32lib.ew:25737	    return 0 
c:\euphoria\win32lib\Include\w32msgs.e:37	            if lRC = -1 then 
c:\euphoria\win32lib\Include\w32msgs.e:40	        end for 
c:\euphoria\win32lib\Include\w32msgs.e:41	        xUserCleanUp = lUserCleanUp 
c:\euphoria\win32lib\Include\w32msgs.e:44	end procedure 
c:\euphoria\win32lib\Include\w32msgs.e:108	        if pMode = 2 then 
c:\euphoria\win32lib\Include\w32msgs.e:110	            crash_message(lDispMsg) 
C:\EUPHORIA\include\machine.e:232	    machine_proc(M_CRASH_MESSAGE, msg) 
C:\EUPHORIA\include\machine.e:233	end procedure 
c:\euphoria\win32lib\Include\w32msgs.e:112	        if pMode != 3 then 
c:\euphoria\win32lib\Include\w32msgs.e:113	            abort(1/0) -- Force the ex.err to be created. 



I suspect a little more of your magic is required to fix this properly. If the above is of no use I will attempt to create another piece of test code to demonstrate the problem.

All the best,
Mark

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu