Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
It's difficult to post a lot of details about this, but I posted a Stack Overflow question about it here: http://stackoverflow.com/questions/10624125/nullreferenceexception-from-clientruntimechannel-cs/10626661#comment13780202_10626661
In the ClientRuntimeChannel.Process(), I was getting an exception thrown due to a null array.Copy() call. About half of the time, the debugger would not break on the thrown exception which would lead to the app hard freezing. Sometimes it would break on the throw; line, and continuing past it would allow my app to run perfectly.
As suggested, I tried the 5.3.3 alpha (I believe I was previously on 5.2 stable?), which was said to fix this bug. This is about half correct. The exception never breaks on the throw; line anymore, but my app now freezes much more frequently than it did before. I can't even get it to run past startup anymore.
This only seems to happen in Debug. I can run a release build of the game perfectly, but debug seems to have some code enabled that's causing my app to hard freeze. (Can't even stop it in the debugger.)
I'm running the app on an iPad 2, but if there's any more information that I can supply, please let me know.
If this is on the simulator, you can get a stack trace using gdb:
- At startup, take note of the PID of the process which is printed to the Application Output pad in MonoDevelop.
- Make the app hang.
- Open a terminal, and execute:
gdb program <PID>
(some output from gdb)
$ (gdb) thread apply all backtrace
(lots of stack traces)
- Then save everything in the terminal to a file and attach it to this bug report.
Created attachment 1910 [details]
Stacktrace/Terminal output for the ClientRuntimeChannel bug.
Thanks a lot, got that done for you! Let me know if there's anything else I can do.
Looks like it's deadlocked in the GC, CC'ing runtime guys.
No, it's not deadlocked on the GC. The GC thread is there happily pumping, this is why you probably mistaken for this.
The app freezes because the debugger has hit a breakpoint on the UI thread and is waiting for further instructions.
Zoltan, can you take a look on this?
The debugger thread is blocked on the GC lock:
#0 0x9724d876 in __psynch_mutexwait ()
#1 0x99f0f6af in pthread_mutex_lock ()
---Type <return> to continue, or q <return> to quit---
#2 0x001fe1dc in GC_lock () at pthread_support.c:1757
#3 0x001f5336 in GC_call_with_alloc_lock (fn=0xe16d0 <reveal_link>,
client_data=0xdcd7c00) at finalize.c:871
#4 0x000e1991 in mono_gc_weak_link_get (link_addr=0xdcd7c00) at boehm-gc.c:472
#5 0x0010a5db in mono_gchandle_get_target (gchandle=1) at gc.c:803
#6 0x000b1313 in get_object_allow_null [inlined] () at :1834
#7 0x000b1313 in get_object (objid=-1337939652, obj=0xb040abd4)
and the user thread is suspended by the debugger.
Is there any kind of workarund available to continue progress on my application? This has me blocked and I cannot continue development.
Ray, you should go back to 5.2 if 5.3.3. is blocking you. There is no known workaround yet.
That said it would probably be a lot easier to track down and fix this bug if we had a test project we can try out ourselves, would it be possible to attach that to this bug report? (you can mark attachments as private so only Xamarin employees can see them).
This issue also showed up in 5.2.
Unfortunately I can't provide a test project. I'll keep tinkering with it and see if I can come up with a test case.
Enabling the 'Use SGEN..' option in Build/iPhone build/Advanced _might_ make the problem disappear.
Thanks for the suggestion, but it didn't seem to make a difference.
The download worked.
Ray, I can run the app, but is there anything in particular I need to do to make it hang? It seems to work fine for me when I just click around.
Frustratingly enough, I cannot seem to reproduce the error. I'll post another bug with more details and another archive the next time I run into it.
Closing this bug for now then. Please reopen if you run into it again.