Debugger crashes inspecting children

I’m consistently getting an app crash while inspecting children in the Locals inspector of the debugger in Water. I mentioned this bug in passing in this post about an “Error getting locals” bug, but it seems to have been unrelated since I’m still getting the crash even on the .2360 build that Marc posted for me on that thread.

Here is my Water log, starting at debugger run (as a zip because the uploader filtered out .log type):

Water.zip (897 Bytes)

And here is my test project:

com.matt.tests.zip (189.7 KB)

Thanks, logged as bugs://81702

To be clear, Water crashes (ie terminated) completely? No “Oops something went wrong” error message dialog, just gone?

From the error I see in the log file, it should recover fine (just not show the children, ofc)…

Sorry, thanks for the question. The android app crashes and the debug session terminates. No “Oops something went wrong” error message (or any sort of message), the debug session just terminates. Water continues running as if I had manually stopped the debugger.

Ah, ok. thanx!

Could you give me exact steps that leads to crashing, please. Where do you set breakpoint in your test project, what variable do you expand and so on.

I have breakpoints set at these lines:

fBoolean := true;

and

if (aParent <> nil) then

At the break on fBoolean := true; in the Locals inspector, I see savedInstanceState with a value of nil and this which refers to MainActivity and is expanded by default. The only items inside this are android.app.Activity (which can be expanded further) and fBoolean which at this point is false.

If I attempt to expand android.app.Activity then the debugger dies, after successfully expanding for about 500ms.

1 Like

Any update on this? I still cannot debug with my “Locals” expanded or the debugger crashes.

We can’t reproduce your problem :frowning:
Where do you run your testcase on device or emulator?

On device. I’ve not tried an emulator, but I’ll test to see if anything changes.

1 Like

Interesting. I cannot reproduce when running on an emulator.

1 Like

We can’t reproduce the problem on device also. What is your Android SDK version and what Windows version do you use?

Android SDK 27 and Windows 10 v1803. The device I’m debugging on is a Pixel XL running Android Pie (9.0).

Thanx. I tested here with SDK 28 on a Nexus 6P, which is, unfortunately, stuck on Oreo 8.1 :(.

For you, does the crash happen everywhere when you expect children or just for the very specific location? any chance you could post a screenshot or video of the exact steps you take/what node is selected/gets expanded, when the crash happens?

thanx!
marc

bugs://81702 got closed with status cannotrepro.

I haven’t mentioned this in a while, but I still cannot use the Debugger for my Android apps in Water. A couple issues here…

  1. The debug session is immediately terminated if I open the debug pane. I can click on a variable and see its value in-line in the editor while debugging, but this only works for locally scoped variables, not for class members.
  2. Only about 20-30% of my debug sessions work in the first place. The app launches but then hangs at startup and never starts (I’ve waited hours before just to be sure it wasn’t just slow). If I kill the session and then immediately re-launch the debugger then it may work (but again, at 20-30% success rate).

This is the case with any app and on the 3 devices I have tested with or any emulator I have tried. I just uninstalled Water/Elements and deleted all program folders (all RemObjects folders in C:\Program Files, C:\ProgramData, and C:\{user}\AppData) and registry values, and reinstalled .2497, but still have the same issue.

What can I do to help get more diagnostic data on this?

How does this:

and this

fit together? if the debug session stops right way how can you inspect any children?

what happens/how does to fail for class members?

Can I see the output from the build log (just everything after the build finished is fine) and the debug console/log, for when this happens? Also, anything oof relevance in logcat at the same time (I know, it can be hard to find “relevant” stuff in logcat, it’s so damn verbose…).

I’ll see if someone form the team can repro this, tomorrow. Unfortunately, my only Windows in in VMs, with no access to emulators or a real hardware device. In Fire, I’m not seeing any of these issues, so oof they are not specific to your setup, they probably are Windows-specific.

For “The debug session is immediately terminated if I open the debug pane.”, can you attach a .NET debugger to Water (could be VS or a second copy of Water) to see of there’s any exceptions when this happens?

If I click on a local variable in the editor, I can see its value out to the side in the editor (in the code). If I open the Debug pane, the session stops.

If I click on a local variable in the editor (like above) I see its value to the side, but a class member does not show anything.

I’ll get that to you, yes

I believe I tried this before and it wasn’t working, but I’ll give it a try and see if I get any helpful info this time

Ah ok.

What happens if you select a whole expression (ie “foo.bar”, rather then just putting the cursor on “bar”)? in any case, a concrete example would be appreciated, as this is supposed to work; I’ll also see if I can repro this part myself later (as is should be able to do that in Fire).

Is this with the console active or the inspector? if the latter, what if you open the console directly (with the appropriate menu command from the View mere), does the console show?c if so does “po foo.bar” work for the expression that does nit work in the editor?

thanx!

Please; if it “doesn’t work”, id appreciate to know what fails, exactly, and how.

1 Like

This works for me, so a more concrete case would be appreciated (this wot be different Fire vs. Water):