Search found 40 matches
- Wed Jan 11, 2006 11:04 pm
- Forum: C++ Development
- Topic: "Pure virtual function call" from wxSocketClient::
- Replies: 19
- Views: 2862
Getting somewhere on this problem
I've found the cause of this bug (my fault), and the moral of the story is: Never, ever destroy a wxWidgets object in the destructor of a global instance of an object. I declared an object like this: ClientComm client_comm; This object refers to some wxWidgets objects (specifically wxSocket) and cal...
- Fri Jan 06, 2006 1:12 am
- Forum: C++ Development
- Topic: "Pure virtual function call" from wxSocketClient::
- Replies: 19
- Views: 2862
Ok, I've gotten some debug symbols, and I even figured out how to unpack the source in the right place so I could browse it. I've made an addition to the bug tracker here: http://sourceforge.net/tracker/index.php?func=detail&aid=1396402&group_id=9863&atid=109863 Have a look there to see what's going...
- Thu Jan 05, 2006 9:05 pm
- Forum: C++ Development
- Topic: "Pure virtual function call" from wxSocketClient::
- Replies: 19
- Views: 2862
You don't have debug information. Please paste that one file compilation command that scrolls through while you emerge it, as I asked. Sorry about that. Trying to do too many things at once. Here's the line you wanted: ./bk-deps i686-pc-linux-gnu-g++ -c -o basedll_log.o -D__WXGTK__ -DwxUSE_GUI=0 -D...
- Thu Jan 05, 2006 5:53 pm
- Forum: C++ Development
- Topic: "Pure virtual function call" from wxSocketClient::
- Replies: 19
- Views: 2862
Re: Debug wxGTK
Can you paste one compiler line, where the settings added by wxGTK are overriding your CXXFLAGS ones, and not vice-versa? First problem was that I needed to set "debug" in the USE flags. Even so, I'm not getting debug symbols. I don't know why. I'm not getting any kind of warning from gdb or the co...
- Thu Jan 05, 2006 11:23 am
- Forum: C++ Development
- Topic: "Pure virtual function call" from wxSocketClient::
- Replies: 19
- Views: 2862
Debug wxGTK
Well, I tried building a debug wxGTK, but wxGTK overrides the optimization options offered by Gentoo, making it useless for debugging.
- Thu Jan 05, 2006 2:33 am
- Forum: C++ Development
- Topic: "Pure virtual function call" from wxSocketClient::
- Replies: 19
- Views: 2862
Re: Returning wrong type
What does the debugger tell you? Not much. The call to a pure virtual function is inside of "GSocket::Close () from /usr/lib/libwx_baseu_net-2.6.so.0", which is part of wxWidgets and compiled without debugging symbols. I suppose I could emerge wxWidgets with the compiler settings temporarily set to...
- Wed Jan 04, 2006 10:59 pm
- Forum: C++ Development
- Topic: "Pure virtual function call" from wxSocketClient::
- Replies: 19
- Views: 2862
Re: Returning wrong type
Note that my Connect function only returns the wrong type because I chopped out some other code in between that's not relevant to the discussion because it has nothing to do with the socket. Also, for that "buf", I'm using malloc instead of new. The reason is that I want to use realloc, and there's...
- Wed Jan 04, 2006 8:42 pm
- Forum: C++ Development
- Topic: "Pure virtual function call" from wxSocketClient::
- Replies: 19
- Views: 2862
Returning wrong type
Note that my Connect function only returns the wrong type because I chopped out some other code in between that's not relevant to the discussion because it has nothing to do with the socket. Also, for that "buf", I'm using malloc instead of new. The reason is that I want to use realloc, and there's ...
- Wed Jan 04, 2006 1:17 am
- Forum: C++ Development
- Topic: "Pure virtual function call" from wxSocketClient::
- Replies: 19
- Views: 2862
Looks to me like you are deleting twice. :wink: CommSite::~CommSite() { free(buf); if (socket) socket->Destroy(); // delete socket; } Don't you still need to free the memory associated with the object itself? Anyhow, that's not the problem. I've tried it both ways (Destroy only and delete only), an...
- Tue Jan 03, 2006 11:42 pm
- Forum: C++ Development
- Topic: "Pure virtual function call" from wxSocketClient::
- Replies: 19
- Views: 2862
"Pure virtual function call" from wxSocketClient::
Here's my code to create a socket: int CommSite::Connect() { wxIPV4address a; a.Hostname(addr); a.Service(port); socket = new wxSocketClient(wxSOCKET_REUSEADDR); bool i = socket->Connect(a, true); return i; } And here's my code to destroy it: CommSite::~CommSite() { free(buf); if (socket) socket->De...
- Wed Dec 14, 2005 8:23 pm
- Forum: C++ Development
- Topic: wxListCtrl/wxListView not behaving as per documentation
- Replies: 3
- Views: 1697
Still not working right...
Ok, here's how I created my columns: m_pList->InsertColumn(0, _T("Activity"), wxLIST_FORMAT_LEFT, -1); m_pList->InsertColumn(1, _T("Client"), wxLIST_FORMAT_LEFT, -1); m_pList->InsertColumn(2, _T("Server"), wxLIST_FORMAT_LEFT, -1); m_pList->InsertColumn(3, _T("Info"), wxLIST_FORMAT_LEFT, -1); Based o...
- Wed Dec 14, 2005 8:14 pm
- Forum: C++ Development
- Topic: Problem distinguishing events
- Replies: 12
- Views: 1713
False alarm
Yes, it turns out that it was a version problem. Gentoo had three versions of wxGTK installed. When I uninstalled all of them and then reinstalled 2.6.1 (the latest in stable), it now all works exactly as it should.
Thank you and my apologies.
Thank you and my apologies.
- Wed Dec 14, 2005 7:08 pm
- Forum: C++ Development
- Topic: Problem distinguishing events
- Replies: 12
- Views: 1713
Version....
Actually, "wx-config --version" says I'm using 2.4.2, but Gentoo insists that I have 2.6.1 installed. Bug in wx-config or lying package manager? 

- Wed Dec 14, 2005 7:05 pm
- Forum: C++ Development
- Topic: Problem distinguishing events
- Replies: 12
- Views: 1713
No, still not working
So, what I did was replace the event table line for EVT_COMMAND_SCROLL with the following: EVT_COMMAND_SCROLL_TOP(ID_SliderH, PlayPanel::OnSliderH) EVT_COMMAND_SCROLL_BOTTOM(ID_SliderH, PlayPanel::OnSliderH) EVT_COMMAND_SCROLL_LINEUP(ID_SliderH, PlayPanel::OnSliderH) EVT_COMMAND_SCROLL_LINEDOWN(ID_S...
- Wed Dec 14, 2005 6:50 pm
- Forum: C++ Development
- Topic: Problem distinguishing events
- Replies: 12
- Views: 1713
Ok, so I have to select everything?
Are you saying that if I want to distinguish events, I cannot use EVT_COMMAND_SCROLL, but instead, I must select each of the specific event types individually? Won't that kinda make the program not forward compatible with future changes to the scrollbar widget? It seems to me that using EVT_COMMAND_...