1. Program that has run for three years just stopped, can anybody spot why?
- Posted by Mike777b Jan 24, 2011
- 1717 views
I will try to describe the circumstances as briefly as possible. If additional information is needed I will be glad to provide it.
Environment: EU3, built a project with Judith's IDE, which threw off an exw file that has worked flawlessly for about 3 years.
EUDIR=c:\e1
EUINC=c:\e1\INCLUDE;c:\e1\INC\Win32Lib;c:\e1\INC\MISC;c:\e1\INC\IDE
Program description: It is a makeshift GUI that does a few tasks I need to do monthly. Each task is associated with a button. All the buttons are on one main Window. That's it, a single main window with a few buttons.
The program errors out trying to create the main window. The ex.err file points to the 12th line of the exw file as the statement that calls the statements which creates the error. The 12th line of my exw file appears to create a machine level exception at line 212 of w32dll.ew.
Since the error is on the 12th line and it is the first executable statement, I have created a 14 line program that duplicates the error. The complete ex.err file generated from that 14 line program is posted here:
http://euphoria.pastey.net/145269-3sh7
Before I post the lines that I think are relevant from my program which generates the error, I'm first posting the modified 14 line program here:
-- code generated by Win32Lib IDE v1.0.3 Build Dec-15-2007 constant TheProgramType="exw" include Win32Lib.ew without warning -- -- -------------------------------------------------------------------------------- -- Window Window1 constant Window1 = createEx( Window, "Window1", 0, Default, Default, 400, 367, 0, 0 ) WinMain( Window1,Normal )
Here are the lines I think are relevant from the complete file (I'll post more if needed):
From myprog.exw (I added the line numbers as displayed in notepad:
1 -- code generated by Win32Lib IDE v1.0.3 Build Dec-15-2007 2 3 constant TheProgramType="exw" 4 5 include Win32Lib.ew 6 without warning 7 -- 8 -- 9 -- 10 -------------------------------------------------------------------------------- 11 -- Window Window1 12 constant Window1 = createEx( Window, "Window1", 0, Default, Default, 400, 367, 0, 0 )
From ex.err:
C:\e1\INC\Win32Lib\Include\w32dll.ew:212 in function w32Func() A machine-level exception occurred during execution of this statement funcid = 82'R' parms = {16,10922380,10634268,13565952,2147483648,2147483648,400,367, 0,0,4194304,0} lRC = <no value> libfunc = <no value> lFuncDef = 24 linked = <no value> memset = 0 i = 12 ... called from C:\e1\INC\Win32Lib\Include\Win32Lib.ew:8241 in procedure createWindow() id = 3 caption = {87'W',105'i',110'n',100'd',111'o',119'w',49'1'} owner = 0 x = 2147483648 y = 2147483648 xSize = 400 ySize = 367 styleFlags = 0 exFlags = 0 szClassName = 10922380 hWnd = <no value> hParent = 0 result = <no value> hMenu = 0 lFlags = 13565952 lExFlags = 16 pstr = 10634268 cloned = 0 shared = <no value> lColor = <no value> ... called from C:\e1\INC\Win32Lib\Include\Win32Lib.ew:13092 in function createEx() pControl = 1 pCaption = {87'W',105'i',110'n',100'd',111'o',119'w',49'1'} pOwner = 0 pLeft = 2147483648 pTop = 2147483648 pWidth = 400 pHeight = 367 styleFlags = 0 exFlags = 0 id = 3 at = <no value> hotkey = <no value> bgControl = <no value> style = <no value> result = <no value> hWnd = <no value> flags = <no value> extendedflags = <no value> lParenthWnd = <no value> szClassName = <no value> szCaption = <no value> hMenu = <no value> newhWnd = <no value> pstr = <no value> struct = <no value> ok = <no value> newobj = <no value> BBox = {2147483648,2147483648,400,367} lvcol = <no value> sbPanels = <no value> lHintText = {} iIconInfo = <no value> autoclose = 0 lBGColor = <no value> lUserPre = 0 lUserPost = <no value> lTemp = <no value> lControl = 1 kbdInput = <no value> cloneIt = 0 i = <no value> ... called from C:\e1\....\myprog.exw:12
From w32Dll.ew (only copied lines 172 to 229, which is the complete w32Func, which includes the offending line 212). Again, I added the line numbers:
172 global function w32Func(atom funcid, sequence parms) 173 object lRC 174 atom libfunc 175 object lFuncDef 176 object linked 177 atom memset 178 179 memset = 0 180 for i = 1 to length(parms) do 181 if sequence(parms[i]) then 182 if memset = 0 then 183 memset = w32new_memset() 184 end if 185 parms[i] = w32acquire_mem(memset, parms[i]) 186 end if 187 end for 188 189 if funcid > kMagicRtnID then 190 funcid -= kMagicRtnID 191 if funcid <= length(vw32Routines) then 192 lFuncDef = vw32Routines[funcid] 193 194 if sequence(lFuncDef) then 195 if lFuncDef[1] < 0 then 196 lFuncDef[1] = -lFuncDef[1] 197 if vw32Libraries[lFuncDef[1]][1][1] = 0 then 198 vw32Libraries[lFuncDef[1]][1] = 199 linkDLL(vw32Libraries[lFuncDef[1]][2]) 200 end if 201 lFuncDef[1] = vw32Libraries[lFuncDef[1]][1][2] 202 end if 203 204 lFuncDef = linkFunc(lFuncDef[1], -- library 205 lFuncDef[2], -- function name 206 lFuncDef[3], -- param signature 207 lFuncDef[4] -- return type 208 ) 209 vw32Routines[funcid] = lFuncDef 210 end if 211 212 lRC = c_func(lFuncDef, parms) -- This is the offending line 213 else 214 abortErr(Err_BADFUNCID) 215 end if 216 else 217 if funcid > 0 then 218 lRC = c_func(funcid, parms) 219 else 220 abortErr(Err_BADFUNCID) 221 end if 222 end if 223 224 if memset != 0 then 225 w32release_mem(memset) 226 end if 227 228 return lRC 229 end function
I must have changed something on my computer which precludes the creation of a simple window, but the environment looks the same to me as it was last month (when I last successfully ran the program.)
If somebody could give me a hint as to where or how to look for the problem, I'd be appreciative.
Mike
2. Re: Program that has run for three years just stopped, can anybody spot why?
- Posted by m_sabal Jan 24, 2011
- 1573 views
If you change Default, Default to 10,10, does it still fail?
3. Re: Program that has run for three years just stopped, can anybody spot why?
- Posted by Mike777b Jan 24, 2011
- 1525 views
Yes, exact same location.
4. Re: Program that has run for three years just stopped, can anybody spot why?
- Posted by petelomax Jan 24, 2011
- 1525 views
Have a look at your DEP settings: Control Panel/System/Advanced/Performance.
Pete
5. Re: Program that has run for three years just stopped, can anybody spot why?
- Posted by Mike777b Jan 24, 2011
- 1527 views
Thank you. Yes, it was DEP.
6. Re: Program that has run for three years just stopped, can anybody spot why?
- Posted by Vinoba Jan 24, 2011
- 1452 views
Have a look at your DEP settings: Control Panel/System/Advanced/Performance.
Pete
Helpers like you are worth your weight in Gold. Once upon a time I was worth my weight in gold - sort of. At that time, gold was $35/oz though!