On Wed, May 20, 2009 at 6:06 PM, Tim Moore <timo...@redhat.com> wrote:
> Tim Moore wrote:
>> Durk Talsma wrote:
>>> On Friday 15 May 2009 20:31:17 Durk Talsma wrote:
>
>>>
>>> While trying to trap bad data in this the popMatrix function, I just
>>> noticed that a bad transformation matrix is already set up relatively
>>> early in the process, only a few levels deep at the stack. I haven't
>>> been able to relate this to any meaningful object yet. (All that came up
>>> was the name "Scene").
>>>
>>> So, it looks like a transformation error early on blows up the intersect
>>> line vector(s) already. and scenegraph is traversed further down, OSG
>>> keeps happily multiplying already corrupted data with valid
>>> transformation data further down the line, restuling in an intersect
>>> line, composed of NaNs. This goes unnoticed, until the error is finally
>>> picked up at the first possible occasion where there's a nan error
>>> check. That is, in trialintersect.
>>>
>>> I hope to continue this investigation later, and hope to be able to
>>> traverse the bad data to their true source.
>> It may be helpful to dump the scene graph to a file (from the debug menu)
>> once you're getting the NaN error. Hopefully the offending matrix will
>> be printed with NaNs instead of valid coordinates.
>>
>> Tim
> I've added an --enable-fpe argument which, on Linux, will cause an abort or
> core dump on a division-by-zero or other invalid floating point operation,
> including generating NaNs and overflowing float-to-integer conversions. See
> if you can get to the source of the NaNs using that.
>
> Tim
>

Hi Tim and All,

As per conversation on IRC ia have been able to get a backtrace when
using --enable-fpe.

FG was not paused by me with the error occuring very early on (no
sound not image showing in the spash screen). Machine is a Dual Core
Intel processor with a nvidia 8600GT video card.

