Few cents about my commits

XCode/IB: fix for invisible segue actions


Alex @avazquezdev 10:32 I’ve been following the basic navigation tutorial using storyboard, but I have the problem that it’s not possible to adding an Unwind Segue. I select Ctrl-drag from the Cancel button to the exit symbol of the editing scene but the exit symbol is not selectable. Could there be a problem generating the Xcode project? I’d like to make sure it’s not a problem with my code. Here you can see the example.title

To have segue action assignments works corresponding objc code shell contains code with action defined as bellow:

 * IBAction unwindToNameList
-(IBAction) unwindToNameList:(UIStoryboardSegue*) sender;

But XCode project generator didn’t make difference in parameter types and uses id for everything, as result IB doesn’t see this method as subject for unwind operations:

-(IBAction) unwindToNameList:(id) sender;

The fix is to provide argument type for actions in case of native or custom classes. Changes are available in PR323

ios12 fix delivery to boehm-gc upstream


The fix is confirmed by users.
Same fixes were merged into boehm-gc code base and delivered as PR232, also issue #231 was created to track case.
Also up-to-date boehm-gc with these changes for RoboVM is available in my branch dkimitsa/boehm-gc. Will investigate if there is any benefit to upgrade to recent boehm-gc once ios12 is released.

aggressive treeshaker: fixing ObjectOutputStream.writeObject()


Aggressive tree shaker helps to reduce application footprint by removing all methods that are not referenced in code. This often breaks reflection-based code and required classes has to be explicitly specified using <forceLinkClasses> but sometimes it is not enough. While working with nitrite-database I faced case when class is referenced but some methods of it is still removed. Here is an example:

private void testSerialize() {
        try {
            new ObjectOutputStream(new ByteArrayOutputStream()).writeObject(new HashMap<>());
        } catch (IOException e) {

fails with:

java.io.InvalidClassException: java.util.HashMap doesn't have a field loadFactor of type float
	at java.io.ObjectOutputStream.writeFieldValues(ObjectOutputStream.java:955)

This happens due internal private and unreferenced methods got removed from HashMap.

java.io.Serializable contract

As specified in documentation there is special case:

ios12 beta crash: fix for testing [vol4]


This post continues series of investigations #1 #2 #3. It delivers fix described in previous post: stop/start world changed in way to not loos mach port reference to thread between stop and start world calls. For fix I’ve used old code boehm-gc that is used in MobiVM and not recent one I’ve updated recently just to minimize amount of new problem introduced. I’ll will be back to updated code in one of next snapshots once iOS12 issue is confirmed.

I’ve created a PR1 where all changes can be evaluated.
Pre-built library for testing is also available lib_fix_candidate/libgc.a

Please test and report any issues to gitter channel

ios12 beta: root cause of RoboVM hangs/crashes vol3


This post continues series of investigations #1 #2). Root case – boehm-gc doesn’t resume all threads it paused during GC_stop_world. Details bellow.

ios12 beta: why RoboVM hangs/crashes synthetic case in iOS12


UPDATE: there is a follow up on this topic.

Few days ago I narrowed issue to simple case (check this post) but it didn’t answer why this was happening. Today I had time to digg this rock and find pice of code that cause issue. What has been done:

ios12 beta: investigating hang up and crash


UPDATE: there is a follow up on this topic.
UPDATE2: there is a follow up on this topic.

libgdx developers got concerned about crashes in ios12 beta and there is an issue about it. I was not able to reproduce it using steps provided by Eric Nondahl as was trying to reproduce it on empty iOS system, and following actions helped much:

  • switching to other apps will help;
  • it is better other apps to be OGL ones;

These steps resulted in reproducing Eric’s POC. But POC) is quite verbose as packed with different cases:

Making BouncyCastleProvider work in IntelliJ Idea Plugin vol.2


It a follow up of old story. This case hit me back again. This time during a work on keychain utils for linux/windows port. In general this happens in following code:

PKCS12PfxPduBuilder builder = new PKCS12PfxPduBuilder();
PKCS12MacCalculatorBuilder macBuilder = new JcePKCS12MacCalculatorBuilder();
PKCS12PfxPdu pfx = builder.build(macBuilder, "".toCharArray());

and the reason in following:

Fixing extremely slow IntelliJ Idea UI after migrating MacMini -> MacPro(mid 2012)


Just have migrated from Mac Mini to MacPro (4 core xeon model mid 2012) to double number of horses. Just swapped SSD from MacMini into MacPro and it is up and running. Build is almost twice faster now, everything seems to be ok but IntelliJ Idea started working extremely slow. Reinstall OS from scratch but it is pure 1 day wasting. It seemed to me that there is no acceleration enabled and reason is not known for me. Probably switch from Intel GPU to ATI might affect existing system setup. Did find that apple.awt.graphics.UseQuartz=true system properties shall enable Quartz acceleration in Java as it is off by default (?). Quick test in Idea and it solves everything !
To add it:

  • open Help->Edit Custom VM Options
  • add -Dapple.awt.graphics.UseQuartz=true line there
    my working custom options looks like bellow now:

Apple generates broken CertificateSigningRequest.certSigningRequest but its ok (for Apple)


Keep working on Keychain utility for linux-windows port, generating the code signing request for particular. And was surprised that openssl was not able to load it CertificateSigningRequest.certSigningRequest built by Apple:

$ openssl req -text -noout -verify -in CertificateSigningRequest.certSigningRequest
unable to load X509 request
140735602271176:error:0D07209B:asn1 encoding routines:ASN1_get_object:too long:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.50.2/libressl/crypto/asn1/asn1_lib.c:143:
... other complains ...
140735602271176:error:0906700D:PEM routines:PEM_ASN1_read_bio:ASN1 lib:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.50.2/libressl/crypto/pem/pem_oth.c:84:

Apple uses different format ? No, it just writes broken ASN.1 stream. Details bellow: