possible win32lib bug

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

Windows 10 Euphoria 4.05 Win32Lib 0.70.20

Building GUI using win32lib. I have encountered a problem. Been bugging me for a long time because I don't understand it.
It has to do with graceful exits. Anytime the user makes a mistake the software detects it and throws up a MsgBox with an explanation. User clicks OK in MsgBox. If it is an unrecoverable fatal error, immediately upon returning from the MsgBox, I call closeApp() to terminate the program. One senario is when printing to a network printer. To print the user is asked via the win32lib getPrinter() utility to select a printer. If the user clicks CANCEL in the getPtinter() window the routine returns an empty string. I detect this empty string I report the problem using the MsgBox. User clicks MsgBox OK and program calls closeApp(). I get an error from win32lib and the program crashes.
Error Message:
Win32Lib AppWindow - Error Warning
Error code 436
getRect:GetObject for bitmap failed.

There is a workaround to prevent the crash. I print a single space <32> via puts(1, " ") to the console and then call closeApp(). Everything works as advertised.

if not printer_setup () then 
	puts(1, " ") 
	closeApp () 
	return 
end if 


This snippet includes the workaround. Take out the puts(1," ") and program crashes. I have explored win32Lib; however, the chances of me figuring this out are slim to none.
As I said, I think it's a bug in win32Lib
Anyone have any thoughts?

Thanks in advance for your patience.
regards,
jd

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

Search



Quick Links

User menu

Not signed in.

Misc Menu