jakubovic / open-phd-guiding

Automatically exported from code.google.com/p/open-phd-guiding
0 stars 0 forks source link

PHD2 crashes on open. OSX 10.9.2 - Macbook Pro #275

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start application
2.
3.

What is the expected output? What do you see instead?
PHD2 start up screens.  We see a crash dump.

What version of the product are you using? On what operating system?
PHD2 v2.2.2. Mac OSX 10.9.2
Set up using Orion SSAG

Please provide any additional information below.
I had PHD2 working but not guiding properly.  The position map was showing a 
path which was diagonal to the RA and dec axes.  I couldn't find the settings 
that I would normally change in PHD1 for aggressiveness and hysteresis.   I 
gave up for the night.
The next day I read the help files again and noticed that I had to change the 
RA guiding algorithm to hysteresis under the mount menu.  In the same session I 
may have opened some other windows like star image but I can't remember exactly 
which windows were open or closed when I quit the application.

When I tried to run the application it crashes.  PHDv1, however, still runs ok. 
 I've tried versions of PHD2 from beta4 to 2.2.2c - all of them crash in the 
same way.

Original issue reported on code.google.com by hunlon....@gmail.com on 19 Apr 2014 at 3:10

Attachments:

GoogleCodeExporter commented 9 years ago
In addition I've reproduced the problem with PHD2 beta2 r551.

Original comment by hunlon....@gmail.com on 19 Apr 2014 at 3:30

GoogleCodeExporter commented 9 years ago
This happens if Star Profile or Target windows are open when the app is closed. 
 When the app starts, it attempts to restore these windows.  I haven't done a 
full analysis of the code yet but  ..

    void TargetClient::OnPaint(wxPaintEvent& WXUNUSED(evt))

        issues a call to pFrame to get the camera pixel scale :

        double sampling = pFrame->GetCameraPixelScale();

If pFrame has not been instantiated it will result in a memory violation :

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000228

I have been able to prevent this from happening by rewriting the code to test 
for the availability of pFrame but i don't know if that would be the correct 
approach.  Does anyone have a better approach to this problem?

      CURRENT CODE:

    double sampling = pFrame->GetCameraPixelScale();

       NEW CODE :

    double sampling;
    if (pFrame)
        sampling = pFrame->GetCameraPixelScale();
    else
        sampling = 1.0;

Original comment by hunlon....@gmail.com on 22 Apr 2014 at 11:01

GoogleCodeExporter commented 9 years ago
hunlon.sue, thanks for the detailed report. I was able to reproduce the issue 
in the simulator. Will provide a fix shortly.
Andy

Original comment by andy.gal...@gmail.com on 25 Apr 2014 at 4:17

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r794.

Original comment by andy.gal...@gmail.com on 25 Apr 2014 at 5:21