Search found 46 matches

by Virchanza
Tue Jun 28, 2011 8:13 pm
Forum: Announcements and Discoveries
Topic: Dynamo : A network analysis tool
Replies: 4
Views: 1339

Dynamo : A network analysis tool

So far I've got it running on Linux and MS-Windows.

Here's a screenshot:

Image

I have a page for it on my website, with information, screenshots and downloads:

http://virjacode.com/projects/dynamo
by Virchanza
Fri Sep 17, 2010 1:24 am
Forum: C++ Development
Topic: Segfault in the destructor for wxListBox (Ubuntu & GTK+)
Replies: 6
Views: 929

Why do you need lockers? is this a multi threaded application involved? Yes it's a multi-threaded program. It's a program that does Ethernet networking. At any time, it can have between 1 to 3 threads running (1 thread for the GUI, 1 thread for reading frames in from the network, 1 thread for sendi...
by Virchanza
Thu Sep 16, 2010 3:33 am
Forum: C++ Development
Topic: Segfault in the destructor for wxListBox (Ubuntu & GTK+)
Replies: 6
Views: 929

Thanks for the reply David. I tried what you said, and also tried stuff like: wxString str; str = MakeStringFromIP(p->num); m_list_ips->Append(str); but it still crashes. I need to Clear() the list boxes before I destroy the dialog box, otherwise the program crashes. Any thoughts?
by Virchanza
Wed Sep 15, 2010 12:48 pm
Forum: C++ Development
Topic: Segfault in the destructor for wxListBox (Ubuntu & GTK+)
Replies: 6
Views: 929

I found a way to prevent the crash. I changed the destructor from: void Dialog_Detailed_MAC_Info::OnButtonClick_Close( wxCommandEvent& event ) { this->Destroy(); } to: void Dialog_Detailed_MAC_Info::OnButtonClick_Close( wxCommandEvent& event ) { m_list_ips->Clear(); /* These calls are needed to avoi...
by Virchanza
Wed Sep 15, 2010 12:26 pm
Forum: C++ Development
Topic: Segfault in the destructor for wxListBox (Ubuntu & GTK+)
Replies: 6
Views: 929

I did two things: 1) I commented out the code for the function OnListBox_ItemSelected_IP , so that's not what's causing the crash. 2) I replaced all calls to ->Append with calls to ->InsertItems , but it had no effect, the program still crashes when I close the child dialog box. Any ideas, anyone?
by Virchanza
Wed Sep 15, 2010 12:15 pm
Forum: C++ Development
Topic: Segfault in the destructor for wxListBox (Ubuntu & GTK+)
Replies: 6
Views: 929

Segfault in the destructor for wxListBox (Ubuntu & GTK+)

My program has its main dialog box, and the main dialog box displays a modeless child dialog box whose class is "Dialog_Detailed_MAC_Info". When I display the child dialog box and play around with it, everything works fine. However, when I close the child dialog box, my program immediately segfaults...
by Virchanza
Sat Jun 19, 2010 9:07 am
Forum: C++ Development
Topic: wxMSW : Event Handler is multi-threaded???
Replies: 12
Views: 1426

Using wxCriticalSection in this case totally puts you on the wrong track. Did you try it yet? What happens in this scenario: when button1 is pushed, if the handler for button1 contains a Yield call after it has entered the critical section, and in consequence the handler for button2 is executed and...
by Virchanza
Sat Jun 19, 2010 8:58 am
Forum: C++ Development
Topic: OK to use Delete and TestDestroy with a Joinable thread?
Replies: 7
Views: 1426

I too thought that you were supposed to use TestDestroy with Wait, but I've tried it out and it doesn't work. After I invoke the Wait method from within the Main Thread, the secondary thread's calls to TestDestroy still return false. Here's how my code works. Firstly, here's the code for the seconda...
by Virchanza
Thu Jun 17, 2010 9:56 am
Forum: C++ Development
Topic: OK to use Delete and TestDestroy with a Joinable thread?
Replies: 7
Views: 1426

Anyone? I see the following in the wxWidgets manual: wxThread::Delete wxThreadError Delete() Calling Delete gracefully terminates a detached thread, either when the thread calls TestDestroy or finished processing. (Note that while this could work on a joinable thread you simply should not call this ...
by Virchanza
Thu Jun 17, 2010 8:13 am
Forum: C++ Development
Topic: wxMSW : Event Handler is multi-threaded???
Replies: 12
Views: 1426

I solved me problem, my program works fine on wxMSW now.

I replaced:

Code: Select all

psniff->Wait();
with

Code: Select all

{
    wxWindowDisabler obj;
    psniff->Wait();
}
No need to write my own crazy locker class.
by Virchanza
Wed Jun 16, 2010 2:59 pm
Forum: C++ Development
Topic: wxMSW : Event Handler is multi-threaded???
Replies: 12
Views: 1426

About 15 minutes after I posted my last post, I realised I had entered the same Critical Section twice in the same thread. I would have had to do something like this instead: class Locker_Only_Enter_One_Routine { protected: static bool already_in_a_routine; bool is_this_locker_valid; public: Locker_...
by Virchanza
Wed Jun 16, 2010 1:47 pm
Forum: C++ Development
Topic: OK to use Delete and TestDestroy with a Joinable thread?
Replies: 7
Views: 1426

OK to use Delete and TestDestroy with a Joinable thread?

I know you can use the Delete method and the TestDestroy method with a Detached thread, but I want to ask if it's OK to used these methods on a Joinable thread? From my main thread, I want to use the Delete method to signal to the secondary thread that I want it to terminate. I will then use the Wai...
by Virchanza
Wed Jun 16, 2010 1:39 pm
Forum: C++ Development
Topic: wxMSW : Event Handler is multi-threaded???
Replies: 12
Views: 1426

OK I understand what you're saying about there being only one thread. The behaviour exhibited by the Event Handling System in wxMSW is very similar to interrupts on microcontrollers. With microcontrollers, when an interrupt is triggered, the currently executing function has all of its CPU registers ...
by Virchanza
Wed Jun 16, 2010 1:38 pm
Forum: C++ Development
Topic: wxMSW : Event Handler is multi-threaded???
Replies: 12
Views: 1426

OK I understand what you're saying about there being only one thread. The behaviour exhibited by the Event Handling System in wxMSW is very similar to interrupts on microcontrollers. With microcontrollers, when an interrupt is triggered, the currently executing function has all of its CPU registers ...
by Virchanza
Wed Jun 16, 2010 1:36 pm
Forum: C++ Development
Topic: wxMSW : Event Handler is multi-threaded???
Replies: 12
Views: 1426

OK I understand what you're saying about there being only one thread. The behaviour exhibited by the Event Handling System in wxMSW is very similar to interrupts on microcontrollers. With microcontrollers, when an interrupt is triggered, the currently executing function has all of its CPU registers ...