Closed GoogleCodeExporter closed 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
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
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
This issue was closed by revision r794.
Original comment by andy.gal...@gmail.com
on 25 Apr 2014 at 5:21
Original issue reported on code.google.com by
hunlon....@gmail.com
on 19 Apr 2014 at 3:10Attachments: