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

Adobe AIR Development

Reply
Contributor
Posts: 23
Registered: ‎09-19-2012
My Device: BlackBerry PlayBook
My Carrier: Developer
Accepted Solution

PlayBook AIR Application SIGSEGVs when ported to BB10

I have the case of an application that was originally for desktop (Flash Player) that I could successfully port to the PlayBook.

 

The game was originally done with Flash Professional, and I have downgraded the AIR version (as instructed here http://www.flashdeveloper.co/post/20583114199/air32-in-flash-cs-55), and linked to the QNX AIR libraries (as instructed here http://renaun.com/blog/2010/11/building-blackberry-playbook-apps-with-flash-professional-cs5/)

 

I changed the controls to TouchEvents, added the use of a SharedObject to store scores, added the use of Facebook's GraphAPI, and used the PB text input to introduce a name. Apart from this, and some traces, there are the links to the QNX AIR libraries.

 

This port, as I said, works perfectly in the PlayBook, with no noticeable problems.

 

However, I ported the game to the BB10, by adding some listeners to prevent the rotation of the application.

 

Now, in the PlayBook the game runs perfectly. But in the BB10 the game crashes when it start a new game. This crash only occurs when I run the game without a debugger, or when I run the exported packaged version.

 

When I ssh the log inside the Z10, I get this error:

 

Process 152121536 (adl) terminated SIGSEGV code=2 fltno=11 ip=7b04e058(/base/air/runtimeSDK/Adobe AIR/Versions/1.0/libCore.so@+0x4ba0) bdslot=1

 

Sometimes, the libCore.so files is accompanied by a libCore.so@FLQNXLogWrite bit.

 

The thing is that I have tried a lot of things to prevent this from happening. I deleted all the trace statements to see if it was this, or tried to remove the creation and handling of the SharedObject, to no avail. The game still crashes when starting a new game.

 

I'm out of ideas, and I'd like to know if you have confroted a similar situation. I've had lots of AS3 errors in the time I've been developing with Flash, but surely I've ever never had a Segmentation Fault :-( I would appreciate your help.

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: PlayBook AIR Application SIGSEGVs when ported to BB10

Are you using the BB10 libraries. They are different then those for the PlayBook.
Contributor
Posts: 23
Registered: ‎09-19-2012
My Device: BlackBerry PlayBook
My Carrier: Developer

Re: PlayBook AIR Application SIGSEGVs when ported to BB10

I'm using these three:

 

- (SWC) C:\Program Files (x86)\Research In Motion\blackberry-tablet-sdk-2.1.0\frameworks\libs\air\qnx-air.swc

- (Folder) C:\Program Files (x86)\Research In Motion\blackberry-tablet-sdk-2.1.0\frameworks\libs\qnx

- (Folder) C:\Program Files (x86)\Research In Motion\blackberry-tablet-sdk-2.1.0\frameworks\libs\blackberry

 

I used these successfully with other two games (made with Flex directly on Flash Builder), so it's a possibility that I'm not using the correct libraries. Any pointers to the new libraries?

 

Developer
Posts: 1,269
Registered: ‎12-29-2010
My Device: PlayBook, Z10 LE, Dev Alpha C

Re: PlayBook AIR Application SIGSEGVs when ported to BB10

 

Those are not the correct libs for BB10.  You can get the correct ones at: 

 

http://developer.blackberry.com/air/download/

 

And download the "BlackBerry 10 SDK for Adobe AIR".

 

Contributor
Posts: 23
Registered: ‎09-19-2012
My Device: BlackBerry PlayBook
My Carrier: Developer

Re: PlayBook AIR Application SIGSEGVs when ported to BB10

I downloaded them previously. I'm going to try them out and let you know.

Contributor
Posts: 23
Registered: ‎09-19-2012
My Device: BlackBerry PlayBook
My Carrier: Developer

Re: PlayBook AIR Application SIGSEGVs when ported to BB10

Well, updating to version 3.1.0 worked perfectly. Thank you very much.

 

I did not think of doing this, because I ported two previous games without updating the version and those are working OK.

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: PlayBook AIR Application SIGSEGVs when ported to BB10

Now keep in mind the BB10 will not work on the PlayBook.
Contributor
Posts: 23
Registered: ‎09-19-2012
My Device: BlackBerry PlayBook
My Carrier: Developer

Re: PlayBook AIR Application SIGSEGVs when ported to BB10

Yeah, that means that I should release a .bar for the BB10, and another for the PlayBook, right?

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: PlayBook AIR Application SIGSEGVs when ported to BB10

Contributor
Posts: 23
Registered: ‎09-19-2012
My Device: BlackBerry PlayBook
My Carrier: Developer

Re: PlayBook AIR Application SIGSEGVs when ported to BB10

It seems that I'm still having the Segmentation Fault.

 

Here's the conditions:

 

* Game is done in Flash Professional CS6. Air SDK was downgraded to 3.1. Game is compiled through Flash Professional.

* Libraries included: 

 - blackberry-tablet-sdk-3.1.0/frameworks/libs/air (external)

 - blackberry-tablet-sdk-3.1.0/frameworks/libs/qnx (merged)

 - blackberry-tablet-sdk-3.1.0/frameworks/libs/blackberry (merged)

 - as3-signals (merged, proper from the game)

 - GraphAPI_Mobile (merged, proper from the game)

 - QNXNetwork.ane (Flash Professional CS6 allows to add the ANEs directly)

 - QNXDevice.ane

 - QNXSensors.ane

 - QNXSkins.ane

* When publishing the game inside Flash Professional, the software gives a warning on the .ane files saying that it's using the default implementation. I think this is normal, and I don't use the .airi file Flash Pro compiles, anyway.

* Published files go to the bin-debug file of a Flash Builder project. This Flash Builder Project has added the four ANEs and added to the package. When I hit Test or Run, Flash Builder takes the .swf file Flash Professional compiled, it packages the swf, the files, and the ANEs (including the directory air/META-INF inside the package).

* Still, when I run the game, the game segfaults when instancing the qnx.fuse.ui libraries.

* Trying to package the game with blackberry-airpackager, and referencing the .ane files does not create the air/META-INF directory. This package still segfaults at the same place.