PDA

View Full Version : Blank screenshots


johnfaris
20-Oct-2005, 03:16 PM
A couple of times I have had the Exception "A call to an OS function failed." on function GetCursorPos from my code. EurekaLog gives me the call stack and all the other usual stuff in the log file but the attached screenshot in the email is either entirely black or completely white. It would be useful to know what the user was doing at the time of this error, but without the screenshot this a lot harder. Any ideas what could be going wrong or what could be causing GetCursorPos to fail in the first place? :confused:

admin
21-Oct-2005, 09:16 AM
johnfaris wrote:
> A couple of times I have had the Exception "A call to an OS function
> failed." on function GetCursorPos from my code. EurekaLog gives me the
> call stack and all the other usual stuff in the log file but the
> attached screenshot in the email is either entirely black or completely
> white. It would be useful to know what the user was doing at the time
> of this error, but without the screenshot this a lot harder. Any ideas
> what could be going wrong or what could be causing GetCursorPos to fail
> in the first place? :confused:

Assuming it is a resource problem, the limitation is internal to
Windows. The only way to increase total resources is to upgrade the OS.
You can also reduce resource requirements by not automatically creating
forms and destroying them when no longer needed.

Therefore Windows it's incapable to generate a screenshot, because the
required graphical resources aren't available!


PS: what is the Windows version used?


--
Best regards...

Fabio Dell'Aria.
----------------
http://www.eurekalog.com
Catch every BUG showing line n.

johnfaris
21-Oct-2005, 10:03 AM
I wish I could say 9x, but it is Windows XP Pro! :(

admin
21-Oct-2005, 10:25 AM
johnfaris wrote:
> I wish I could say 9x, but it is Windows XP Pro! :(

Really strange.
Can you tell me ore about your application.
Is it a server application ran for more hours?

--
Best regards...

Fabio Dell'Aria.
----------------
http://www.eurekalog.com
Catch every BUG showing line n.

johnfaris
21-Oct-2005, 10:30 AM
The application is Desktop based and is simply a GUI to a SQL Server database via a middle tier. It is used by over 100 users every day, so I am surprised if there is a resource problem as we would see it a lot more. The log file for this user indicates his PC had only been switched on for 26 minutes!

admin
21-Oct-2005, 10:35 AM
johnfaris wrote:
> The application is Desktop based and is simply a GUI to a SQL Server
> database via a middle tier. It is used by over 100 users every day, so
> I am surprised if there is a resource problem as we would see it a lot
> more. The log file for this user indicates his PC had only been
> switched on for 26 minutes!

Some times this errors has generated by a wrongly VGA Driver.
Have you try to update the PC's VGA driver?

What's the VGA used in this PC?

--
Best regards...

Fabio Dell'Aria.
----------------
http://www.eurekalog.com
Catch every BUG showing line n.

johnfaris
24-Oct-2005, 09:06 AM
Sorry Fabio but I am not convinced that it is the VGA driver as it has happened on several different PCs. Is there any way of monitoring resource levels in XP? (9x used to have a resource monitor program, but I am not sure that works with XP). I know there are commercial apps such as AQTime but they seem really slow to me and have never really helped when I've tried them. Anyone have any suggestions?

admin
24-Oct-2005, 09:41 AM
johnfaris wrote:
> Sorry Fabio but I am not convinced that it is the VGA driver as it has
> happened on several different PCs. Is there any way of monitoring
> resource levels in XP? (9x used to have a resource monitor program,
> but I am not sure that works with XP). I know there are commercial
> apps such as AQTime but they seem really slow to me and have never
> really helped when I've tried them. Anyone have any suggestions?

If all PC using the same VGA card then it's possible.

BTW I have searched in the Borland Quality-Central bugs and I have found
a similar bug for Delphi 6/7/7.1.


See at:
http://qc.borland.com/wc/qcmain.aspx?d=8172

Other discussion on this issue at:
http://www.delphipages.com/threads/thread.cfm?ID=139291&G=139291


I hope to have helped you a bit more, now! :)

NOTE: the black/blank screenshot it's caused by this bug (not is an
EurekaLog problem).

--
Best regards...

Fabio Dell'Aria.
----------------
http://www.eurekalog.com
Catch every BUG showing line n.

johnfaris
25-Oct-2005, 12:13 PM
Thanks Fabio. I hadn't seen that QC entry before. Hopefully it may help me resolve the problem :)

johnfaris
28-Oct-2005, 04:41 PM
I have not managed to track this issue down yet, but I thought I would also mention that I occassionally see "Access Denied" errors too. In these cases instead of a screenshot and a log file I get the attachments all encoded into the message body as plain text e.g.

To: <LIVE.eqoexceptions@equanet.com>
Content-Type: multipart/mixed; boundary="=_xcjvnxkbhvfkxzhfdbvzldjhfv";
MIME-Version: 1.0
Message-ID: <7550687@localhost.com>

This is a multi-part message in MIME format

--=_xcjvnxkbhvfkxzhfdbvzldjhfv
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Message Body

--=_xcjvnxkbhvfkxzhfdbvzldjhfv
Content-Type: application/octet-stream;
name="EqOffice3.elf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="EqOffice3.elf"

RXVyZWthTG9nIDUuMC40DQoNCkFwcGxpY2F0aW9uOg0KLS0tLS 0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0KICAxLjEgU3 RhcnQgRGF0ZSAgICAgIDogRnJpLCAy
OCBPY3QgMjAwNSAxNDozMjoxOSArMDEwMA0KICAxLjIgTmFtZS 9EZXNjcmlwdGlvbjogRXFPZmZpY2Uz

<snip>

This obviously does not help me in tracking this problem down!

