06 Jul 2018
|
debugger
kotlin
jvm
This post continues series of debugger rework, refer to previous post. In general rework is almost complete and changes are being tested now.
Beside variable resolution problem debug of kotlin code suffered from another issue: debugger was jumping random lines when step over collection iteration with lambdas. Why this was happening is bellow:
03 Jul 2018
|
fix
debugger
eclipse
History Cannot Use Step Filters while Debugging in Eclipse #309
Fix PR315
Eclipse plugin is on low priority and it debugger there was working on simple cases year ago I was checking. Simple debug session discovered the bug in Event request validation.
Root case
Problem case there was validation of EXCEPTION_ONLY.referenceTypeID
event modifier against list of known to debugger ones, but there is case when it can be zero:
27 Jun 2018
|
debugger
kotlin
soot
jvm
Have completed most of code rework responsible for debug information preparation for debugger and frame local variable resolution during debug.
Reasons for this:
- there is no direct link between Java variable and local variable begin generated in LLVM IR code. Previous implementation expect one local per variable. Some times it is not true;
Soot
performs split of local variable into multiple at each assignment and not always it is not always possible to pack them back, as result same java variable could be represented different memory location (at different part of code);
- previous implementation was resolving variables base on line number (of code and variable visibility). All this cause broken in case of multi statements lines;
- sometimes compilers put broken debug information in class file (e.g. kotlin) as result it is not valid source for decisions.
What was changed:
Details will be provided in separate post but some facts are bellow:
22 Jun 2018
|
fix
lol
icu.dat
Spoiler: because Apple uses Penguins to review application in Antarctica! (or just set region to Antarctica)
PR311. Kees van Dieren tried to release app to Apple with RoboVM 2.3.4 and it got rejected. It was crashing due NPE at following:
public DecimalFormatSymbols(Locale locale) {
...
try {
currency = Currency.getInstance(locale);
currencySymbol = currency.getSymbol(locale); // <== here
intlCurrencySymbol = currency.getCurrencyCode();
} catch (IllegalArgumentException e) {
...
}
}
Currency.getInstance()
can return null as per spec for countries without currencies, such as Antarctica. Currently icu.dat
that is embedded in RoboVM has two counties with XXX
currency: AQ, CP.
The fix is simple, to use no currency
currency object with code XXX
in this case:
--- compiler/rt/libcore/luni/src/main/java/java/text/DecimalFormatSymbols.java (date 1529655383000)
+++ compiler/rt/libcore/luni/src/main/java/java/text/DecimalFormatSymbols.java (date 1529660632000)
@@ -97,6 +97,11 @@
this.locale = locale;
try {
currency = Currency.getInstance(locale);
+ if (currency == null) {
+ // dkimitsa: for some countries there is no currecy like Antarctida AQ so pick currency
+ // directcly by no currency code
+ currency = Currency.getInstance("XXX");
+ }
currencySymbol = currency.getSymbol(locale);
intlCurrencySymbol = currency.getCurrencyCode();
} catch (IllegalArgumentException e) {
22 Jun 2018
|
fix
PR310
Time to start 2.3.5 with fix. Fix to own code that was intended to fix auto-signature pickup (PR293). It fixes a lot of stuff but introduced bug, that auto mode was picking distribution configuration (identity and profile). This will not work for debug/run configuration case. Fix is simple: consider only development identities:
--- Pair<SigningIdentity, ProvisioningProfile> pair = ProvisioningProfile.find(ProvisioningProfile.list(), SigningIdentity.list(), bundleId);
+++ Pair<SigningIdentity, ProvisioningProfile> pair = ProvisioningProfile.find(ProvisioningProfile.list(), SigningIdentity.list("/(?i)iPhone Developer|iOS Development/"), bundleId);
14 Jun 2018
|
debugger
kotlin
soot
jvm
Keep working on local variable resolution for Kotlin and while having a progress there a bunch of WTF cases related to debug information that is included in Kotlin. Happily it is related to synthetic variable that are inserted by Kotlin, usually it goes into following cases:
- variable defined to be in some slot within specific bytecode range but this slot is not populated;
- same as first but in specified local variable slot there is leftover data and it is has not compatible type.
Here is bytecode that demonstrates issue 2:
13 Jun 2018
|
fix
debugger
kotlin
History SSL Handshake error #306
Fix PR308
Initially I was suspecting missing of CA certificate for domain as in this issue but it turned out that RoboVM RT was not able to setup connection with TLSv1.2 only
server.
11 Jun 2018
|
debugger
kotlin
soot
jvm
Short update on debugger support for kotlin
.
Recent fixes (#1, #2) unblocked debugger for kotlin but variable resolution is still broken. It still produces following error messages on synthetic kotlin
code for lambdas and collections:
[ERROR] Unable to resolve variable $i$a$1$forEach in method test, class com.test.ViewController
This happen as this variable was declared in synthetic code and this code is out scope defined in debug information for this variable.
Code for variable resolution was pending to upgrade long time ago and best case would be to have variable information without dependency to debug information.
But not so fast: it is not always possible to do it straight away without assumptions and debug information. Integer types case is described bellow.
01 Jun 2018
|
fix
check PR301 for fix.
Kees van Dieren asked for solution about the issue he has with submitting app to apple store. Issue he had is following:
ITMS-90725: SDK Version Issue - In July 2018, iOS app updates submitted to the App Store will need to be built with the iOS ‘11.0’ SDK or later, included in Xcode [9.0] or later. Make sure to update Xcode for future app deliveries. After you’ve corrected the issues, you can use Xcode or Application Loader to upload a new binary to iTunes Connect.
After checking list of possible source of problems following poped up:
$ otool -l IosEsLauncher | grep -A 4 LC_VERSION_MIN_IPHONEOS
cmd LC_VERSION_MIN_IPHONEOS
cmdsize 16
version 8.0
sdk n/a
Load command 10
sdk n/a
– come-on I had it with home made SDK on windows/linux and it should not happen on Mac but it there as well.
Root case