Orbiter-Forum  

Go Back   Orbiter-Forum > Projects > ORBITER: 2010-P1 and newer > Bug
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

Division by zero Orbiter BETA 190220 Issue Tools
issueid=1399 02-24-2019 01:11 AM
Donator
Division by zero Orbiter BETA 190220
Close to pole zooming on Map MFD causes div by zero CTD

Orbiter BETA [v190220] causes a crash to desktop due to a division by zero (unhandled) exception.

I've added a scenario to reproduce this issue. Just Zoom in/out the right side Map MFD and after a while the crash appears.

It happens with the inline GC as well as with D3D9Client.

Scenario:
Code:
BEGIN_DESC
Orbiter saved state at T = 961
END_DESC

BEGIN_ENVIRONMENT
  System Sol
  Date MJD 55977.2285314711
END_ENVIRONMENT

BEGIN_FOCUS
  Ship Gary
END_FOCUS

BEGIN_CAMERA
  TARGET Gary
  MODE Cockpit
  FOV 34.00
  BEGIN_PRESET
    Ground:Gary:34.00:Moon -158.63415 5.40396 150.00
  END_PRESET
END_CAMERA

BEGIN_HUD
  TYPE Orbit
  REF AUTO
END_HUD

BEGIN_MFD Left
  TYPE Map
  REF Moon
  ZOOM 2
  POS -2.77 0.10
END_MFD

BEGIN_MFD Right
  TYPE Orbit
  PROJ Ship
  FRAME Equator
  ALT
  REF Moon
END_MFD

BEGIN_SHIPS
Gary:DeltaGlider
  STATUS Orbiting Moon
  RPOS 622587.433 1596440.542 -357335.553
  RVEL -1314.1608 688.1703 775.6022
  AROT -24.198 58.157 -19.411
  VROT -0.0538 -0.0009 0.0023
  AFCMODE 7
  PRPLEVEL 0:0.765827 1:0.932681
  NAVFREQ 149 140 278 19
  XPDR 201
  RCOVER 1.0000 0.0000
  HOVERHOLD 0 1 0.0000e+00 0.0000e+00
  HUDMode 1
  COMPARTMENT_TEMP 241.15 275.80 222.69 284.72 222.67 284.72 294.07 868.25 322.98 240.09 240.08 240.07 141.33
  COOLANT_STATE 0 0.500 287.000
  RADIATOR 1.0000 0.0000
  AAP 0:0 0:0 0:0
END
END_SHIPS
I don't think it matters, but as I was running this test in windowed mode here's my Orbiter.cfg:
Code:
; === ORBITER Master Configuration File ===
EchoAllParams = FALSE
LPadRect = 382 102 1348 777

; === Visual helper parameters ===
Planetarium = 24574

; === Debugging options ===
DisableFontSmoothing = FALSE
ForceReenableFontSmoothing = TRUE

; === Device settings ===
DeviceIndex = 4
ModeIndex = 6

; === User interface parameters ===
InfoAuxIdx = 2 1

; === Window positions ===
DlgInfoPos = 264 200 642 689
DlgCamPos = 246 192 556 543
LpadScnListWidth = 195
LpadModListWidth = 213
LpadExtListWidth = 213

; === Active plugin list ===
ACTIVE_MODULES
  OrbiterSound
  ScnEditor
END_MODULES
Regards,
Kuddel
Issue Details
Project ORBITER: 2010-P1 and newer
Status Fixed
Priority 5 - Medium
Affected Version Revision denoted in description
Fixed Version (none)
Users able to reproduce bug 0
Users unable to reproduce bug 0
Assigned Users (none)
Tags (none)

02-24-2019 01:13 AM
Donator
 
I would have liked to add the scenario as file, but .scn files are not accepted :D
Reply
02-26-2019 04:22 AM
Orbiter Founder
 
No luck yet reproducing this. Could you post an orbiter.cfg after setting EchoAllParams = TRUE (so that I can set the same window size etc.) Also I don't have OrbiterSound. Very unlikely to be relevant, but just to make sure, can you try without?

Also, can you try with FixedStep = 0.01, just to eliminate one additional random element?

Does the crash occur soon after scenario start, or only once the vessel is close to the pole?

I wonder if this has something to do with the display of the horizon line, which blows up close to the pole. Does the crash still occur if you turn off the horizon line display in the Map MFD? Or if you turn off the orbit line?
Reply
02-26-2019 06:49 PM
Donator
 
Quote:
Originally Posted by martins
 No luck yet reproducing this. Could you post an orbiter.cfg after setting EchoAllParams = TRUE (so that I can set the same window size etc.)
Sure, see Issue1399.zip

Quote:
Originally Posted by martins
 Also I don't have OrbiterSound. Very unlikely to be relevant, but just to make sure, can you try without?
Sure, I've recreated a clean setup with no addon at all (see orbiter.cfg in Issue1399.zip)

Quote:
Originally Posted by martins
 Also, can you try with FixedStep = 0.01, just to eliminate one additional random element?
Sure, I've recreated a clean setup withFixedStep = 0.01 (see orbiter.cfg in Issue1399.zip)

Quote:
Originally Posted by martins
 Does the crash occur soon after scenario start, or only once the vessel is close to the pole?
No it doesn't crash just by itself (at least not quickly).
But it happens 100% of the time when clicking a bit on the Map-MFD Zoom Buttons [ZM-] rsp. [ZM+]...
Most of the time it crashes around 12-14 seconds.
I think it has something to do with the vessel being close to a pole, therefore all the things happen when started from the given scenario ("Scenarios\DivByZero.scn" in Issue1399.zip).

Quote:
Originally Posted by martins
 I wonder if this has something to do with the display of the horizon line, which blows up close to the pole. Does the crash still occur if you turn off the horizon line display in the Map MFD? Or if you turn off the orbit line?
I haven't tested this (yet), but I'll post any results for that later
Reply
02-26-2019 06:52 PM
Donator
 
Dammit! file upload (.zip) also doesn't work...
Upload issue fixed by Xylon!
Files are now attached; these represent the files mentioned in prev. reports.


So here the files "quoted":

Orbiter.cfg
Code:
; === ORBITER Master Configuration File ===
EchoAllParams = TRUE
LPadRect = 382 102 1348 777

; === Subdirectory locations
ConfigDir = .\Config\
MeshDir = .\Meshes\
TextureDir = .\Textures\
HightexDir = .\Textures2\
ScenarioDir = .\Scenarios\

; === Logical parameters ===
StartPaused = FALSE
FlightModel = 1
DamageModel = 0
UnlimitedFuel = FALSE
RefuelOnPad = TRUE
MFDTransparent = FALSE
CompactGlasspit = TRUE
GenericMFDSize = 6
MFDMapVersion = 1
InstrumentUpdateInterval = 1
PanelScale = 1
PanelScrollSpeed = 300

; === Visual parameters ===
EnableShadows = TRUE
EnableVesselShadows = TRUE
EnableClouds = TRUE
EnableCloudShadows = FALSE
EnableNightlights = TRUE
EnableWaterReflection = TRUE
EnableSpecularRipples = FALSE
EnableHorizonHaze = TRUE
EnableDistanceFog = TRUE
EnableSpecularReflection = TRUE
EnableReentryFlames = TRUE
EnableParticleStreams = TRUE
EnableLocalLights = FALSE
MaxLights = 32
AmbientLevel = 2
PlanetMaxPatchLevel = 19
PlanetPatchRes = 1
NightlightBrightness = 0.5
StarPrm = 1 7 0.1 1
CSphereBgImage = <none>
CSphereBgPath = 
CSphereBgIntensity = 0.2
ElevationMode = 2

; === Screen capture parameters ===
CaptureTarget = 0
CaptureFile = capture\images\0000
CaptureSequenceDir = capture\frames
CaptureImageFormat = 2
CaptureImageQuality = 7
CaptureSequenceStart = 0
CaptureSequenceSkip = 0

; === Instrument parameters ===
ForceMfdPow2 = AUTO
MfdHiresThreshold = 384
PanelMfdHudSize = 512
VCMfdSize = 256

; === Visual helper parameters ===
Planetarium = 24574
Bodyforces = 60 1 1
CoordinateAxes = 12 1 1

; === Debugging options ===
ShutdownMode = 0
FixedStep = 0.01
TimerMode = 0
DisableFontSmoothing = FALSE
ForceReenableFontSmoothing = TRUE
HtmlScnDesc = 2
SaveExitScreen = TRUE
WireframeMode = FALSE
NormaliseNormals = FALSE
VerboseLog = FALSE

; === Physics engine ===
DistributedVesselMass = FALSE
NonsphericalGravitySources = FALSE
RadiationPressure = FALSE
AtmosphericWind = FALSE
StabiliseOrbits = TRUE
StabilisePLimit = 0.05
StabiliseSLimit = 0.01
PertPropSubsampling = 10 0.02
PertPropNonsphericalLimit = 0.05
PropStages = 4
PropStage0 = 0 0.1 0.00349066 0.5 0.0174533
PropStage1 = 1 2 0.0349066 10 0.0698132
PropStage2 = 3 20 0.0872665 100 0.174533
PropStage3 = 5 200 0.349066
PropStage4 = 5 500 0.872665
PropSubsampling = 10

; === Planet rendering parameters ===
PlanetPreloadMode = 0
TileCacheSize = 40
TileLoadThread = TRUE
PlanetTexLoadFreq = 50
PlanetAnisoMode = 3
PlanetMipmapMode = 1
PlanetMipmapBias = 0
PlanetPatchGrid = 5
PlanetResolutionBias = 0
TileLoadFlags = 3

; === Map dialog parameters ===
MapDlgFlag = 13455

; === Camera parameters ===
CameraPanspeed = 100
CameraTerrainLimit = 50
HUDColIdx = 0

; === Device settings ===
DeviceIndex = 4
ModeIndex = 6
DeviceForceEnum = TRUE
Fullscreen = FALSE
Stereo = FALSE
NoVSync = FALSE
StencilBuffer = FALSE
FullscreenPageflip = TRUE
WindowWidth = 1920
WindowHeight = 1080

; === Joystick parameters ===
JoystickIndex = 0
JoystickThrottleAxis = 1
JoystickThrottleSaturation = 9500
JoystickDeadzone = 2500
IgnoreThrottleOnStart = TRUE

; === User interface parameters ===
FocusFollowsMouse = TRUE
MenubarMode = 2
MenubarLabelOnly = FALSE
ShowWarpAlways = TRUE
ShowWarpScientific = FALSE
InfobarMode = 0
InfoAuxIdx = 2 1
MenubarOpacity = 2
InfobarOpacity = 2
MenubarSpeed = 10
PauseIndicatorMode = 0
SelVesselTab = 0
SelVesselRange = 4
SelVesselFlat = FALSE

; === Demo parameters ===
DemoMode = FALSE
BackgroundImage = FALSE
BlockExit = FALSE
MaxDemoTime = 300
MaxLaunchpadIdleTime = 15

; === Record/play parameters ===
RecordPosFrame = 1
RecordAttFrame = 1
RecordTimewarp = TRUE
RecordFocusEvent = TRUE
ReplayTimewarp = TRUE
ReplayFocusEvent = TRUE
ReplayCameraEvent = TRUE
SystimeSampling = TRUE
PlaybackNotes = TRUE

; === Font parameters ===
DialogFont_Scale = 1
DialogFont1_Face = Arial

; === Multiplayer parameters ===
MP_Name = 
MP_Callsign = 
MP_Connection = 

; === Window positions ===
DlgMapPos = 0 0 0 0
DlgInfoPos = 264 200 642 689
DlgCamPos = 246 192 436 654
DlgFocusPos = 0 0 0 0
DlgTaccPos = 0 0 0 0
DlgVhelperPos = 0 0 0 0
LpadScnListWidth = 195
LpadModListWidth = 213
LpadExtListWidth = 213
Scenarios\DivByZero.scn
Code:
BEGIN_DESC
 Test scenario for Issue 1399.
 Just click a bit on the Map-MFD Zoom Buttons [ZM-] rsp. [ZM+]
END_DESC

BEGIN_ENVIRONMENT
  System Sol
  Date MJD 55977.2285314711
END_ENVIRONMENT

BEGIN_FOCUS
  Ship Gary
END_FOCUS

BEGIN_CAMERA
  TARGET Gary
  MODE Cockpit
  FOV 34.00
  BEGIN_PRESET
    Ground:Gary:34.00:Moon -158.63415 5.40396 150.00
  END_PRESET
END_CAMERA

