Has anyone tried to run OpenFL app on BB Passport?

I am duplicated an archive post from here: https://muut.com/i/openfl/general:has-anyone-tried-to-run-ope

I do not have a BlackBerry Passport to test with, but I did find that when testing prerelease versions of BlackBerry 10.3 on my Q10, that there was a change at some point that caused older OpenFL titles to stop functioning.

I dug in and found that one of the system libraries we link needed an additional dependency linked in order to find all of its symbols, moving from the older OS version. This should be resolved in OpenFL 2.1, but if you use an older version of OpenFL in order to compile, your application might fail to launch. What version of OpenFL did you use?

This issue is still there, it happens on OS 10.3+ (both simulator and device).

I made an haxelib upgrade before compiling, so I should have the fix in it.
If I compile with -verbose, is there a way to see if the additional flag is added to the compile command?

The resulting crash log:
unknown symbol: bind referenced from std.so
unknown symbol: gethostbyname referenced from std.so
unknown symbol: connect referenced from std.so
unknown symbol: send referenced from std.so
unknown symbol: getsockname referenced from std.so
unknown symbol: recv referenced from std.so
unknown symbol: setsockopt referenced from std.so
unknown symbol: getpeername referenced from std.so
unknown symbol: inet_ntoa referenced from std.so
unknown symbol: socket referenced from std.so
unknown symbol: accept referenced from std.so
unknown symbol: listen referenced from std.so
unknown symbol: gethostbyaddr referenced from std.so
unknown symbol: shutdown referenced from std.so
Error : Could not load module std@get_env__1

Ah, the fix was in HXCPP:

I don’t think HXCPP has been updated/released since this fix. If you have GIT available, you should be able to try it like this:

git clone https://github.com/haxefoundation/hxcpp
haxelib dev hxcpp hxcpp
lime rebuild hxcpp blackberry

If you use a development version of HXCPP, you’ll want to lime rebuild hxcpp against each native target you use. Please let me know if this helps.

Perhaps we should do our own builds of HXCPP

1 Like

Confirmed, it’s working with the dev HXCPP, tested on a Z10 with 10.3.1

It seems that OS 10.3 now checks all the links at launch, in my game I had an unfinished (not working) native extension and it gave me a similar crash on launch caused by a missing lib.

I remembered that haxe-ga (Google Analytics extension) wasn’t working in blackberry last time I checked. I activated the flag to use it (currently working on android and flash) and it worked!

As far as I know, haxe-ga uses sockets too, so it seems that it wasn’t working because libsocket wasn’t added correctly in previous releases but blackberry only checked if the lib was available when it was used.

I feel like a detective now! =P

1 Like

Thanks guys! :smile:
I’ll give it a try asap.

FYI, we now have builds going for HXCPP, you could use this with haxelib local instead of building on your own, if you want :smile:

http://openfl.org/builds/hxcpp

My game was denied again:
"The release for the BlackBerry Q5, Q10, PassPort and Classic is failing
to launch. After I tap on the icon, a page pops up for less than a
second and it closed itself.
The release for The BlackBerry Z3, Z10 and Z30 has no issue
.
"
I have tested both releases on BB Z10.
But it also might be related to this issue: https://github.com/openfl/swf/issues/30

Also, even empty project fails to launch on simulator.
Any idea why?

Btw, can someone test the following project on its BB device?
https://github.com/openfl/swf/issues/30

Has 10.3 been released for the Q10 yet? Wondering if I need to update, or if I should use a leaked build to test

You can install 10.3 betas on your device via an autoloader:
https://developer.blackberry.com/blackberry10devalpha/devalpha_update.html

Is it stable enough to not turn my cellphone into brick? :slight_smile:

I never had problems with this method, make sure you download the release for your device model and backup your settings in blackberry link.

I only had problems reverting to 10.2.1 with blackberry link, but using the 10.2.1 autoloader solved the issue:
https://developer.blackberry.com/blackberry10devalpha/allautoloaders.html

SO, I have loaded 10.3.1 to my Z10 and launched the app.
It failed, but I’ve got the following in log file:

unknown symbol: bind referenced from std.so
unknown symbol: gethostbyname referenced from std.so
unknown symbol: connect referenced from std.so
unknown symbol: send referenced from std.so
unknown symbol: getsockname referenced from std.so
unknown symbol: recv referenced from std.so
unknown symbol: setsockopt referenced from std.so
unknown symbol: getpeername referenced from std.so
unknown symbol: inet_ntoa referenced from std.so
unknown symbol: socket referenced from std.so
unknown symbol: accept referenced from std.so
unknown symbol: listen referenced from std.so
unknown symbol: gethostbyaddr referenced from std.so
unknown symbol: shutdown referenced from std.so
Error : Could not load module std@get_env__1

Same problem.
I’m sure I’m using latest hxcpp 3.1.39 from here:
http://www.openfl.org/builds/hxcpp/hxcpp-3.1.39-114-gfb6e31a.zip

Did I miss something?

Hmm, I’m not sure what’s going on (bad build? not fixed on 10.3.1?)

Let me see if I can update my device

I just installed the 10.3.1 developer image on my BlackBerry Q10, using fresh builds of everything, I was able to run install and run PiratePig without getting the errors you had (which I had before the HXCPP fix).

The tools do respect date and time when copying files. Would you mind doing a -clean build to ensure that the newer HXCPP std file was being packaged in the application?

Yes, it finally works for me!
But, now there are two builds of hxcpp 3.1.39!
One is yours from here: http://openfl.org/builds/hxcpp
Second one I can get with “haxelib upgrade”.

It works with your version, but still doesn’t work with another one, they didn’t apply your fix.

singmajesty, don’t know how, but your build of hxcpp breaks SWF Library functionality for native platforms.
I tried for BB and Windows.
I always get “Asset not found” error, while it works fine with original build.

There’s a new version of the SWF library, OpenFL and Lime, since a couple days ago. Is it possible that you upgraded any of those libraries as well?

(or if you haven’t, could you try updating to the latest, and see if it makes a difference?)