onetot / panoramagl

Automatically exported from code.google.com/p/panoramagl
0 stars 0 forks source link

crash when the the viewcontroller of PanoramaGL dismissModalViewController #18

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I make a project refer to the PanoramaGL demo and use its pic reource
2. I touch the screen and move on it.but when the viewcontroller of PanoramaGL 
dismissModalViewControllerAnimated ,then the project crash because its delegate 
is delloced
3. how to resolve the problem

What is the expected output? What do you see instead?
-[_DViewController respondsToSelector:]: message sent to deallocated instance 
0x78bc550

What version of the product are you using? On what operating system?
the last version,

Please provide any additional information below.

Original issue reported on code.google.com by nyzs...@163.com on 24 Oct 2012 at 1:46

GoogleCodeExporter commented 8 years ago
when i do not set its delegate.the viewdidload,do nothing and press a button to 
dismissModalViewControllerAnimated.and it crash

Original comment by nyzs...@163.com on 24 Oct 2012 at 2:09

GoogleCodeExporter commented 8 years ago
I am having the same issue. Is there any resolution?

Original comment by AnthonyS...@gmail.com on 12 Nov 2012 at 6:15

GoogleCodeExporter commented 8 years ago
I am having the same issue. Is there any resolution?
 *** -[PanoViewController respondsToSelector:]: message sent to deallocated instance 0x8ab80e0
(lldb) 

Original comment by hardikda...@gmail.com on 25 Jan 2013 at 5:45

GoogleCodeExporter commented 8 years ago
I notice that in device debug mode, it is call dealloc method, so its not make 
crash in debug mode.
when i run app directly after installed, it will make crashed on PLViewBase.m
-(void)drawViewInternally
{
    if(scene && !isValidForFov && !isSensorialRotationRunning)
    {
        PLCamera *camera = scene.currentCamera;
        [camera rotateWithStartPoint:startPoint endPoint:endPoint];

        // COMMENTED BELOW LINE BECAUSE OF CRASH,,,,, WHEN DISMISS VIEW CONTROLLER......
        // UNCOMMENT BELOW IF BEHAVE ANY UNCONSISTANCY....
        ///*
         if(delegate && [delegate respondsToSelector:@selector(view:didRotateCamera:rotation:)])
         [delegate view:self didRotateCamera:camera rotation:[camera getAbsoluteRotation]];
        // */
        ////END,,,,,

    }
    if(renderer)
        [renderer render];
}

Any solution for this ?

Original comment by hardikda...@gmail.com on 25 Jan 2013 at 9:42

GoogleCodeExporter commented 8 years ago
Hay, I solve issue.
need to force dealloc all live instance of PLView, before close.

This issue came because of it will not called dealloc method automatically, 
because of retain count is not reach to 0, due to any reason.

so, method dealloc does not called at dismiss view controller.

below is solution,

- (IBAction)btnCloseTouched:(id)sender {

    // force close/release PLViews objects....
    [(PLView *)self.view forceStop];
    [self.navigationController popViewControllerAnimated:NO];
}

in PLViewBase.m

-(void) forceStop
{   [self stopAnimation];
    [self reset];
    [self deactiveAccelerometer];
    if(isValidForTransitionString)
        [isValidForTransitionString release];
    if(currentTransition)
    {
        [currentTransition stop];
        [currentTransition release];
    }
    if(renderer)
    {
        [renderer stop];
        [renderer release];
    }
    if(scene)
        [scene release];

}

-(void)dealloc 
{
    [super dealloc];
}

hope this help.

Original comment by hardikda...@gmail.com on 25 Jan 2013 at 11:43

GoogleCodeExporter commented 8 years ago
Hi��hardikda
     Thank you any way. The project I  develop has finished for a long time.I deprecated this framework because it has many other issues,eg:touch not smoothly and use much memory .Instead,I use panoramagl of HTML5  which effect is much better.but the software is paied.
     My English is just so so,hope you understand what I write��HaHa��

At 2013-01-25 19:43:18,panoramagl@googlecode.com wrote:

Original comment by nyzs...@163.com on 13 Mar 2013 at 10:20