discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Failed gui test:NSView_autoresize_and_rounding WAS: gnustep compiled


From: Fred Kiefer
Subject: Re: Failed gui test:NSView_autoresize_and_rounding WAS: gnustep compiled with clang and gworkspace problem
Date: Wed, 05 Oct 2011 11:18:44 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.23) Gecko/20110920 SUSE/3.1.15 Thunderbird/3.1.15

First off and completely unrelated to the actual issue: GNUstep seems to use fake main on your system. Why is this the case? As far as I know this shouldn't be needed on any normal operating system. Could you please check the configuration output of base to find out what is going on here?


On to the matter at hand. The important information that your gdb output provides is the line number of the failing check. It is line 81 and that means we already did a few resize steps and we could just have accumulated some rounding errors. The numbers reported from your stack trace for the passed in frame are completely wrong. As the numbers reported by the printf() statement are correct: I think gdb is missing up things here. We clean up our code a bit, by using an explicit conversion to double in the printf, but that is irrelevant to the gdb issue. (By the way, what size is CGFloat on your system?) One information that could help understand what is going on here is to report _autoresizingFrameError for view1 before and after the resize in line 80. There we gather the rounding error (See [NSView-resizeWithOldSuperviewSize]).

On 04.10.2011 19:49, Sebastian Reitenbach wrote:
installing gworkspace now with everything from svn, the initial problem seems 
to be gone.

I ran the tests with --debug, and examined the test a bit, that Fred pointed me 
to investigate, below is what gdb gives me, I hope it helps. Otherwise, where 
else should I set a breakpoint and examine values?

Sebastian

(gdb) bt
#0  CHECK (view=0x7f020904, frame=
         {origin = {x = -6.35119002e+09, y = -6.35128422e+09}, size = {width = 
1.72846451e+38, height = -6.35128832e+09}})
     at NSView_autoresize_and_rounding.m:26
#1  0x1c0020c2 in gnustep_base_user_main (argc=1, argv=0xcfbd4ff4) at 
NSView_autoresize_and_rounding.m:81
#2  0x08517267 in main (argc=1, argv=0xcfbd4ff4, env=0xcfbd4ffc) at 
NSProcessInfo.m:979
#3  0x1c000c97 in ___start ()
#4  0x1c000c12 in _start ()
(gdb) print view
$1 = (class NSView *) 0x7f020904
(gdb) po view
  h=-&- v=---<NSView: 0x7f020904>  f={x = 10; y = 10; width = 9; height = 10} 
b={x = 0; y = 0; width = 9; height = 10}
(gdb) frame 0
#0  CHECK (view=0x7f020904, frame=
         {origin = {x = -6.35119002e+09, y = -6.35128422e+09}, size = {width = 
1.72846451e+38, height = -6.35128832e+09}})
     at NSView_autoresize_and_rounding.m:26
26                      printf("(1) expected frame (%g %g)+(%g %g), got (%g %g)+(%g 
%g)\n",
(gdb) list
21              if (fabs(r.origin.x - frame.origin.x)>0.001
22               || fabs(r.origin.y - frame.origin.y)>0.001
23               || fabs(r.size.width - frame.size.width)>0.001
24               || fabs(r.size.height - frame.size.height)>0.001)
25              {
26                      printf("(1) expected frame (%g %g)+(%g %g), got (%g %g)+(%g 
%g)\n",
27                              frame.origin.x, frame.origin.y, 
frame.size.width, frame.size.height,
28                              r.origin.x, r.origin.y, r.size.width, 
r.size.height);
29
30                      return 0;
(gdb) print fabs(r.origin.x - frame.origin.x)
$3 = 1006647832
(gdb) print fabs(r.origin.y - frame.origin.y)
$4 = 1006647832
(gdb) print fabs(r.size.width - frame.size.width)
$5 = 1006647832
(gdb) print fabs(r.size.height - frame.size.height)
$6 = 1006647832
(gdb) print r.origin.x
$7 = 10
(gdb) print frame.origin.x
$8 = -6.35119002e+09
(gdb) print r.origin.y
$9 = 10
(gdb) print frame.origin.y
$10 = -6.35128422e+09
(gdb) print r.size.width
$11 = 9
(gdb) print frame.size.width
$12 = 1.72846451e+38
(gdb) print r.size.height
$13 = 10
(gdb) print frame.size.height
$14 = -6.35128832e+09
(gdb)
$15 = -6.35128832e+09
(gdb) print frame
$16 = {origin = {x = -6.35119002e+09, y = -6.35128422e+09}, size = {width = 
1.72846451e+38, height = -6.35128832e+09}}
(gdb)

