Compiler Error (Wings3d on Mac OS X)

Brent Fulgham <>
Wed Jul 20 07:41:40 CEST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm getting an Internal Consistency Check error when attempting to  
build Wings3D on Mac OS X 10.4.2 (Erlang OTP R10B-6):

erlc -pa /ebin +warn_unused_vars -I/include -I ../e3d -W +debug_info  
'-Dwings_version="0.98.31"' -pa ../ebin -o../ebin wings_color.erl
wings_color: function internal_rgb_to_hsv/3+97:
   Internal consistency check failed - please report this bug.
   Instruction: {test,is_eq_exact,{f,80},[{x,0},{atom,error}]}
   Error:       {unsafe_instruction,{float_error_state,cleared}}:

make[2]: *** [../ebin/wings_color.beam] Error 1

What would people recommend as a first step toward debugging this  
problem?  Is it arcana only in the realm of Ulf, Joe, or one of the  
other Erlang masters?

The offending statements seems to be:

internal_rgb_to_hsv(R, G, B) ->
     Max = lists:max([R,G,B]),
     Min = lists:min([R,G,B]),
     V = Max,
     {Hue,Sat} = try
                     {if
                          Min == B -> (G-Min)/(R+G-2.0*Min);
                          Min == R -> (1.0+(B-Min)/(B+G-2.0*Min));
                          Min == G -> (2.0+(R-Min)/(B+R-2.0*Min))
                      end*120,(Max-Min)/Max}
                 catch
                     error:badarith ->
                         {undefined,0.0}
                 end,
     {Hue,Sat,V}.


Thanks,

- -Brent
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFC3eQUzGDdrzfvUpURAo8IAJ9hfewubm2qWMRygrxkvmHyu6O9IwCfcxhd
mRalH4N24feln9YcpMmg5cQ=
=iRcZ
-----END PGP SIGNATURE-----



More information about the erlang-questions mailing list