Commit fa561c3
committed
MOAR LOGGING
Context: good! https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=3201349&view=logs&j=8556562a-ae5f-5bd1-7c4d-bf1af4b6f1e1&t=a4d74fbf-7b8e-51d6-b189-8c80ca04a74a
Context: Bad! https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=3201349&view=logs&j=8556562a-ae5f-5bd1-7c4d-bf1af4b6f1e1&t=1ce93f75-3079-5716-18de-288761bcb886
LOGGING FOR THE LOGGING GODS!
The story so far: now we have GREF logs (yay), and can thus see their
creation & destruction.
Conspicuously MISSING, however, is the handle in the exception
message!
System.NotSupportedException: Unable to activate instance of type
Xamarin.Forms.Performance.Integration.Droid.MainActivity from native
handle 0xff88ad3c (key_handle 0x2629e85).
The GREF logs we have DO NOT MENTION 0xff88ad3c nor 0x2629e85.
Compare to the working (JIT-only) iteration, which has a `handle`
statement:
handle 0x2786; key_handle 0x2629e85: Java Type: `xamarin/forms/performance/integration/MainActivity`; MCW type: `Xamarin.Forms.Performance.Integration.Droid.MainActivity`
This leaves one current scary hypothesis (good for Halloween!):
what if the instance isn't being *activated*?
When a Java Callable Wrapper constructor is executed, the Java side
invokes `mono.android.TypeManager.Activate()`, which is
`Java.Interop.TypeManager.n_Activate()`, which will NOT activate an
instance for a variety of reasons.
Is `TypeManager.n_Activate()` being executed?
If it *is* executed, does it *do* anything?
LOG THE HELL OUT OF IT.
Ditto `TypeManager.CreateInstance()`.
Additionally, update `OSBridge::_monodroid_gref_log()` so that the
message is written to *both* `grefs.txt` AND `adb logcat`, to make it
easier to reason about things when only one or the other is around.
(This should allow the `handle` statement to appear in `adb logcat`.)1 parent 6ab20ac commit fa561c3
File tree
2 files changed
+12
-0
lines changed- src
- Mono.Android/Java.Interop
- monodroid/jni
2 files changed
+12
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
136 | 139 | | |
137 | 140 | | |
138 | 141 | | |
139 | 142 | | |
140 | 143 | | |
141 | 144 | | |
142 | 145 | | |
| 146 | + | |
143 | 147 | | |
144 | 148 | | |
145 | 149 | | |
| |||
151 | 155 | | |
152 | 156 | | |
153 | 157 | | |
| 158 | + | |
154 | 159 | | |
155 | 160 | | |
156 | 161 | | |
157 | 162 | | |
158 | 163 | | |
159 | 164 | | |
| 165 | + | |
160 | 166 | | |
161 | 167 | | |
162 | 168 | | |
163 | 169 | | |
164 | 170 | | |
165 | 171 | | |
| 172 | + | |
166 | 173 | | |
167 | 174 | | |
168 | 175 | | |
169 | 176 | | |
| 177 | + | |
170 | 178 | | |
171 | 179 | | |
172 | 180 | | |
| |||
243 | 251 | | |
244 | 252 | | |
245 | 253 | | |
| 254 | + | |
246 | 255 | | |
247 | 256 | | |
248 | 257 | | |
| |||
283 | 292 | | |
284 | 293 | | |
285 | 294 | | |
| 295 | + | |
| 296 | + | |
286 | 297 | | |
287 | 298 | | |
288 | 299 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
| 225 | + | |
225 | 226 | | |
226 | 227 | | |
227 | 228 | | |
| |||
0 commit comments