I was using the Miami SDK. Naively, I used to declare a global SocketBase shared across files… and tasks! This sharing across tasks sometimes would cause crashes when two tasks were using a same SocketBase. These crashes became obvious when I tried to factor out the code opening the library. I should have RTFM’ed: it clearly states that “The recommended approach, if several Processes need to use the "bsdsocket.library" functions, is to reopen the library for every user.”
Make sure that tasks do not share a common SocketBase!
Comments (4)
-
reporter -
reporter - changed status to resolved
The solution is (1) replace the Miami SDK with the Roadwho one, which allows compiling with SocketBase global variable and (2) use the TASKSOCKBASE include to define SocketBase as FindTask(NULL)->tc_UserData.
-
reporter Worked on stability, especially wrt. sockets. Fixed
#111,#113, and#114→ <<cset ed2c99136650>>
-
reporter Worked on stability, especially wrt. sockets. Fixed
#111,#113, and#114→ <<cset bbba268cf188>>
- Log in to comment
Thank you AmigaOS and AROS developers for explaining the cause of the crashes and providing a solution!