Martin Gagnon
11/28/2019, 9:37 PM1.3.60
, my iOS application crashes with one of the following assert from memory.cpp:
- RuntimeAssert "Must be positive"
- RuntimeAssert "cycle collector shall only work with single object containers"
Sadly, I am not able to pinpoint or reproduce this issue with sample code. The only stack I have is the GarbageCollector failing.
Any hints on what or how to investigate would be much appreciated.
More info in the thread.Maurice Wingbermuhle
11/29/2019, 10:34 AMkotlin.native.concurrent.freeze()
. Can anyone tell me what gradle imports I need? Cannot find it online...Kavan
11/30/2019, 8:42 PMBurkhard
12/01/2019, 6:30 AMjrod
12/01/2019, 8:03 PMInt
on iOS is arch dependent and a bunch of articles seem to recommend using Int
despite that all iPhones and iPads since 2013 and Watches since 2015 are now 64-bit.
So….assuming I don’t want to burden API callers with the difference, is there a smart way to pass Swift Int
down and handle it appropriately in the following case?
let value = 5 // value is of type Int, so platform dependent
print("before: \(value)")
print("after: \(HelloKt.plusplus(value: value))")
// Cannot convert value of type 'Int' to expected argument type 'Int32'
in commonMain:
fun plusplus(value: Int): Int {
return value + 1
}
fun plusplus(value: Long): Long {
return value + 1
}
map to
+ (int32_t)plusplusValue__:(int32_t)value __attribute__((swift_name("plusplus(value__:)")));
+ (int64_t)plusplusValue___:(int64_t)value __attribute__((swift_name("plusplus(value___:)")));
respectively
in iosMain:
fun plusplus(value: integer_t): integer_t {
return value + 1
}
fun plusplus(value: NSInteger): NSInteger {
return value + 1
}
map to
public typealias NSInteger = kotlin.Long // 64 bit signed
public typealias integer_t = <http://kotlin.Int|kotlin.Int> // 32 bit signed
respectively
Any ideas?napperley
12/02/2019, 12:44 AM// ...
compilations.getByName("main") {
cinterops.create("ncurses") {
includeDirs("-L${System.getProperty("user.home")}/ncurses-6.1/include")
}
}
// ...
Would a symbolic link to a header file break code completion?Konstantin Petrukhnov
12/02/2019, 8:01 AMnapperley
12/04/2019, 12:34 AMnapperley
12/04/2019, 3:11 AMMemory leaks detected, 1 objects leaked!
Use `Platform.isMemoryLeakCheckerActive = false` to avoid this check.
Kavan
12/04/2019, 6:23 PMtapchicoma
12/04/2019, 9:57 PMStandard CLI library kotlinx.cli is shipped with the compiler distribution (GH-3215)Does it mean that I could use
kotlinx.cli
without adding any dependency to it?Kris Wong
12/05/2019, 8:26 PMKris Wong
12/05/2019, 8:51 PMsection
and row
are vals on NSIndexPath
? They are vars in Swift, and since they're vals in the native bindings, there's no way to set them.Sam Schilling
12/06/2019, 6:02 PMSam Schilling
12/06/2019, 6:06 PMtapchicoma
12/07/2019, 9:30 PMres
folder and then use Classloader#getResourcesAsStream()
, but it is not available in native target.bootstraponline
12/08/2019, 9:44 PMkotlinx.coroutines.runBlocking
on iOS?
https://github.com/bootstraponline/run_blocking/blob/master/src/commonMain/kotlin/example/Common.kt
https://github.com/bootstraponline/run_blocking/blob/master/src/iosMain/kotlin/example/RunBlocking.kt
I have a simple example that compiles to an iOS framework. iOS hangs on kotlinx.coroutines.runBlocking
and never returns. On the JVM, runBlocking works as expected.napperley
12/09/2019, 1:46 AMqian
12/09/2019, 4:38 PMCristián Arenas
12/09/2019, 5:53 PMspierce7
12/09/2019, 6:51 PMRobert
12/10/2019, 12:04 PMRobert
12/10/2019, 6:01 PMauto ionspinlib = libmylib_symbols()-><http://kotlin.root.com|kotlin.root.com>.ionspin;
auto KBigInteger = ionspinlib.kotlin.bignum.integer.BigInteger;
class CBigInteger : libmylib_kref_com_ionspin_kotlin_bignum_integer_BigInteger { // KBigInteger
public:
CBigInteger(long amount) : KBigInteger.BigInteger(amount) {} // << PROBMLEM
// {
// big = KBigInteger.BigInteger(amount);
// }
operator long() const { return 10l; }
};
CBigInteger amount = 10l;
long longAmount = amount;
it seems like I can't use the dot-notation in the constructor call KBigInteger.BigInteger
allanxp4
12/11/2019, 3:33 AMribesg
12/11/2019, 10:29 AMribesg
12/11/2019, 1:46 PMplatform
code in the iosMain
sourceSet that gets generated by adding the ios()
target? If you can’t, why does it generates it anyway?Prateek Grover
12/11/2019, 2:02 PMribesg
12/12/2019, 10:15 AMAndreas Jost
12/12/2019, 1:46 PMkpgalligan
12/12/2019, 9:39 PMkpgalligan
12/12/2019, 9:39 PMElena Lepilkina
12/13/2019, 6:24 AMkotlin.native.disableCompilerDaemon=true
probably can help to use debugger.kpgalligan
12/13/2019, 3:39 PM