Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@lewurm
Copy link
Contributor

@lewurm lewurm commented Sep 13, 2019

Avoids this warning printed in the VSMac application output when debugging:

2019-09-13 17:47:27.315540+0200 aWatchOSExtension[31768:24665480] ../../../../../mono/eglib/giconv.c:1029: assertion 'str != NULL' failed

With this trace:

(lldb) mbt
* thread #2
  * frame #0: 0x00583453 aWatchOSExtension`break_on_me at giconv.c:1023:2
    frame #1: 0x005834a6 aWatchOSExtension`monoeg_g_utf16_to_utf8(str=0x00000000, len=0, items_read=0x00000000, items_written=0x00000000, err=0x00000000) at giconv.c:1036:3
    frame #2: 0x0046d871 aWatchOSExtension`mono_thread_get_name_utf8(thread=0x24d08120) at threads.c:1812:16
    frame #3: 0x002cb7ef aWatchOSExtension`thread_commands(command=2, p="�>\x02\x18\x10", end="�>\x02\x18\x10", buf=0xb0ae0d20) at debugger-agent.c:8818:13
    frame #4: 0x002c7170 aWatchOSExtension`debugger_thread(arg=0x00000000) at debugger-agent.c:9932:10
    frame #5: 0x0047652b aWatchOSExtension`start_wrapper_internal(start_info=0x00000000, stack_ptr=0xb0ae1000) at threads.c:1221:3
    frame #6: 0x0047616c aWatchOSExtension`start_wrapper(data=0x7b63a050) at threads.c:1294:8
    frame #7: 0x077365f8 libsystem_pthread.dylib`_pthread_body + 137
    frame #8: 0x077397f7 libsystem_pthread.dylib`_pthread_start + 78
    frame #9: 0x077357ce libsystem_pthread.dylib`thread_start + 34

Introduced by b5c0c83 and seemingly fixed by accident in 7b64f1c#diff-f1a9287559d3aa620b058619f47f00c9R1832

Instead of backporting 7b64f1c to 2019-08, I'm proposing this PR for the release branch.

Avoids this warning printed in the VSMac application output when debugging:
```
2019-09-13 17:47:27.315540+0200 aWatchOSExtension[31768:24665480] ../../../../../mono/eglib/giconv.c:1029: assertion 'str != NULL' failed
```

With this trace:
```
(lldb) mbt
* thread #2
  * frame #0: 0x00583453 aWatchOSExtension`break_on_me at giconv.c:1023:2
    frame #1: 0x005834a6 aWatchOSExtension`monoeg_g_utf16_to_utf8(str=0x00000000, len=0, items_read=0x00000000, items_written=0x00000000, err=0x00000000) at giconv.c:1036:3
    frame #2: 0x0046d871 aWatchOSExtension`mono_thread_get_name_utf8(thread=0x24d08120) at threads.c:1812:16
    frame mono#3: 0x002cb7ef aWatchOSExtension`thread_commands(command=2, p="�>\x02\x18\x10", end="�>\x02\x18\x10", buf=0xb0ae0d20) at debugger-agent.c:8818:13
    frame mono#4: 0x002c7170 aWatchOSExtension`debugger_thread(arg=0x00000000) at debugger-agent.c:9932:10
    frame mono#5: 0x0047652b aWatchOSExtension`start_wrapper_internal(start_info=0x00000000, stack_ptr=0xb0ae1000) at threads.c:1221:3
    frame mono#6: 0x0047616c aWatchOSExtension`start_wrapper(data=0x7b63a050) at threads.c:1294:8
    frame mono#7: 0x077365f8 libsystem_pthread.dylib`_pthread_body + 137
    frame mono#8: 0x077397f7 libsystem_pthread.dylib`_pthread_start + 78
    frame mono#9: 0x077357ce libsystem_pthread.dylib`thread_start + 34
```

Introduced by b5c0c83 and seemingly fixed by accident in mono@7b64f1c#diff-f1a9287559d3aa620b058619f47f00c9R1832

Instead of backporting 7b64f1c to 2019-08, I'm proposing this PR for the release branch.
@lewurm lewurm added this to the 2019-08 (6.6.xx) milestone Sep 13, 2019
@jaykrell
Copy link
Contributor

Darn. I thought I read through the code at the time and decided null would roundtrip as null.
But I guess not, the likes of g_return_val_if_fail (str != NULL, NULL);
which maybe should just be:
if (!str) return NULL;

@lewing lewing merged commit f31f5ea into mono:2019-08 Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants