cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Kwan (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-2271) Creating multiple CDVViewControllers at once only fires deviceready once
Date Sat, 19 Jan 2013 14:00:15 GMT

     [ https://issues.apache.org/jira/browse/CB-2271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Mike Kwan updated CB-2271:
--------------------------

    Description: 
Steps taken to reproduce:

1. Create custom container view controller
2. In viewDidLoad add two CDVViewControllers as childViewControllers and hook up view hierarchy
appropriately
3. deviceready will fire for startPage on the first CDVViewController but not for the second

Workaround:

Add the second CDVViewController after some delay (e.g. 1 second)

Image:

http://localhostr.com/9JszfWk9b7Pa

More info:

After some investigation, the problem seems to be a manifestation of a race condition where
the address of the CDVViewController passes in the user-agent is clobbered. This means sometimes
one CDVViewController will get deviceready and at other times the other one will (but never
both).

I believe this is another case where someone has reproduced this bug:
http://stackoverflow.com/questions/13082330/phonegap-cordova-with-multiple-cdvviewcontroller

Attachments (minimal example reproducing bug and workaround):

http://localhostr.com/5x4AsO1oFonU

  was:
Steps taken to reproduce:

1. Create custom container view controller
2. In viewDidLoad add two CDVViewControllers as childViewControllers and hook up view hierarchy
appropriately
3. deviceready will fire for startPage on the first CDVViewController but not for the second

Workaround:

Add the second CDVViewController after some delay (e.g. 1 second)

Image:

http://localhostr.com/9JszfWk9b7Pa

More info:

After some investigation, the problem seems to be a manifestation of a race condition where
the address of the CDVViewController passes in the user-agent is clobbered. This means sometimes
one CDVViewController will get deviceready and at other times the other one will (but never
both).

Attachments (minimal example reproducing bug and workaround):

http://localhostr.com/5x4AsO1oFonU

    
> Creating multiple CDVViewControllers at once only fires deviceready once
> ------------------------------------------------------------------------
>
>                 Key: CB-2271
>                 URL: https://issues.apache.org/jira/browse/CB-2271
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>         Environment: Reproducible on iPad/iPhone 5.0 and 6.0 simulator
>            Reporter: Mike Kwan
>            Assignee: Shazron Abdullah
>             Fix For: 2.3.0
>
>
> Steps taken to reproduce:
> 1. Create custom container view controller
> 2. In viewDidLoad add two CDVViewControllers as childViewControllers and hook up view
hierarchy appropriately
> 3. deviceready will fire for startPage on the first CDVViewController but not for the
second
> Workaround:
> Add the second CDVViewController after some delay (e.g. 1 second)
> Image:
> http://localhostr.com/9JszfWk9b7Pa
> More info:
> After some investigation, the problem seems to be a manifestation of a race condition
where the address of the CDVViewController passes in the user-agent is clobbered. This means
sometimes one CDVViewController will get deviceready and at other times the other one will
(but never both).
> I believe this is another case where someone has reproduced this bug:
> http://stackoverflow.com/questions/13082330/phonegap-cordova-with-multiple-cdvviewcontroller
> Attachments (minimal example reproducing bug and workaround):
> http://localhostr.com/5x4AsO1oFonU

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message