Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 1,636
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone
Accepted Solution

Cascades 10.2 problem Cannot assign QObject*

hi,

 

running an app under 10.2 suddenly, QML Pages cannot be created.

getting this error in log:

 

Cannot assign QObject* to DetailPage_QMLTYPE_11*

 the code at the mentioned line does this:

detailPageComponent.createObject(navigationPane)

 of course all created pages always be destroyed:

onPopTransitionEnded: {
        if (page == detailPage) {
            detailPage.destroy()

exit the app, start again, do the same it works.

Suddenly 20 ... 50 creations later it happens again

Not only this, also on other pages

 

I can still go thru the app and create / destroy components, but the one where the error occurs doesn't work before restarting, even if going back to the root (TabbedPane) and destroying the parent of this Page (NavigationPane) and then re-creating the pane.trying to push the details getting same error

 

never happened using 10.1

tried newest 10.2 1767 on Z30

 

any idea what this could cause ?

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
BlackBerry Platinum Enterprise Partner
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner http://vimeo.com/ekkescorner/videos
bb10-development: http://appbus.org Twitter: @ekkescorner
Developer
Posts: 824
Registered: ‎10-16-2012
My Device: Red Z10

Re: Cascades 10.2 problem Cannot assign QObject*

I know from experience doing this with my own apps it can be a pain :smileywink:  it seems there's still many issues with 10.2 and lots of things that worked before no longer work, or work completely differnetly in some cases...

 

One thing that may help if you haven't yet tried it is creating a new project, it may seem out there but alot of times especially when switching api levels that helps smooth out some of the errors i've encountered

 

 

Developer
Posts: 1,636
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: Cascades 10.2 problem Cannot assign QObject*


slashkyle wrote:

I know from experience doing this with my own apps it can be a pain :smileywink:  it seems there's still many issues with 10.2 and lots of things that worked before no longer work, or work completely differnetly in some cases...

 

One thing that may help if you haven't yet tried it is creating a new project, it may seem out there but alot of times especially when switching api levels that helps smooth out some of the errors i've encountered

 

 


thx for your hint

but I'm always doing this with new API levels or new versions of Momentics:

creating a new workspace, new project, copying in old stuff etc.

 

BTW:

I also tried compiling the project using 10.2 API

then again did some tests and just at the moment I thought it is fixed I got a similar error:

Error: Cannot assign QObject* to DetailPage_QMLTYPE_15* 

 curious: this time telling me about QML_TYPE_15* where before I got QML_TYPE_11*

 

seems I can work much longer in the app on 10.2 OS Devices using a 10.2 API Compiled app,

then using a 10.1 API compiled app  on 10.2 OS Devices,

where running same app on 10.1 OS Devices this never happened yet

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
BlackBerry Platinum Enterprise Partner
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner http://vimeo.com/ekkescorner/videos
bb10-development: http://appbus.org Twitter: @ekkescorner
New Contributor
Posts: 8
Registered: ‎09-24-2011
My Device: BlackBerry Torch 9800

Re: Cascades 10.2 problem Cannot assign QObject*

Looks like this issue was fixed on 10.2.1.

On 10.2 we had this issue too.

Developer
Posts: 1,636
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: Cascades 10.2 problem Cannot assign QObject*


kvadgroup wrote:

Looks like this issue was fixed on 10.2.1.

On 10.2 we had this issue too.


unfortunately it's still there and verified by BlackBerry. Mark Sohm has tested with 10.2.1 They're working on this.

Here's how you can reproduce it:

 

I developed a small app to demonstrate HowTo scale a ListView for output on large 2nd Screen via HDMI
blog: http://appbus.wordpress.com/2013/11/18/mobile-computing-scale-lists-for-2nd-screen-hdmi/
project at github: https://github.com/ekke/cascades_lists_on_hdmi

the error is similar to the one from BBJamAsia. now it's:

asset:///main.qml:105: Error: Cannot assign QObject* to ScaleSliderPage_QMLTYPE_0*

here are the scenarios to test:

  • Hold Device in PORTRAIT
  • start APP
  • Action -> Slider
  • OK
  • BACK
  • rotate to LANDSCAPE
  • Action-> Slider
  • OK

 

  • Hold Device in PORTRAIT
  • start APP
  • rotate to LANDSCAPE
  • Action->Slider
  • FAILS
  • rotate to PORTRAIT
  • Action->Slider
  • FAILS

 

  • Hold Device in LANDSCAPE
  • start APP
  • Action->Slider
  • OK
  • BACK
  • rotate to PORTRAIT
  • Action->Slider
  • OK

 

  • Hold Device in LANDSCAPE
  • start APP
  • rotate to PORTRAIT
  • Action->Slider
  • FAILS
  • rotate to PORTRAIT
  • Action->Slider
  • FAILS


conclusion:
IF you rotate the APP before pushing the Page
THEN Page cannot be pushed, getting error

asset:///main.qml:105: Error: Cannot assign QObject* to ScaleSliderPage_QMLTYPE_0*


IF at first pushing the Page
THEN rotating
all works well

removing the OrientationHandler doesn't help

 

you can follow Issue Tracker https://www.blackberry.com/jira/browse/BBTEN-1781

 

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
BlackBerry Platinum Enterprise Partner
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner http://vimeo.com/ekkescorner/videos
bb10-development: http://appbus.org Twitter: @ekkescorner
Developer
Posts: 1,636
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: Cascades 10.2 problem Cannot assign QObject*

Cascades Team found the problem and here are workarounds :smileyhappy:

 

http://supportforums.blackberry.com/t5/Native-Development/10-2-don-t-use-property-MyPage-mypage/m-p/...

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
BlackBerry Platinum Enterprise Partner
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner http://vimeo.com/ekkescorner/videos
bb10-development: http://appbus.org Twitter: @ekkescorner