App crashes when connected device which have non-latin name.
Brought to you by:
frankfriemel
I found that Shairport4w crashed when my iPad connected.
And this issue seems to be related with device name.
I changed my iPad name to "ganadist" it works well. but after restore default korean name "ganadist의 iPad", app crashed again.
Would you please post a crash dump. I can not reproduce this issue
I uploaded crash dump on https://db.tt/KRS0exHO.
And this is log from windbg when app crashed.
++++++++ Me +++++++++
RTSP/1.0 200 OK
Apple-Response: Sy8o+NN9FQpdA4YnTEt1RkbmHNlmvq5mbV8PN989o43HTAsOfwM0wxxdVBT0tnIrTP09zJjjX8Z+BOv/pj0+GGKZyDhTPBjiwdAxa1gX10RuytBLPcC0/eoFLmCYQzrEtTOrUnZ/FQUFsTESXDLNMbZIe2l37qvJ7npnDZHpRnaDHT49armwwCZe0kLMu0X+9CIQUqBvK9qw1xuh4E+gDud4qlMiVqzbwRU+nEolF0e8RN30nAvBvDzzrjLkgIrwm3P3W2TTpcO3RbJsIFhFCgmTK37ZwICWhgmEaCW+8GFKfCEtmA5lvZCYXphOpJipS0ALyKK4uKbOQQ/mz/3d3w
Audio-Jack-Status: connected; type=analog
CSeq: 0
Public: ANNOUNCE, SETUP, RECORD, PAUSE, FLUSH, TEARDOWN, OPTIONS, GET_PARAMETER, SET_PARAMETER, POST, GET
Server: AirTunes/105.1
-------- Me ---------
+++++++ Http Request +++++++
ANNOUNCE rtsp://192.168.0.23/17778765029282103884 RTSP/1.0
X-Apple-Client-Name: ganadist??iPad
CSeq: 1
X-Apple-Device-ID: 0x1caba71781b6
DACP-ID: C8B2528DB99C8082
Active-Remote: 1813638100
Content-Type: application/sdp
Content-Length: 650
User-Agent: AirPlay/190.9
v=0
o=AirTunes 17778765029282103884 0 IN IP4 192.168.0.10
s=AirTunes
i=ganadist??iPad
c=IN IP4 192.168.0.10
t=0 0
m=audio 0 RTP/AVP 96
a=rtpmap:96 AppleLossless
a=fmtp:96 352 0 16 40 10 14 2 255 0 0 44100
a=rsaaeskey:kmc/pzR/VNxC1dNkm1nktDyaBLdSAdupmML3OhKwfskO+6DAmgoT04w65dn495NjcRIzYZMPXsF3jGjzP8fcjc3+ez/CjOkf0LWFvHu0vmJY19uJEGRNtGJNdGn2AVttU7j6ysmaz6fr2NBeWyfoF9fr5MezzrvsaEIn/m9EimQm/3asQf0V+EULgBZqkdRj6EvSau94ozIvYirCTo9ww/klkI6/suOqSLXxFolu1NUrfXmTAitjXb158pFz2dqCkIxNxe1p8VHc5m2p61ZScOsQDqT64L6avKepx09ZgiLwnfE73nhGt45Jo7uGa+0tSkkkiCFNahWB3U/9c/75pw==
a=aesiv:KREEDnerTdJ8UKz5PsLMmQ==
a=min-latency:11025
a=max-latency:88200
------- Http Request -------
(1544.774): C++ EH exception - code e06d7363 (first chance)
(1544.774): C++ EH exception - code e06d7363 (!!! second chance !!!)
Loading symbols for 75fe0000 C:\WINDOWS\SysWOW64\KERNELBASE.dll -> C:\WINDOWS\SysWOW64\KERNELBASE.dll
ERROR: Symbol file could not be found. Defaulted to export symbols for C:\WINDOWS\SysWOW64\KERNELBASE.dll -
Loading symbols for 00a20000 Shairport4w.exe -> Shairport4w.exe ERROR: Module load completed but symbols could not be loaded for Shairport4w.exe
eax=08a2f510 ebx=08a2f6c4 ecx=00000003 edx=00000000 esi=010acad8 edi=08a2f628
eip=75ff2eec esp=08a2f510 ebp=08a2f56c iopl=0 nv up ei pl nz ac po nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000212
KERNELBASE!RaiseException+0x48:
75ff2eec 8b4c2454 mov ecx,dword ptr [esp+54h] ss:002b:08a2f564=ad7401ba
Should be fixed now, please check the new Version 1.0.7.2
Additionally the Airport Name can take Unicode characters, now.
Thank you for your reply.
And I tried with new version. but it crashed again.
I'll attach dump file from new version
Sorry, the problem persists obviously. From the dunp I can see that the parser is crashing ... but the cause for the Crash is in timline before and the dump doesn't contain the data being parsed, so I still can't reproduce the crash. I tried to generate the input myself by UTF-8 encoding the name "ganadist의 iPad" and parsing it but it didn't Crash. So it would be great if you would record a trace to file and provide this file for download once more.
Thank you very much
Thank you again for your kind reply.
But how can I record a trace file?
Shairport4w has a log to file option. But I guess its capabilities aren't sufficient for the need to log these special characters. I will provide an improved Version next weekend
Okay. I'll wait a next version. :D
Thank you.
I've install the shiny newest visual studio 2013 (trial!) and tried to debug. :)
Then I found there is something wrong in strlwr_s().
I tried to use own strlwr replacement (using stl), crash disappeared.
I guess there is a problem that handle non-latin character on strlwr_s().
On http://msdn.microsoft.com/en-us/library/y889wzfw.aspx, strlwr can handle string by "current locale", but in my case, input string is always utf-8, not locale.
You are right. The Parser utilized the strlwr version from the checked namespace, which threw an exception in case of an error - unnecessary. I uploaded a new version of Shairport4w which hopefully will work finally.
Thank you
It works very well.
Great works!
Thank you very much.