Issue 63620 - testtool: comand snapshot gets black pictures sometimes
Summary: testtool: comand snapshot gets black pictures sometimes
Status: CLOSED WONT_FIX
Alias: None
Product: utilities
Classification: Unclassified
Component: automation (show other issues)
Version: OOo 2.0.2
Hardware: Mac Mac OS X, all
: P3 Trivial (vote)
Target Milestone: OOo PleaseHelp
Assignee: philipp.lohmann
QA Contact: Unknown
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-25 15:56 UTC by b.osi.ooo
Modified: 2009-03-19 15:01 UTC (History)
9 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
black picture? (124.82 KB, image/bmp)
2007-02-11 16:05 UTC, b.osi.ooo
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description b.osi.ooo 2006-03-25 15:56:54 UTC
when using the command snapshot on a dialog, I only get
files where everything is black.

system: MacOS X
Comment 1 b.osi.ooo 2006-03-25 15:57:55 UTC
set target
Comment 2 b.osi.ooo 2006-03-26 11:07:32 UTC
.
Comment 3 gregor.hartmann 2006-04-07 16:16:00 UTC
this is a porting issue which has probably to get fixed in vcl
I just call Window::SnapShot() to get the bitmap
Comment 4 eric.bachard 2006-07-11 16:26:31 UTC
Is this issue still valid ?
Comment 5 b.osi.ooo 2006-07-13 22:30:00 UTC
Just checked in 680m7 Build:9044
PPC Mac OS X 10.3
X11 1.0 - XFree86 4.3.0
This issue is still valid

To test it, use the TestTool,
in .testtoolrc insert:
[Screenshot]
Current=1
All=1

and run a short update test e.g qa/qatesttool/math/m_updt.bas
after that you have some screenshots in the user directory.
for every screenshot:


the path is shown in the resultfile of the TestTool application
Comment 6 pavel 2007-02-03 08:33:55 UTC
I have tested it here with OOF680_m6 build and screenshots work as usual.

What program have you used to view them? I remember I have had the same problem on SUSE Linux with 
xv - it opened some bitmaps as completely black even if e.g. display displayed them correctly.

WORKSFORME?
Comment 7 b.osi.ooo 2007-02-11 16:02:59 UTC
Just checked on MacOS X Tiger - still black;
Will attach the file.
Looked at with OOo and 'Preview'
OOo OOF680m2
Comment 8 b.osi.ooo 2007-02-11 16:05:20 UTC
Created attachment 42932 [details]
black picture?
Comment 9 pavel 2007-02-11 19:32:00 UTC
Shaun, James: can you give us some .bmp files from your testtool?
Comment 10 lohmaier 2007-02-11 20:22:29 UTC
I doubt this is fixable without changing the way the screenshots are aquired
completely.
I think this is a problem with Apple's X11. Even xmag doesn't work there (but is
shipped with it) - xmags only shows black frames as well...
Comment 11 pavel 2007-02-11 20:43:28 UTC
I have taken some screenshots and here we are:

http://tmp.janik.cz/OpenOffice.org/MacOSX/testtool-screenshots/

Some of them are really black - why?

Any ideas?
Comment 12 pavel 2007-02-12 08:15:27 UTC
I have collected even more screenshots at

http://tmp.janik.cz/OpenOffice.org/MacOSX/testtool-screenshots-2/
Comment 13 b.osi.ooo 2007-02-12 08:48:52 UTC
Sometimes, some are black, without a known reason, regardingless on which
platform it ran.
One issue that is workarounded, was a timing issue: the screenshot was taken,
before the dialog was completely drawn - which resultet in a 'snow' picture.
I couldn't reproduce the 'sometimes black' pictures - they were never the same.
So I lived with about 3% of all pictures are black on the others platforms - not
Mac.

Now that I see, that some work on Mac, I will run through the complete
application, to also get some good ones - and see if I get the same black as you.
Comment 14 pavel 2007-02-12 11:35:54 UTC
On my system, I see the same black images for every run of the testtool. The same applies to correct runs.
Comment 15 pavel 2007-02-12 12:00:50 UTC
To sum up, when running firstandtopten, the following dialogs are black:

HID_PASSWD 33071
HID_OPTIONS_DICT_NEW 33814
HID_OPTIONS_DICT_EDIT 33815
HID_DLG_NAME 33818
HID_LNGDLG_NUM_PREBREAK 34168
HID_EDIT_MODULES 34169
HID_OPTIONS_JAVA_PARAMETER 39998
HID_OPTIONS_JAVA_CLASSPATH 39999
HID_XMLSEC_TP_SECLEVEL 43069
HID_XMLSEC_TP_TRUSTSOURCES 43070
HID_MM_TESTACCOUNTSETTINGS 54979
HID_MM_SERVERAUTHENTICATION 54993
svx:ModalDialog:DLG_DOCUMENTLINK 1346109440

Do you see any common thing in them?

Many of them are connected with security features - passwords, server authentication, trust sources, ...

I'm out of ideas now.
Comment 16 shaunmcdonald131 2007-02-12 23:52:04 UTC
I've starting doing the tests with screenshots.
http://smsm1.selfip.info/~oootestsmsm1/ooo/testtoolresults/screenshots1/writer/33358.bmp
is one of a few that does work.

Most of the screenshots that I have looked at are just black.

For more screenshots see:
http://smsm1.selfip.info/~oootestsmsm1/ooo/testtoolresults/screenshots1/
Comment 17 jjmckenzie 2007-02-13 04:12:56 UTC
@pjanik:

Testtool crashed with a error 5.  Interesting that this happened as this is an
error that I am not familiar with.

Here is the full text of the error message from xterm:

soffice.bin(6998,0x3003c00) malloc: *** error for object 0x5212620: incorrect
checksum for freed object - object was probably modified after being freed,
break at szone_error to debug
soffice.bin(6998,0x3003c00) malloc: *** set a breakpoint in szone_error to debug


Fatal exception: Signal 5
Please turn on Enable Crash Reporting and
Automatic Display of Crashlogs in the Console application
/Applications/OpenOffice.org 2.2.app/Contents/MacOS/program/soffice: line 236: 
6998 Abort trap              "$sd_prog/$sd_binary" "$@"

Looks like a malloc error, but I could be wrong.
BTW, this is OOF680_m6.

James McKenzie
Comment 18 shaunmcdonald131 2007-02-13 09:40:01 UTC
jjmckenzie: I have by chance seen the malloc error that you mention (or
something  very similar). Maybe it was time I started storing the log of the
output from testtool instead of me just seeing a few snippets of it.
Comment 19 b.osi.ooo 2007-02-19 18:23:18 UTC
1. please don't make a discussion list of this issue ;-) 1 problem per issue only
-> malloc please go to a new issue
thx.

2. I did a run of screenshots with linux, there I don't get any  black ones
right now :-)

3. Will do a run on mac, and look if i can see a reason.

Comment 20 b.osi.ooo 2007-03-15 12:36:57 UTC
Further investigating;

I choose the Dialogs in writer options:
Writer->Tools->Options->Language Settings->
A: The dialog itself: name in testtool is 'TabLinguistik' ID: 33812
B: pressing upper button 'Edit' -> Dialog: Edit Modules : testtool name:
'ModuleBearbeiten' ID: 34169

Using A: TabLinguistik.SnapShot("/some/path/A.bmp") - picture is dialog
Doing it for B results in black picture;

xmag doesn't count, since it always produces black ;-)
I took the xwd screenshot tool for A and B and both screenshots are ok
(start xwd -out /some/path/A.xwd And then convert A.xwd A.png)

->PL: Do you have an Idea, why the ScreenShot command doesn't work on some
dialogs on MacOS X - X11?
      (See entry from GH from 7.4.2006 for how testtool uses the .ScreenShot
command.)
Comment 21 philipp.lohmann 2007-03-15 15:59:28 UTC
can anyone check whether cranking up the timeout in
gsl/vcl/unx/source/window/salframe.cxx in the :Snapshot method (say from 50 ms
as is to 500 ms) fixes the problem ? That timeout always was a tad arbitrary.
Comment 22 pavel 2007-04-04 21:33:35 UTC
I added one zero to 5000... there but the same set of screenshots is black again.
Comment 23 philipp.lohmann 2007-04-19 16:00:32 UTC
I tried some ideas to narrow this down with tbo, but sadly to no avail.

1. It does not help to call XSync repeatedly to force the Xserver to send us
still missing events.
2. Currently the snapshot is being done from the root window (to snapshot the
window manager's decoration, too). It does not help to get the image from the
dialog window itself instead.
3. Changing the region from which the image is taken does not help either.

Always the Xserver sends us a completely black image in XGetImage

Really astonishing is the fact, that this reproducibly does not work for some
dialogs while it works for most.

Sorry, currently I'm fresh out of ideas.
Comment 24 philipp.lohmann 2009-03-19 14:59:56 UTC
Since the problem only occured on Mac/X11 which is now dead, I think we can
close this issue.
Comment 25 philipp.lohmann 2009-03-19 15:01:23 UTC
closing