BEGIN_HUD
  TYPE Orbit
  REF AUTO
END_HUD

BEGIN_MFD Left
  TYPE Map
  REF Moon
  ZOOM 2
  POS -2.77 0.10
END_MFD

BEGIN_MFD Right
  TYPE Orbit
  PROJ Ship
  FRAME Equator
  ALT
  REF Moon
END_MFD

BEGIN_SHIPS
Gary:DeltaGlider
  STATUS Orbiting Moon
  RPOS 622587.433 1596440.542 -357335.553
  RVEL -1314.1608 688.1703 775.6022
  AROT -24.198 58.157 -19.411
  VROT -0.0538 -0.0009 0.0023
  AFCMODE 7
  PRPLEVEL 0:0.765827 1:0.932681
  NAVFREQ 149 140 278 19
  XPDR 201
  RCOVER 1.0000 0.0000
  HOVERHOLD 0 1 0.0000e+00 0.0000e+00
  HUDMode 1
  COMPARTMENT_TEMP 241.15 275.80 222.69 284.72 222.67 284.72 294.07 868.25 322.98 240.09 240.08 240.07 141.33
  COOLANT_STATE 0 0.500 287.000
  RADIATOR 1.0000 0.0000
  AAP 0:0 0:0 0:0
END
END_SHIPS
Reply
02-26-2019 07:08 PM
Donator
 
Turning off the horizon line display in the Map MFD does still crash.
Turning off the orbit line it does not crash.
Seems like the orbit line is likely the trouble-maker here!
Reply
02-27-2019 12:43 AM
Orbiter Founder
 
Quote:
Originally Posted by kuddel
 Turning off the orbit line it does not crash.
Seems like the orbit line is likely the trouble-maker here!
Ok, this narrows it down, although I still didn't manage to recreate the crash, despite manic zooming

One more test: if you close the Map MFD but open the Map dialog (Ctrl-M), again with groundtrack active, can you still get the crash? (you might have to switch from orbit plane to groundtrack in Options)
Reply
02-27-2019 06:45 PM
Donator
 
Quote:
Originally Posted by martins
 Ok, this narrows it down, although I still didn't manage to recreate the crash, despite manic zooming
Lucky you


Quote:
Originally Posted by martins
 One more test: if you close the Map MFD but open the Map dialog (Ctrl-M), again with groundtrack active, can you still get the crash? (you might have to switch from orbit plane to groundtrack in Options)
With the Map dialog (Ctrl-M) I can not create a crash. At least not in 5 minutes.
My routine:
I've created a new scenario like the one I've provided, but without any open Map-MFD (left MFD off), started it,
pressed Ctrl-M to open the Map dialog,
then tried the "manic zoom"[TM] there, but this seems to be stable.

After about 5 minutes I switched on the (left) MFD, selected Map-MFD and zoomed a bit back and forth,
then I clicked on [TRK], and Bam! Tetris Crash!

Can I provide some more information (like something Visual Studios "Attach to Process" could generate)?
Reply
02-27-2019 06:59 PM
Donator
 
I've added issue1399.crashinfos.kuddel.zip, containing some information gathered by Visual Studio "Attach to Process".
Reply
02-28-2019 02:13 AM
Orbiter Founder
 
Thanks for the disassembler snap. From that, I think I managed to locate the offending statement, although even so I didn't manage to trigger the division by zero.

Anyway, I've uploaded a modified orbiter.exe (in the orbiter_190228.zip attachment). Could you check if this fixes the problem on your side, before I commit it to the SVN repository?
Reply
02-28-2019 06:52 PM
Donator
 
I could not produce the crash with the modified orbiter.exe you've provided
And I've tried 15 minutes (and several Moon orbits) so I'm quite sure that it is fixed!

Thanks again,
Kuddel
Reply
This petition for a change to Fixed was accepted
02-28-2019 06:53 PM
Donator
 
...Petition for status change
02-28-2019 09:58 PM
Orbiter Founder
 
Fixed in SVN commit #86.
Reply
02-28-2019 10:51 PM
Donator
 
Tested it already! Thanks!
Reply
Reply

Issue Tools
Subscribe to this issue

All times are GMT. The time now is 06:54 AM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Copyright 2007 - 2017, Orbiter-Forum.com. All rights reserved.