Hi,

I just installed Fedora 9 on my x86 (32 bits) laptop, which comes with
gcc (GCC) 4.3.0 20080428 (Red Hat 4.3.0-8).

I can compile LilyPond binary succesfully, but running it on any input
file makes it hang on an infinite loop, most often after Preprocessing
graphical objects; every Control-C interrupt I issued with gdb happenned
in lily/skyline.cc in function Skyline::internal_merge_skyline line 184.

I don't know why this loop seems to never end with GCC 4.3 on my box,
whereas it wasn't with GCC 4.1 on Fedora 8.  I attached the fix I made
in my source tree in order to be able to compile the documentation.
This is probably a dirty fix which may hide the real problem (I guess
there are some numerical rounding issues, but it may be well something
else), so I don't expect it to be applied to master.  FWIW the loop in
this function looks still infinite if EPSNULL is set to 1e-15.  When
doing a quick comparison of regtests and examples in input/ between
2.11.45 release and latest Git plus the change below, I saw that skyline
spacing has been screwed up, but as I can't build without my change, I
don't know if it is caused by this change or by other changes made since
2.11.45.

Cheers,
John
diff --git a/lily/skyline.cc b/lily/skyline.cc
index 5297f63..362fbba 100644
--- a/lily/skyline.cc
+++ b/lily/skyline.cc
@@ -45,6 +45,7 @@
 /* If we start including very thin buildings, numerical accuracy errors can
    arise. Therefore, we ignore all buildings that are less than epsilon wide. */
 #define EPS 1e-5
+#define EPSNULL 1e-12
 
 static void
 print_buildings (list<Building> const &b)
@@ -215,6 +216,9 @@ Skyline::internal_merge_skyline (list<Building> *s1, list<Building> *s2,
       if (end >= s1->front ().end_)
 	s1->pop_front ();
 
+      if (abs (end - x) < EPSNULL)
+	break;
+
       x = end;
     }
   result->reverse ();
_______________________________________________
lilypond-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to