built and tested on 10586, just tested the same build on 10240 and the speed of the game play is a lot faster.
anything known about this?
for now i’ll just change the min version for the next update,
built and tested on 10586, just tested the same build on 10240 and the speed of the game play is a lot faster.
anything known about this?
for now i’ll just change the min version for the next update,
Would be interesting to profile the game using Visual Studio profiler and see, where’s the difference.
Is this purely a timescale issue, or a frame rate issue?
don’t think its frame rate,
need to test with better conditions, just noticed it when i tried it on 2 other machines that have different hardware and different windows builds so,
will have to enable hyper-v tomorrow and try out on the emulators.
my build machine and one other laptop both running 10586 ran the same so i just pointed at the odd man out which was running 10240
well runs normal in the 10240 emulator so… guess that’s not it
while debugging an infinite loop issue i’ve run into experiencing what a staggered frame rate is like while logging a bunch of stuff
didn’t realize that could speed up the playback of fixedupdate
can waitforseconds cause a infinite loop type response from the editor (e.g. editor freeze and its cpu to around 15% and memory slowly climbing)
Debug.Log("Normal: wait");
yield return new WaitForSeconds(Random.Range(0.1f, 2f));
agent.SetDestination(check[Random.Range(0, trace.count)]);
“Normal: wait” is the last logged statement before editor freezes
and SetDestination logs its own name before executing anything
i have lots of waitforseconds so might be because this is nested in its own method called from a
coroutine method… so confusing
Are you sure it’s hanging on WaitForSeconds? I’d say that would be pretty unlikely.
Attaching a debugger and breaking would tell you exactly where it’s stuck.
if i could tell visual studio to break just before a hang i would (if there’s a way to do this please tell me)
every while loop in the project is logged (and has safety counters just because of trying to find this)
running through thousands of cycles of debugging would drive me more crazy
so decided to re-write the ai avoiding coroutines and nested enumerators
need to find a more manageable way of doing ai anyway
Why not break during the hang?
thank you for the tip
when i tried that i didn’t get expected behavior so i just thought it wasn’t supported
for example after breaking getting an error, and clicking continue it doesn’t continue
and i get “No compatible code running”
and then when i try to step, “Unable to step. Array subscript out of range.”
I didn’t read this the first time i checked (under the title “No compatible code running”)
“The selected debug engine does not support any code executing on the current thread (e.g. only native runtime code is executing”
So is breaking on a hang supported? and in my case its just because i’m breaking on unity engine code?
i have no native dlls in my project
It’s definitely supported. Are you using visual studio to break inside? What does the callstack look like?
Alternatively, if there’s no code running and no callstack available, break using a native debugger, and you should see the native callstack.
That’s awesome! Thank You,
Yes, Visual Studio
how do i break using a native debugger ?
Instead of doing “Debug” → “Attach Unity Debugger”, do “Debug” → “Attach to Process” → select Unity.exe.
> ntdll.dll!00007fff37b704c2() Unknown
mono.dll!free(void * pBlock) Line 51 C
mono.dll!g_queue_pop_head(GQueue * queue) Line 48 C
mono.dll!end_runtime_invoke(_MonoProfiler * prof, _MonoMethod * method) Line 3336 C
mono.dll!mono_profiler_method_end_invoke(_MonoMethod * method) Line 440 C
mono.dll!mono_runtime_invoke(_MonoMethod * method, void * obj, void * * params, MonoObject * * exc) Line 2629 C
Unity.exe!scripting_method_invoke(struct ScriptingMethodMono,struct MonoObject *,struct ScriptingArguments &,struct MonoException * *) Unknown
Unity.exe!ScriptingInvocation::Invoke(struct MonoException * *,bool) Unknown
Unity.exe!Coroutine::ProcessCoroutineCurrent(void) Unknown
Unity.exe!Coroutine::Run(void) Unknown
Unity.exe!MonoBehaviour::CreateCoroutine(struct MonoObject *,struct ScriptingMethodMono) Unknown
Unity.exe!MonoBehaviour::StartCoroutineManaged2(struct MonoObject *) Unknown
Unity.exe!MonoBehaviour_CUSTOM_StartCoroutine_Auto(struct ReadOnlyScriptingObjectOfType<class MonoBehaviour>,struct MonoObject *) Unknown
00000000237d4e85() Unknown
0000000026b77400() Unknown
00000000214aa348() Unknown
00000000221f28d0() Unknown
0000000024de8260() Unknown
00000000318e2050() Unknown
0000000026b77400() Unknown
0000000004c40000() Unknown
000000000c8365a0() Unknown
000000000c8313f0() Unknown
00000000318e20a0() Unknown
0100000024de8260() Unknown
0000000024de8260() Unknown
00000000005fdc10() Unknown
00000000005fdb70() Unknown
00000000005fe340() Unknown
0000000004f367f8() Unknown
00000000005fe250() Unknown
another one
> mono.dll!GC_mark_from(GC_ms_entry * mark_stack_top, GC_ms_entry * mark_stack, GC_ms_entry * mark_stack_limit) Line 761 C
mono.dll!GC_mark_some_inner(...) Line 378 C
mono.dll!GC_mark_some(char * cold_gc_frame) Line 478 C
mono.dll!GC_stopped_mark(int(*)() stop_func) Line 607 C
mono.dll!GC_try_to_collect_inner(int(*)() stop_func) Line 446 C
mono.dll!GC_collect_or_expand(unsigned __int64 needed_blocks, int ignore_off_page) Line 1110 C
mono.dll!GC_alloc_large(unsigned __int64 lw, int k, unsigned int flags) Line 60 C
mono.dll!GC_generic_malloc(unsigned __int64 lb, int k) Line 204 C
mono.dll!GC_malloc(unsigned __int64 lb) Line 311 C
mono.dll!mono_array_new_specific(MonoVTable * vtable, unsigned int n) Line 4422 C
000000000cdf0ad6() Unknown
000000000d51f480() Unknown
00000000005fdaf0() Unknown
0000000023d1f2c0() Unknown
mono.dll!mono_object_new_specific(MonoVTable * vtable) Line 3978 C
000000000d51f480() Unknown
00000000005fdaf0() Unknown
00000000005fda50() Unknown
00000000005fe340() Unknown
000000000c6b67f8() Unknown
00000000005fe250() Unknown
then exception on mono_security_core_clr_is_platform_image
In the watch window, type this:
mono.dll!mono_pmip((void*)0x0d51f480);
Where the hex number is the address in the callstack without a name. It will give you a managed function name. Start looking at the unknown frames from the top.
um, step 1 quickwatch expression: “mono.dll!mono_pmip”
click add watch
and now there’s a watch 1 panel, with the name mono.dll!mono_pmip, and value 0x00…
then what do i do?
You need to type address as an argument to that function.
and then
The address has to be from the callstack. I took “0x0d51f480” from your previous callstack. It’s going to be different every time.
Here’s a video of how to do it: