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: 58
Registered: ‎11-30-2012
My Device: BlackBerry Z10
Accepted Solution

Blackberry 10.2 NDK issue on Ubuntu/Linux

I already posted this in the announcement thread, but I am making a new topic just to keep things organized.

 

The 'Design View' button that lets you preview qml files is FINALLY clickable in the 10.2 NDK on Linux. But it never works. Is there any way to fix this? I get a pretty unhelpful error:

"Problem loading qml file: Unable to render QML preview"

 

I am really hoping this is fixable, because this is the biggest feature and it has been completely missing from the Linux builds since the first few Beta SDKs.
Anyone else having problems with this?

__________________________________________________________

If my post helped, click the like button!

Developer of Reader|YC , an open source Hackernews client
Developer
Posts: 322
Registered: ‎05-07-2009
My Device: BlackBerry Z10, PlayBook, 9900

Re: Blackberry 10.2 NDK issue on Ubuntu/Linux

This is / was a pretty standard error message in the IDE on windows (I don't have 10.2 yet)... and it occurred as soon as you added a custom or "fancy" control to your QML file.

Eg if you start a new QML file and add a button... or text box or drop down list.... all is good... but adding a WebView would cause the preview window to show that error.

It sucks because every app I make used something that would render the preview un-renderable... I was hoping that a fix was coming soon.

PlayBook Apps: DataMine, Dots + Boxes, 5 Marbles
BlackBerry SmartPhone Apps: 5 Marbles Soon: **** (D.Z.A), ****Quest, **** Challenge, VaultCracker, DevBrowser, Radial****
Contributor
Posts: 13
Registered: ‎06-18-2010
My Device: Z10

Re: Blackberry 10.2 NDK issue on Ubuntu/Linux

I'm on windows and using a straight forward QML (No Custom). And I also get "Problem loading qml file: Unable to render QML preview" 

 

So you are not the only one. It was working on old build though (10.0.9). But I struggle to death to install Latest Gold and the old one (10.0.9) will constantly lose my device. I really want to like Blackberry, but they have not been making it easy for me, yet again. 

 

I was given a project  (One of my old Android projects, This one (South Africa Only)) where I have to redo the project natively and learn BB10 in less than 3 weeks. But so far the tools keep kicking me in the face, reminds me all over again how an uphill battle it was developing for older blackberry. I wish it was more like Android or iOs, where the development just works.

Developer
Posts: 58
Registered: ‎11-30-2012
My Device: BlackBerry Z10

Re: Blackberry 10.2 NDK issue on Ubuntu/Linux

So this issue is affecting Windows too then? I will try later today with a very simple QML file and see if it works then.
__________________________________________________________

If my post helped, click the like button!

Developer of Reader|YC , an open source Hackernews client
BlackBerry Development Advisor
Posts: 417
Registered: ‎10-27-2010
My Device: PlayBook

Re: Blackberry 10.2 NDK issue on Ubuntu/Linux

Linux configuration are vary drammatically between users, this specific issue is probably related to

open gl drivers are missing, you can check IDE log to see what it complains about. 

Developer
Posts: 58
Registered: ‎11-30-2012
My Device: BlackBerry Z10

Re: Blackberry 10.2 NDK issue on Ubuntu/Linux

Where is this log stored?
__________________________________________________________

If my post helped, click the like button!

Developer of Reader|YC , an open source Hackernews client
BlackBerry Development Advisor
Posts: 417
Registered: ‎10-27-2010
My Device: PlayBook

Re: Blackberry 10.2 NDK issue on Ubuntu/Linux

This article describes how to possible fix Ubuntu 12.04 to work with preview

https://developer.blackberry.com/cascades/documentation/getting_started/tools/qml_troubleshooting.ht...

Contributor
Posts: 33
Registered: ‎01-13-2013
My Device: BlackBerry Z10, Q10

Re: Blackberry 10.2 NDK issue on Ubuntu/Linux

I see this in the eclipse log:

 

/opt/bbndk/plugins/com.rim.tad.tools.qml.simulator_10.2.0.v201306031341/lib/linux/x86/qmlpreview_jni: symbol lookup error: /opt/bbndk/target_10_1_0_2420/linux/x86/usr/lib/libbbcascades-IDE.so: undefined symbol: glGetString

My environment is

 

Ubuntu 13.04 x86-64

nVIDIA graphics card and corresponding binary drivers

Contributor
Posts: 33
Registered: ‎01-13-2013
My Device: BlackBerry Z10, Q10

Re: Blackberry 10.2 NDK issue on Ubuntu/Linux

BTW, the QML preview depends on libosmesa so don't forget to install the correspondig package with

 

    # apt-get install libosmesa6:i386

 

Digging a bit more I found that glGetString is provided by libGL.so but libbbcascades-IDE.so is not linked to it, which cause the undefined symbol error. I somewhat fixed the problem by preloading the i386 version of libdl, this way:

 

   LD_PRELOAD=/usr/lib/i386-linux-gnu/mesa/libGL.so.1.2.0 /opt/bbndk/qde

 

And now I have QML preview working on Ubuntu 13.04 x86-64!

 

I hope this helps you.

 

Developer
Posts: 58
Registered: ‎11-30-2012
My Device: BlackBerry Z10

Re: Blackberry 10.2 NDK issue on Ubuntu/Linux

[ Edited ]

Thanks so much, trying this preload thing now.

 

EDIT: This works! You're great, thanks for the help!

__________________________________________________________

If my post helped, click the like button!

Developer of Reader|YC , an open source Hackernews client