I did add a debug line to the file
src/Instrumentation/inst_vertical_speed_indicator.cxx on line 207.
flightgear$ grep -n DEBUG src/Instrumentation/* |grep GP
src/Instrumentation/inst_vertical_speed_indicator.cxx:207:      
printf("DEBUG GP: SeaIngHG: %fL InternalSeaInHG: %fL DT: %fL\n",
sea_inhg, _internal_sea_inhg, dt);

Either dt is zero or I have the parameter in the printf line wrong.

Please find attached a full backtrace from GDB. Let me know if you
could do with more information.

Regards


George
gpatter...@gorilla-desktop:~$ gdb fgfs
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...
(gdb) run --enable-fpe --aircraft=b1900d --airport=LNCM
Starting program: /usr/local/bin/fgfs --enable-fpe --aircraft=b1900d 
--airport=LNCM
[Thread debugging using libthread_db enabled]
[New Thread 0x7f4ffb2a7790 (LWP 30425)]
[New Thread 0x7f4fec8ee950 (LWP 30428)]
[New Thread 0x7f4fec0ed950 (LWP 30429)]
[New Thread 0x7f4feb0a5950 (LWP 30430)]
[New Thread 0x7f4fea8a4950 (LWP 30431)]
DEBUG GP: SeaIngHG: 29.920000L InternalSeaInHG: 29.920000L DT: 0.000000L

Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread 0x7f4ffb2a7790 (LWP 30425)]
0x00000000007995d7 in InstVerticalSpeedIndicator::update (this=0xa926050, dt=0) 
at inst_vertical_speed_indicator.cxx:208
208                 double rate_sea_inhg_per_s = ( sea_inhg - 
_internal_sea_inhg ) / dt;
(gdb) run --enable-fpe --aircraft=b1900d --airport=LNCM
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/local/bin/fgfs --enable-fpe --aircraft=b1900d 
--airport=LNCM
[Thread debugging using libthread_db enabled]
[New Thread 0x7fd27858a790 (LWP 30432)]
[New Thread 0x7fd269bd1950 (LWP 30433)]
[New Thread 0x7fd2693d0950 (LWP 30434)]
[New Thread 0x7fd263fff950 (LWP 30521)]
[New Thread 0x7fd2637fe950 (LWP 30522)]
DEBUG GP: SeaIngHG: 29.920000L InternalSeaInHG: 29.920000L DT: 0.000000L

Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread 0x7fd27858a790 (LWP 30432)]
0x00000000007995d7 in InstVerticalSpeedIndicator::update (this=0xa67b430, dt=0) 
at inst_vertical_speed_indicator.cxx:208
208                 double rate_sea_inhg_per_s = ( sea_inhg - 
_internal_sea_inhg ) / dt;
(gdb) bt full
#0  0x00000000007995d7 in InstVerticalSpeedIndicator::update (this=0xa67b430, 
dt=0) at inst_vertical_speed_indicator.cxx:208
        pressure_inhg = 33.309936
        sea_inhg = 29.920000000000002
        speed_up = <value optimized out>
        rate_sea_inhg_per_s = 0
#1  0x00000000009b8b21 in SGSubsystemGroup::Member::update (this=0xa613a10, 
delta_time_sec=<value optimized out>) at subsystem_mgr.cxx:306
No locals.
#2  0x00000000009bb20c in SGSubsystemGroup::update (this=0xa6ed070, 
delta_time_sec=0) at subsystem_mgr.cxx:159
        b = -2.7299999999813735
        i = 16
#3  0x00000000009b8b21 in SGSubsystemGroup::Member::update (this=0xa6f08d0, 
delta_time_sec=<value optimized out>) at subsystem_mgr.cxx:306
No locals.
#4  0x00000000009bb20c in SGSubsystemGroup::update (this=0x1aff868, 
delta_time_sec=0) at subsystem_mgr.cxx:159
        b = -0.96499999996740371
        i = 3
#5  0x00000000004289f1 in fgMainLoop () at main.cxx:460
        model_hz = 120
        scenery_loaded = false
        wait_for_scenery = <value optimized out>
        throttle_hz = <value optimized out>
        dtMax = <value optimized out>
        t = (SGTime *) 0x8a6a550
        visibility_meters = <value optimized out>
        current_view = <value optimized out>
        viewPos = {<SGVec3Storage<double>> = {<osg::Vec3d> = {_v = 
{1.4825668938793456e-316, 4.9406564584124654e-324, 
        6.9532500560281433e-310}}, <No data fields>}, <No data fields>}
        geodViewPos = {_lon = 6.9532500560281433e-310, _lat = 
6.9436903966721665e-310, _elevation = 0}
        geodPos = {_lon = 8.5012369767814769e-316, _lat = 
1.4825653128692789e-316, _elevation = 1.4825668938793456e-316}
        model_pos = {<SGVec3Storage<double>> = {<osg::Vec3d> = {_v = 
{6.9532500560288844e-310, 6.9436906923200115e-310, 
        6.9436918673759514e-310}}, <No data fields>}, <No data fields>}
        model_vel = {-1.06935171e-27, -1.80266094, -3.2593254e+28}
---Type <return> to continue, or q <return> to quit---
        source_pos_offset = {4.55720529e+17, 1.78196657, 1.63030322e-07}
        orient = {8.40779079e-45, 0, 3.66094388e+31, 4.58532883e-41, 
6.45947024e-38, 0}
        longitude = {_ptr = 0x1b03d10}
        latitude = {_ptr = 0x1b03f10}
        altitude = {_ptr = 0x1b040d0}
        vn_fps = {_ptr = 0x1b04f90}
        ve_fps = {_ptr = 0x1b05110}
        vd_fps = {_ptr = 0x1b05320}
        clock_freeze = {_ptr = 0x1b0c990}
        cur_time_override = {_ptr = 0x1b0c3c0}
        max_simtime_per_frame = {_ptr = 0x1b11720}
        frame_signal = {_ptr = 0xd72b0f0}
        first_time = false
        reminder = 5.1800000000000004e-06
        last_time = 1242830103
        frames = 1
        last_clock_freeze = false
        last_listener_pos = {0, 0, 0}
        last_model_pos = {0, 0, 0}
#6  0x000000000046c94f in fgOSMainLoop () at fg_os_osgviewer.cxx:177
        idleFunc = (fgIdleHandler) 0x49
        drawFunc = (fgDrawHandler) 0x42ab20 <FGRenderer::update()>
#7  0x00000000004280b5 in fgMainInit (argc=4, argv=0x7fff806b7a98) at 
main.cxx:1005
        version = {static npos = 18446744073709551615, 
  _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = 
{<No data fields>}, <No data fields>}, 
    _M_p = 0x1afdba8 "unknown version"}}
        controls = <value optimized out>
        base_version = {static npos = 18446744073709551615, 
  _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = 
{<No data fields>}, <No data fields>}, _M_p = 0x1b03858 "1.9.0"}}
        required_version = "1.9.0"
#8  0x000000000042640d in main (argc=4, argv=0x7fff806b7a98) at 
bootstrap.cxx:216
---Type <return> to continue, or q <return> to quit---
        i = 1
        s = <value optimized out>
        s = <value optimized out>
        t = <value optimized out>
(gdb) 


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to