--- old/src/java.desktop/macosx/native/libsplashscreen/splashscreen_sys.m 2016-10-06 06:03:29.000000000 +0300 +++ new/src/java.desktop/macosx/native/libsplashscreen/splashscreen_sys.m 2016-10-06 06:03:29.000000000 +0300 @@ -158,7 +158,7 @@ options:NSBackwardsSearch]; NSUInteger dotIndex = range.location; NSString *fileName2x = nil; - + if (dotIndex == NSNotFound) { fileName2x = [fileName stringByAppendingString: @"@2x"]; } else { @@ -167,7 +167,7 @@ fileName2x = [fileName2x stringByAppendingString: [fileName substringFromIndex: dotIndex]]; } - + if ((fileName2x != nil) && (jar || [[NSFileManager defaultManager] fileExistsAtPath: fileName2x])){ if (strlen([fileName2x UTF8String]) > scaledImageLength) { @@ -190,7 +190,7 @@ splash->maskRequired = 0; - + //TODO: the following is too much of a hack but should work in 90% cases. // besides we don't use device-dependant drawing, so probably // that's very fine indeed @@ -229,7 +229,9 @@ void SplashLock(Splash * splash) { - pthread_mutex_lock(&splash->lock); + [ThreadUtilities performOnMainThreadWaiting:YES block:^(){ + pthread_mutex_lock(&splash->lock); + }]; } void @@ -286,7 +288,7 @@ size.height /= scaleFactor; [image setSize: size]; } - + NSImageView * view = [[NSImageView alloc] init]; [view setImage: image];