here the other failing test:
Breakpoint 5, CHECK (view=0x7f020904, frame=
         {origin = {x = -6.35119002e+09, y = -6.35128422e+09}, size = {width = 
1.72846451e+38, height = -6.35128832e+09}})
     at NSView_autoresize_and_rounding.m:26
26                      printf("(1) expected frame (%g %g)+(%g %g), got (%g %g)+(%g 
%g)\n",
(gdb) bt
#0  CHECK (view=0x7f020904, frame=
         {origin = {x = -6.35119002e+09, y = -6.35128422e+09}, size = {width = 
1.72846451e+38, height = -6.35128832e+09}})
     at NSView_autoresize_and_rounding.m:26
#1  0x1c003d2e in gnustep_base_user_main (argc=1, argv=0xcfbd4ff4) at 
NSView_autoresize_and_rounding.m:187
#2  0x08517267 in main (argc=1, argv=0xcfbd4ff4, env=0xcfbd4ffc) at 
NSProcessInfo.m:979
#3  0x1c000c97 in ___start ()
#4  0x1c000c12 in _start ()
(gdb) bt
#0  CHECK (view=0x7f020904, frame=
         {origin = {x = -6.35119002e+09, y = -6.35128422e+09}, size = {width = 
1.72846451e+38, height = -6.35128832e+09}})
     at NSView_autoresize_and_rounding.m:26
#1  0x1c003d2e in gnustep_base_user_main (argc=1, argv=0xcfbd4ff4) at 
NSView_autoresize_and_rounding.m:187
#2  0x08517267 in main (argc=1, argv=0xcfbd4ff4, env=0xcfbd4ffc) at 
NSProcessInfo.m:979
#3  0x1c000c97 in ___start ()
#4  0x1c000c12 in _start ()
(gdb) frame 0
#0  CHECK (view=0x7f020904, frame=
         {origin = {x = -6.35119002e+09, y = -6.35128422e+09}, size = {width = 
1.72846451e+38, height = -6.35128832e+09}})
     at NSView_autoresize_and_rounding.m:26
26                      printf("(1) expected frame (%g %g)+(%g %g), got (%g %g)+(%g 
%g)\n",
(gdb) list
21              if (fabs(r.origin.x - frame.origin.x)>0.001
22               || fabs(r.origin.y - frame.origin.y)>0.001
23               || fabs(r.size.width - frame.size.width)>0.001
24               || fabs(r.size.height - frame.size.height)>0.001)
25              {
26                      printf("(1) expected frame (%g %g)+(%g %g), got (%g %g)+(%g 
%g)\n",
27                              frame.origin.x, frame.origin.y, 
frame.size.width, frame.size.height,
28                              r.origin.x, r.origin.y, r.size.width, 
r.size.height);
29
30                      return 0;
(gdb) print fabs(r.origin.x - frame.origin.x)
$17 = 1006647832
(gdb) print fabs(r.origin.y - frame.origin.y)
$18 = 1006647832
(gdb) print fabs(r.size.width - frame.size.width)
$19 = 1006647832
(gdb) print fabs(r.size.height - frame.size.height)
$20 = 1006647832
(gdb) print r.origin.x
$21 = 9
(gdb) print r.origin.y
$22 = 9
(gdb) print r.size.width
$23 = 9
(gdb) print r.size.height
$24 = 9
(gdb) print frame.origin.x
$25 = -6.35119002e+09
(gdb) print frame.origin.y
$26 = -6.35128422e+09
(gdb) print frame.size.width
$27 = 1.72846451e+38
(gdb) print frame.size.height
$28 = -6.35128832e+09
(gdb) po view
  h=&&&  v=&&&  <NSView: 0x7f020904>  f={x = 9; y = 9; width = 9; height = 9} 
b={x = 0; y = 0; width = 9; height = 9}
(gdb) print frame
$29 = {origin = {x = -6.35119002e+09, y = -6.35128422e+09}, size = {width = 
1.72846451e+38, height = -6.35128832e+09}}
(gdb) c
Continuing.
(1) expected frame (10 10)+(10 10), got (9 9)+(9 9)
Failed test:     NSView autoresize rounding works




reply via email to

[Prev in Thread] Current Thread [Next in Thread]