Develop

Ticket #1135 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Assertion in as_bearing()

Reported by: xtophe Owned by: Turbo
Priority: high Milestone: XCSoar 6.1
Component: Waypoints Version: 6.1
Keywords: Cc:

Description

I get an assertion in Angle::as_bearing() when I click on a waypoint when i'm in fly mode without any GPS configured.

I think bearing/distance should either be blank or "---" or "N/A")
Or use the Home airfield as position

#3  0xb73948b8 in __assert_fail (
    assertion=0x827c4b4 "fabs(m_value)< fixed(100)*(6.28318530718)", 
    file=0x827c4a0 "src/Math/Angle.cpp", line=79, 
    function=0x827c500 "Angle Angle::as_bearing() const") at assert.c:81
#4  0x081c6839 in Angle::as_bearing (this=0xbfeff398) at src/Math/Angle.cpp:79
#5  0x080d36d6 in SunEphemeris::GetMeanSunLongitude (this=0xbff01800, 
    d=-730531.5) at src/Math/SunEphemeris.cpp:120
#6  0x080d383b in SunEphemeris::CalcSunTimes (this=0xbff01800, Location=..., 
    date_time=..., TimeZone=1) at src/Math/SunEphemeris.cpp:159
#7  0x0811210b in dlgWayPointDetailsShowModal (parent=..., way_point=..., 
    allow_navigation=true) at src/Dialogs/dlgWayPointDetails.cpp:692
#8  0x0808b20e in PopupNearestWaypointDetails (way_points=..., location=..., 
    range=3085.5539971949511, scalefilter=true) at src/Dialogs/Dialogs.cpp:53
#9  0x080b0949 in GlueMapWindow::on_mouse_up (this=0x82dfd4c, x=525, y=535)
    at src/GlueMapWindowEvents.cpp:231
#10 0x0812bc74 in ContainerWindow::on_mouse_up (this=0x82dfca0, x=525, y=535)
    at src/Screen/SDL/ContainerWindow.cpp:258
#11 0x0812dfe2 in TopWindow::on_event (this=0x82dfca0, event=...)
    at src/Screen/SDL/TopWindow.cpp:219
#12 0x0812eaf8 in EventLoop::dispatch (this=0xbff01a38, event=...)

Change History

comment:1 Changed 2 years ago by xtophe

Just checked in 6.0.9 and it behaves correctly giving bearing/distance from home airport

comment:2 Changed 2 years ago by Turbo

reproducable on my computer...

comment:3 Changed 2 years ago by Turbo

  • Owner set to Turbo
  • Status changed from new to accepted

comment:4 Changed 2 years ago by Turbo

problem is basic.DateTime? being reset to zero without GPS connection somehow...

comment:5 Changed 2 years ago by Turbo

  • Status changed from accepted to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.