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
Trusted Contributor
lcocea
Posts: 117
Registered: ‎02-29-2012
My Device: PlayBook & Nexus 4

Debugging a native app?

[ Edited ]

I am developing a game for PlayBook OS 2.1 in ShiVa 3D. The ShiVa Editor (an IDE for game development) runs on Windows, converts the application scripts to C++, and exports the game to native code using the native SDK for the target platform, in this case BlackBerry Native SDK 2.1. After duplicating a model multiple times my app now unexpectedly quits on the PB (but not on Windows) when the user touches the screen to start playing the game.

 

How can I read the PlayBook system/error log to debug this native app? Thanks.

 

Update: I found aLogCat and LogViewer, which do not seem to be what I need as they do not read the logs in app sandboxes. My understanding is that app logs are saved to the "logs" folder in the app sandbox. How can I list and read these files?

Please use plain text.
Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook

Re: Debugging a native app?

Please use plain text.
Trusted Contributor
lcocea
Posts: 117
Registered: ‎02-29-2012
My Device: PlayBook & Nexus 4

Re: Debugging a native app?

[ Edited ]

Thanks, I eventually managed to access the logs/log file using the Momentix IDE (SDK 2.1). It contains one line of text only, here it is:

 

Process 10625189 (<my_app_name>.bin) terminated SIGSEGV code=1 fltno=11 ip=0053f31c(<my_app_id>@main+0x439be8) ref=00000000 bdslot=1

Anyone know how to "translate" this error message? Thanks in advance for any help you can provide.

Please use plain text.
Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook

Re: Debugging a native app?

Your app is crashing. Use debugger (step-by-step) to see where.

Please use plain text.
Trusted Contributor
lcocea
Posts: 117
Registered: ‎02-29-2012
My Device: PlayBook & Nexus 4

Re: Debugging a native app?

[ Edited ]

Thanks.

Please use plain text.
Trusted Contributor
lcocea
Posts: 117
Registered: ‎02-29-2012
My Device: PlayBook & Nexus 4

Re: Debugging a native app?

[ Edited ]

I just felt that I should mention a few thoughts that cross my mind and hopefully I will get some constructive feedback.

 

I am developing a game for mobile devices. Obviously, I try to target more than one platform so I chose one of the tools that allows me to do this, ShiVa 3D. I do not write C/C++ code directly, ShiVa 3D generates it for me under the hood. It is not obvious how an an app that was compiled to native code, but was not developed using the BlackBerry Native SDK IDE, can be efficiently debugged. On an Android device, for example, the debug mode allows the ShiVa Authoring Tool (the platform specific export tool) to read the device log directly. There is no such feature for BlackBerry  Tablet OS.

 

RIM are in an intense marketing campaign for BB10. This makes sense as their future depends on it. But for me, as a developer, that market doesn't exist yet. And with my limited resources I cannot develop for a device that I cannot test on, so I stick with Tablet OS for now.

 

I use the PlayBook for development and testing as I want to release my game for this platform, first and foremost. I couldn't obtain a BB10 alpha device so I am not even trying to test for BB10 (I am sorry, but in my hands the virtual machine just doesn't cut it). From what I read, the BB10 handsets will be quite expensive when compared with devices with similar specs. Additionally, there is no clear release date for BB10 for PlayBook. I am aware that RIM are mainly into the hardware business but I do software. Apple chose to commoditize software for their iOS platform but IMO  they cater to a slightly different market, a more hype-reactive crowd. The current BB market is smaller.

 

Developing a game, particularly a good game, takes a lot of time and effort. For such efforts to be rewarded, eventually, there should be a quality assessment process in place. I am not saying that RIM should rank and assess the apps and games they accept for publication at App World. But the current system allows publishers to delete bad rewiews. After some bad experiences I have become very reluctant to purchase anything at App World, particularly items priced over $0.99.

 

Taken together, these concerns make me less and less excited about developing apps or games for the PlayBook. At one point I owned three PlayBooks, now I only have one. In the mean time I purchased a Nexus 7 and now I check  Google Play every day for news on Nexus 4 availability. Sadly for me, I am slowly drifting away from the BB platform. 

Please use plain text.
Developer
borceg
Posts: 671
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB

Re: Debugging a native app?

Various game engines provide partial support for BlackBerry QNX (PlayBook OS and BlackBerry 10) which is far from being bug-free. And almost all engines doesn't provide debugging at all for qnx, which is very bad. 

 

But in your case, because in shiva everything is lua code, no c/c++, seems that problem lies in your game export or in s3d bb engine. I assume that you're exporting your game as bar package, not as c++ project (in UAT). I haven't tried yet with ndk 2.1. Try with ndk 2.0/2.0.1 and post results. 

Please use plain text.
Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook

Re: Debugging a native app?

Very interesting post, thank you.

But I didn't quite get you - what's the top problem that makes you drift away from BB? tools? uncertainty in future?

Please use plain text.
Trusted Contributor
lcocea
Posts: 117
Registered: ‎02-29-2012
My Device: PlayBook & Nexus 4

Re: Debugging a native app?

[ Edited ]

@BGmot -- Yes, I posted in a hurry and it looks chaotic. Here is it again, briefly:

 

1. On the PlayBook, IMO the only interesting market at this time is that for BlackBerry Tablet OS. BB10 does not exist yet as a market and it will not exist for at least 6-12 months. There is no release date for BB10 for PB.

 

2. The Android ecosystem is more indie developer-friendly than Tablet OS, both in terms of device/OS and support for third party  tools.

 

3. It is difficult to anticipate the quality of an app or game released for the PB based on user feedback. The current user-based review system unselectively favours vendors.

 

My "top problem" is that there may be a focus on selling premium hardware that leaves independent software developers behind.

Please use plain text.
Trusted Contributor
lcocea
Posts: 117
Registered: ‎02-29-2012
My Device: PlayBook & Nexus 4

Re: Debugging a native app?

[ Edited ]

@borceg -- So far, ShiVa 3D seems to work as expected with NDK 2.1.

Please use plain text.