I did what you said. The warning messages aren't shown right now but the seg fault still happens!!
I did what you said. The warning messages aren't shown right now but the seg fault still happens!!
Why don't you answer my first question? It's one of the most common mistakes to use threads with Qt sockets even if it's completely unnecessary in simple cases. Qt sockets are asynchronous. They don't block the GUI. Using threads just makes things a lot more error-prone as you have already noticed.
The next problem is that you use direct calls to communicate between two threads. Your thread class should enter to an event loop, and then you should use signals and slots or custom events to deliver the message to be written to the correct thread.
J-P Nurmi
This program is a simple client, it receives a lot of data and sometimes it should messages to set in gateway what type of message it will receive.
I changed the class of socket, now it isn't inheriting QThread, but...
the seg fault still happen!
I was looking that others parts of the program can send messages well, just when I set in user interface the SpinView it crashes in the function used to send.
I've reimplemented SpinView and it's sending messages now!
Thanks
Bookmarks