admin
02-Nov-2005, 04:08 PM
johnfaris wrote:
> I have not managed to track this issue down yet, but I thought I would
> also mention that I occassionally see "Access Denied" errors too. In
> these cases instead of a screenshot and a log file I get the
> attachments all encoded into the message body as plain text e.g.
>
> To: <LIVE.eqoexceptions@equanet.com>
> Content-Type: multipart/mixed;
> boundary="=_xcjvnxkbhvfkxzhfdbvzldjhfv";
> MIME-Version: 1.0
> Message-ID: <7550687@localhost.com>
>
> This is a multi-part message in MIME format
>
> [...]

I'm really sorry but I think this isn't an EurekaLog problem but an OS
problem (not bug but problem).

I need more info to can help you. :(



--
Best regards...

Fabio Dell'Aria.
----------------
http://www.eurekalog.com
Catch every BUG showing line n.

johnfaris
10-Nov-2005, 01:04 PM
Finally solved the email problem. Basically I had code within the ExceptionNotify event of the EurekaLog component that was setting the email subject to the Exception's Message property. This way I was able to group email reports easily in Outlook. However, the DBAs were including carriage returns in their error messages and this causes the email to get constructed incorrectly as SMTP does not seem to support these characters in subjects. Try the following to recreate:-

In EurekaLog1ExceptionNotify event handler...

EurekaExceptionRecord.CurrentModuleOptions.EMailSu bject :=
'Error:' + #13#10+ 'Contact Support.';

If you send set the option in EurekaLog to send the error as an email you will get a misformed email as I reported before.

Glad that's solved! :D

johnfaris
10-Nov-2005, 01:07 PM
I just realised that the "Access Denied" Errors that led to me reporting the problem were not coming from the DBAs, so I wonder what bizarre character they contain... More research required!

admin
10-Nov-2005, 04:00 PM
johnfaris wrote:
> Finally solved the email problem. Basically I had code within the
> ExceptionNotify event of the EurekaLog component that was setting the
> email subject to the Exception's Message property. This way I was able
> to group email reports easily in Outlook. However, the DBAs were
> including carriage returns in their error messages and this causes the
> email to get constructed incorrectly as SMTP does not seem to support
> these characters in subjects. Try the following to recreate:-
>
> In EurekaLog1ExceptionNotify event handler...
>
> EurekaExceptionRecord.CurrentModuleOptions.EMailSu bject :=
> 'Error:' + #13#10+ 'Contact Support.';
>
> If you send set the option in EurekaLog to send the error as an email
> you will get a misformed email as I reported before.
>
> Glad that's solved! :D

Thank you for the good feedback.

I have just find and fixed this bug! ;)

--
Best regards...

Fabio Dell'Aria.
----------------
http://www.eurekalog.com
Catch every BUG showing line n.

johnfaris
11-Nov-2005, 09:10 AM
I thought it was an SMTP problem, but you are saying it was a EurekaLog issue? In that case is it likely that you have also fixed it for those "Access Denied" Exceptions I was getting, as they do not have new line characters in them?

admin
11-Nov-2005, 09:58 AM
johnfaris wrote:
> I thought it was an SMTP problem, but you are saying it was a EurekaLog
> issue? In that case is it likely that you have also fixed it for those
> "Access Denied" Exceptions I was getting, as they do not have new line
> characters in them?

Yes, it's an SMTP problem, but EurekaLog can solve it checking every
field used in the SMTP send process and fixing it! :)

--
Best regards...

Fabio Dell'Aria.
----------------
http://www.eurekalog.com
Catch every BUG showing line n.

johnfaris
01-Dec-2005, 10:38 AM
I have finally figured out what is causing GetCursorPos to fail! It happens if the function is called when the PC is locked - i.e. when the screensaver is running and is secure or when the user has pressed Windows L.

I am assuming that EurekaLog calls this function to draw the cursor on the screenshot, and this probably explains the blank screenshots. It is quite possible for my app to generate errors whilst the user is not actively using it as it does lots of things whilst "idle"! Hope this helps you.

:D

admin
01-Dec-2005, 05:33 PM
Hi,

johnfaris wrote:
> I have finally figured out what is causing GetCursorPos to fail! It
> happens if the function is called when the PC is locked - i.e. when the
> screensaver is running and is secure or when the user has pressed
> Windows L.
>
> I am assuming that EurekaLog calls this function to draw the cursor on
> the screenshot, and this probably explains the blank screenshots. It
> is quite possible for my app to generate errors whilst the user is not
> actively using it as it does lots of things whilst "idle"! Hope this
> helps you.
>
> :D

Yes, thank you.

But EurekaLog cannot obtain a screenshot when Windows is in "secure
mode" so in this cases the screenshot will be every blank! :(

--
Best regards...

Fabio Dell'Aria.
----------------
http://www.eurekalog.com
Catch every BUG, every time!

johnfaris
02-Dec-2005, 09:00 AM
Are you checking for this problem? If not then isn't there a danger of the original exception information being lost if the screenshot routine is failing? It would just explain why some of the blank screenshots I get also have a Log file that has nothing useful in it i.e. no units/line numbers from code I have written.

admin
02-Dec-2005, 09:57 AM
Hi,

johnfaris wrote:
> Are you checking for this problem? If not then isn't there a danger of
> the original exception information being lost if the screenshot routine
> is failing? It would just explain why some of the blank screenshots I
> get also have a Log file that has nothing useful in it i.e. no
> units/line numbers from code I have written.

I have just check trying to reproduce it, and GetCursorPos Windows API
always works fine.

The screenshot is always black but only because in protect mode Windows
don't allow to EurekaLog to can access to the display bitmap.

--
Best regards...

Fabio Dell'Aria.
----------------
http://www.eurekalog.com
Catch every BUG, every time!