socket error on xbmc
#1
Hi,

Since the version of 04-01-2007, I have some errors with the socket library. With a simple test of a system server/multi-client, when I try to receive the message of a client, I have the error: "socket operation on non-socket". Do you have any idea of the reason and a solution? Here is a simple program which didn't work with version post 04/01/2007

It works on PC !

Thanks
Reply
#2
I've mentioned this, if you are saying it works on the Xbox with all versions and doesn't work on the PC with the latest?

It started happening around the time of either the proxy patch or when there were some socket changes.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#3
He says oposite thou :

still there could be something odd going on there.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#4
I may clarify a bit...
The problem is only on xbmc plateform (not on XBMC for PC, only with python on my PC)
Reply
#5
could you provide a Debug Log?
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#6
The XBMC version used for test is XBMC-SVN_2007-04-20_rev8582-T3CH-MIDI.
Here is the log
Code:
13:10:58 M: 42946560 DEBUG: CGUIMediaWindow::GetDirectory (Q:\scripts)
13:10:58 M: 42946560 DEBUG: ParentPath = []
13:11:00 M: 40542208 DEBUG: CApplication::OnKey: 167 pressed, action is 4
13:11:00 M: 40517632 DEBUG: CApplication::OnKey: 167 pressed, action is 4
13:11:00 M: 40542208 DEBUG: CApplication::OnKey: 167 pressed, action is 4
13:11:01 M: 40517632 DEBUG: CApplication::OnKey: 167 pressed, action is 4
13:11:01 M: 40542208 DEBUG: CApplication::OnKey: 11 pressed, action is 7
13:11:01 M: 40529920 DEBUG: LoadLibraryA('python24.dll')
13:11:01 M: 39411712 DEBUG: LoadLibrary('python24.dll') returning: 0xb8a010
13:11:01 M: 39411712 DEBUG: dllGetProcAddress(0xaa5f50(kernel32.dll), 'InterlockedCompareExchange') => 0x9e224
13:11:01 M: 39145472 DEBUG: GetModuleFileNameA(0x0, 0x1562490, 256) => 'xbmc.xbe'
13:11:01 M: 39145472 DEBUG: advapi32.dll fake function RegQueryInfoKeyA called
13:11:01 M: 39145472 DEBUG: advapi32.dll fake function RegQueryInfoKeyA called
13:11:01 M: 39108608 INFO: Stating file Q:\system\python\python24.zlib
13:11:01 M: 39079936 INFO: Stating file Q:\system\python\python24.zlib\zlib
13:11:01 M: 39079936 INFO: Stating file Q:\system\python\DLLs
13:11:01 M: 39079936 INFO: Stating file Q:\system\python\DLLs\zlib
13:11:01 M: 39079936 DEBUG: LoadLibraryExA called with flags:
- LOAD_WITH_ALTERED_SEARCH_PATH
13:11:01 M: 39079936 DEBUG: LoadLibraryA('zlib.pyd')
13:11:01 M: 39010304 DEBUG: kernel32.dll fake function DisableThreadLibraryCalls called
13:11:01 M: 39010304 DEBUG: LoadLibrary('zlib.pyd') returning: 0xcaf830
13:11:01 M: 39010304 DEBUG: dllGetProcAddress(0x1580000(zlib.pyd), 'initzlib') => 0x1582150
13:11:02 M: 38387712 INFO: Stating file Q:\system\python
13:11:02 M: 38387712 INFO: Stating file Q:\system\python\lib\site-packages
13:11:02 M: 37990400 INFO: Stating file Q:\system\python\python24.zlib\encodings
13:11:02 M: 37990400 INFO: Stating file Q:\system\python\python24.zlib
13:11:02 M: 37990400 INFO: Stating file Q:\system\python\python24.zlib\encodings\codecs
13:11:02 M: 37990400 INFO: Stating file Q:\system\python\python24.zlib\encodings\exceptions
13:11:02 M: 37990400 INFO: Stating file Q:\system\python\python24.zlib\encodings\types
13:11:02 M: 37990400 INFO: Stating file Q:\system\python\python24.zlib\encodings\cp0
13:11:02 M: 37990400 INFO: Stating file Q:\system\python\python24.zlib\cp0
13:11:02 M: 37990400 INFO: Stating file Q:\system\python\DLLs\cp0
13:11:02 M: 37990400 INFO: Stating file Q:\system\python\Lib
13:11:02 M: 37990400 INFO: Stating file Q:\system\python\Lib\cp0
13:11:02 M: 37990400 INFO: Stating file Q:\system\python\spyce
13:11:02 M: 37990400 INFO: Stating file Q:\system\python\spyce\cp0
13:11:02 M: 37990400 INFO: Stating file Q:\system\python\python24.zip
13:11:02 M: 37990400 INFO: Stating file Q:\system\python
13:11:02 M: 37990400 INFO: Stating file Q:\system\python\python24.zip\cp0
13:11:02 M: 37990400 INFO: Stating file Q:\system\python\lib\plat-win
13:11:02 M: 37990400 INFO: Stating file Q:\system\python\lib
13:11:02 M: 37990400 INFO: Stating file Q:\system\python\lib\plat-win\cp0
13:11:02 M: 37990400 INFO: Stating file Q:\system\python\lib\lib-tk
13:11:02 M: 37990400 INFO: Stating file Q:\system\python\lib
13:11:02 M: 37990400 INFO: Stating file Q:\system\python\lib\lib-tk\cp0
13:11:02 M: 37990400 INFO: Stating file Q:\python
13:11:02 M: 37990400 INFO: Stating file Q:\python\cp0
13:11:02 M: 37990400 INFO: Stating file Q:\system\python
13:11:02 M: 37990400 INFO: Stating file Q:\system\python\cp0
13:11:02 M: 37990400 INFO: Stating file Q:\system\python\python24.zlib\sitecustomize
13:11:02 M: 37990400 INFO: Stating file Q:\system\python\DLLs\sitecustomize
13:11:02 M: 37990400 INFO: Stating file Q:\system\python\Lib\sitecustomize
13:11:02 M: 37990400 INFO: Stating file Q:\system\python\spyce\sitecustomize
13:11:02 M: 37990400 INFO: Stating file Q:\system\python\python24.zip\sitecustomize
13:11:02 M: 37990400 INFO: Stating file Q:\system\python\lib\plat-win\sitecustomize
13:11:02 M: 37990400 INFO: Stating file Q:\system\python\lib\lib-tk\sitecustomize
13:11:02 M: 37990400 INFO: Stating file Q:\python\sitecustomize
13:11:02 M: 37990400 INFO: Stating file Q:\system\python\sitecustomize
13:11:02 M: 37982208 INFO: -->Python Initialized<--
13:11:02 M: 37982208 INFO:
13:11:02 M: 38699008 DEBUG: CGUIMediaWindow::GetDirectory (Q:\scripts)
13:11:02 M: 38682624 DEBUG: ParentPath = [Q:\scripts]
13:11:02 M: 38694912 INFO: Stating file Q:\scripts
13:11:02 M: 38694912 INFO: Stating file Q:\scripts\select
13:11:02 M: 38694912 INFO: Stating file Q:\system\python\python24.zlib\select
13:11:02 M: 38694912 INFO: Stating file Q:\system\python\DLLs\select
13:11:02 M: 38694912 DEBUG: LoadLibraryExA called with flags:
- LOAD_WITH_ALTERED_SEARCH_PATH
13:11:02 M: 38694912 DEBUG: LoadLibraryA('select.pyd')
13:11:02 M: 38662144 DEBUG: kernel32.dll fake function DisableThreadLibraryCalls called
13:11:02 M: 38641664 DEBUG: LoadLibrary('select.pyd') returning: 0xb1beb0
13:11:02 M: 38621184 DEBUG: dllGetProcAddress(0x15a0000(select.pyd), 'initselect') => 0x15a15b0
13:11:02 M: 38621184 INFO: Stating file Q:\scripts\socket
13:11:02 M: 38621184 INFO: Stating file Q:\scripts\_socket
13:11:02 M: 38604800 INFO: Stating file Q:\system\python\python24.zlib\_socket
13:11:02 M: 38604800 INFO: Stating file Q:\system\python\DLLs\_socket
13:11:02 M: 38391808 DEBUG: LoadLibraryExA called with flags:
- LOAD_WITH_ALTERED_SEARCH_PATH
13:11:02 M: 38174720 DEBUG: LoadLibraryA('_socket.pyd')
13:11:02 M: 37883904 DEBUG: kernel32.dll fake function DisableThreadLibraryCalls called
13:11:02 M: 37961728 DEBUG: LoadLibrary('_socket.pyd') returning: 0xcc0070
13:11:02 M: 37990400 DEBUG: dllGetProcAddress(0x15b0000(_socket.pyd), 'init_socket') => 0x15b4bf0
13:11:02 M: 37744640 INFO: Stating file Q:\scripts\_ssl
13:11:02 M: 37744640 INFO: Stating file Q:\system\python\python24.zlib\_ssl
13:11:02 M: 37527552 INFO: Stating file Q:\system\python\DLLs\_ssl
13:11:02 M: 37527552 DEBUG: LoadLibraryExA called with flags:
- LOAD_WITH_ALTERED_SEARCH_PATH
13:11:02 M: 37699584 DEBUG: LoadLibraryA('_ssl.pyd')
13:11:02 M: 36839424 DEBUG: kernel32.dll fake function DisableThreadLibraryCalls called
13:11:02 M: 36839424 DEBUG: LoadLibrary('_ssl.pyd') returning: 0xbdd6b0
13:11:02 M: 36839424 DEBUG: dllGetProcAddress(0x15c0000(_ssl.pyd), 'init_ssl') => 0x15c1820
13:11:02 M: 36728832 INFO: Stating file Q:\scripts\threading
13:11:02 M: 36413440 DEBUG: kernel32.dll fake function SetConsoleCtrlHandler called
13:11:02 M: 36421632 INFO: Stating file Q:\scripts\traceback
13:11:02 M: 36417536 INFO: Stating file Q:\scripts\atexit
13:11:02 M: 36380672 DEBUG: LoadLibraryA('ws2_32')
13:11:02 M: 36380672 DEBUG: LoadLibrary('ws2_32.dll') returning: 0xaa611c
13:11:02 M: 36380672 DEBUG: dllGetProcAddress(0xaa611c(ws2_32.dll), 'getaddrinfo') => 0x20f9ba
13:11:02 M: 36380672 DEBUG: dllGetProcAddress(0xaa611c(ws2_32.dll), 'getaddrinfo') => 0x20f9ba
13:11:02 M: 36380672 DEBUG: dllGetProcAddress(0xaa611c(ws2_32.dll), 'getnameinfo') => 0x20f996
13:11:02 M: 36380672 DEBUG: dllGetProcAddress(0xaa611c(ws2_32.dll), 'freeaddrinfo') => 0x20f604
13:11:33 M: 35856384 ERROR: GetSocketForIndex() invalid index:-802647896
13:11:33 M: 35856384 INFO: Stating file Q:\system\python\python24.zlib\threading.py
13:11:33 M: 35856384 INFO: Stating file Q:\scripts\threading.py
13:11:33 M: 35856384 INFO: Stating file Q:\system\python\python24.zlib\threading.py
13:11:33 M: 35856384 INFO: Stating file Q:\system\python\DLLs\threading.py
13:11:33 M: 35856384 INFO: Stating file Q:\system\python\Lib\threading.py
13:11:33 M: 35856384 INFO: Stating file Q:\system\python\spyce\threading.py
13:11:33 M: 35856384 INFO: Stating file Q:\scripts\testServer.py
13:11:33 M: 35856384 INFO: Exception in thread Thread-1:
Traceback (most recent call last):
File "Q:\system\python\python24.zlib\threading.py", line 442, in __bootstrap
File "Q:\scripts\testServer.py", line 69, in run
data = self.client.recv(self.size)
error: (10038, 'Socket operation on non-socket')
Reply
#7
ok. some operation is returning an invalid index. not entirely sure what it could be. will try to figure it out.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#8
I don't know if your change elupus was related to solexalex's issue.

But here's a log for the winsock error I get only with xbmc_pc.exe

http://pastebin.ca/457748 <-expires in two days, I don't know if they are related
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#9
I made some tests. When I print the socket object, I got nothing returned on xbmc (on pc I got something like '<socket._socketobject object at 0x00E20720>'
And when I try to print the result of the accept I have nothing again. This can explain the invalid index.
Does the socket library use the winsock dll?
I hope this can help
Reply

Logout Mark Read Team Forum Stats Members Help
socket error on xbmc0