Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 22-10-2010, 04:51   #31
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 3,967
Gunther,
not worth posting a patch - just change
Code:
SET(wxWidgets_USE_LIBS base core net xml html adv)
to
Code:
SET(wxWidgets_USE_LIBS base core net xml html adv aui)
in plugins\dashboard_pi\src\CMakeLists.txt - line 61

I get some hangs and crashes - will report on them later today.

Pavel
__________________

__________________
nohal is online now   Reply With Quote
Old 22-10-2010, 05:09   #32
Registered User
 
Netsurfer's Avatar

Join Date: Jan 2010
Location: Cologne, Germany
Boat: Beneteau Oceanis 331
Posts: 557
Hi Pavel,

thanks for the help - worked!

@Jean-Eudes
For me OCPN also crashes as soon as I try to change/ add instruments. And none of the three deafult one's is visible.

Undocking and docking the dashboard to the left or right works!
I can't tell you how happy I am with this solution!!!
Really great - incredible!!!

And also the config tab looks pretty well (though changing anything else than the width currently causes OCPN to crash).

The toolbar button is awesome ...
Just a remark: IMHO the button should show its state (like the 'A+' text button) as it is like a on/off switch.

Congratulations - fantastic job!
And for me already close to perfect by now.

Thanks,
Gunther

PS: I am sure there are lots of users out there who will be very satisfied, too.
__________________

__________________
Deutschsprachige Community- und Support-Website unter OpenCPN.de
Netsurfer is offline   Reply With Quote
Old 22-10-2010, 06:01   #33
Registered User

Join Date: Mar 2010
Location: Normandy, France
Boat: Flush Poker, 8.25m (Point Barre)
Posts: 334
Re: testing

Even easier to test: here are 2 files, .deb for debian/ubuntu and .rpm for fedora/centos built on each platform respectively. These files are for testing and will be removed as soon as next beta comes out.

http://opencpn.org/sites/default/fil...018-1_i386.deb

http://opencpn.org/sites/default/fil...018-1_i386.rpm

PS: I noticed the report about failing to build on windows. Thanks for the patch. Strangely it did not occured on Linux.

Thanks
__________________
SethDart is offline   Reply With Quote
Old 22-10-2010, 07:15   #34
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 3,967
Add instrument or select instrument Access Violation on Windows

Jean-Eudes,
attached is a trace of a crash in the Dashboard config on Windows on either selection from the list of instruments or after adding a new instrument.
If you need any more info, let me know.

Pavel
Attached Thumbnails
Click image for larger version

Name:	add_instr_access_violation.jpg
Views:	164
Size:	412.6 KB
ID:	20415  
__________________
nohal is online now   Reply With Quote
Old 23-10-2010, 02:30   #35
Registered User

Join Date: Mar 2010
Location: Normandy, France
Boat: Flush Poker, 8.25m (Point Barre)
Posts: 334
Quote:
Originally Posted by nohal View Post
Jean-Eudes,
attached is a trace of a crash in the Dashboard config on Windows on either selection from the list of instruments or after adding a new instrument.
If you need any more info, let me know.

Pavel
I can't see what's wrong there... Can you try to add parenthesis?

Code:
diff --git a/plugins/dashboard_pi/src/dashboard_pi.cpp b/plugins/dashboard_pi/src/dashboard_pi.cpp
index c46aeba..b85ce6a 100644
--- a/plugins/dashboard_pi/src/dashboard_pi.cpp
+++ b/plugins/dashboard_pi/src/dashboard_pi.cpp
@@ -828,7 +828,7 @@ void dashboard_pi::UpdateButtonsState()
       m_pButtonDelete->Enable(enable);
       m_pButtonEdit->Enable(false); // TODO: Properties
       m_pButtonUp->Enable(item > 0);
-      m_pButtonDown->Enable(item != -1 && item < m_pListCtrlInstruments->GetItemCount()-1);
+      m_pButtonDown->Enable((item != -1) && (item < m_pListCtrlInstruments->GetItemCount()-1));
 }
 
 void dashboard_pi::OnInstrumentAdd(wxCommandEvent& event)
And this eventually, to see if it's the GetItemCount that fail?
Code:
diff --git a/plugins/dashboard_pi/src/dashboard_pi.cpp b/plugins/dashboard_pi/src/dashboard_pi.cpp
index c46aeba..7c537b7 100644
--- a/plugins/dashboard_pi/src/dashboard_pi.cpp
+++ b/plugins/dashboard_pi/src/dashboard_pi.cpp
@@ -828,7 +828,8 @@ void dashboard_pi::UpdateButtonsState()
       m_pButtonDelete->Enable(enable);
       m_pButtonEdit->Enable(false); // TODO: Properties
       m_pButtonUp->Enable(item > 0);
-      m_pButtonDown->Enable(item != -1 && item < m_pListCtrlInstruments->GetItemCount()-1);
+      long cnt = m_pListCtrlInstruments->GetItemCount();
+      m_pButtonDown->Enable((item != -1) && (item < cnt-1));
 }
 
 void dashboard_pi::OnInstrumentAdd(wxCommandEvent& event)
Can you also track variables to see if m_pButtonDown and m_pListCtrlInstruments are correctly defined. I don't have build system on Windows OS but will try to test.
__________________
SethDart is offline   Reply With Quote
Old 23-10-2010, 02:44   #36
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 3,967
Looks like the problem is m_pListCtrlInstruments as m_pListCtrlInstruments->GetItemCount(); returns bogus (-842150656 in the test run)
Perhaps related to no instruments being shown as Gunther reported earlier?
I will try to trace it a bit more later, now I have to catch the train...

Pavel
__________________
nohal is online now   Reply With Quote
Old 23-10-2010, 08:58   #37
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 3,967
Quote:
Originally Posted by nohal View Post
I will try to trace it a bit more later
Memory corruption?
Have a look at the two screenshots: 1st one is at the end of SetupToolboxPanel() while Toolbox is open, the 2nd when OnInstrumentSelected() is caled two clicks later...
Tracing where the corruption actually happened is still a bit out of my reach

Pavel
Attached Thumbnails
Click image for larger version

Name:	setup.jpg
Views:	150
Size:	405.9 KB
ID:	20442   Click image for larger version

Name:	mem_corrupted.jpg
Views:	143
Size:	394.8 KB
ID:	20443  

__________________
nohal is online now   Reply With Quote
Old 23-10-2010, 12:50   #38
Registered User

Join Date: Mar 2010
Location: Normandy, France
Boat: Flush Poker, 8.25m (Point Barre)
Posts: 334
can you try this patch?

Code:
diff --git a/plugins/dashboard_pi/src/dashboard_pi.cpp b/plugins/dashboard_pi/src/dashboard_pi.cpp
index c46aeba..57e2691 100644
--- a/plugins/dashboard_pi/src/dashboard_pi.cpp
+++ b/plugins/dashboard_pi/src/dashboard_pi.cpp
@@ -142,9 +142,8 @@ wxString getInstrumentCaption(unsigned int id)
       return _T("");
 }
 
-wxListItem getListItemForInstrument(unsigned int id)
+void getListItemForInstrument(wxListItem &item, unsigned int id)
 {
-      wxListItem item;
       item.SetData(id);
       item.SetText(getInstrumentCaption(id));
       switch (id)
@@ -175,7 +174,6 @@ wxListItem getListItemForInstrument(unsigned int id)
             item.SetImage(1);
             break;
       }
-      return item;
 }
 
 //---------------------------------------------------------------------------------------------------------
@@ -778,7 +776,8 @@ void dashboard_pi::SetupToolboxPanel(int page_sel, wxNotebook* pnotebook)
 
       for (size_t i = 0; i < m_aInstrumentList.GetCount(); i++)
       {
-            wxListItem item = getListItemForInstrument(m_aInstrumentList.Item(i));
+            wxListItem item;
+            getListItemForInstrument(item, m_aInstrumentList.Item(i));
             item.SetId(m_pListCtrlInstruments->GetItemCount());
             m_pListCtrlInstruments->InsertItem(item);
       }
@@ -837,7 +836,8 @@ void dashboard_pi::OnInstrumentAdd(wxCommandEvent& event)
 
       if (pdlg.ShowModal() == wxID_OK)
       {
-            wxListItem item = getListItemForInstrument(pdlg.GetInstrumentAdded());
+            wxListItem item;
+            getListItemForInstrument(item, pdlg.GetInstrumentAdded());
             item.SetId(m_pListCtrlInstruments->GetItemCount());
             m_pListCtrlInstruments->InsertItem(item);
             m_pListCtrlInstruments->SetColumnWidth(0, wxLIST_AUTOSIZE);
@@ -1020,7 +1020,8 @@ AddInstrumentDlg::AddInstrumentDlg(wxWindow *pparent, wxWindowID id)
 
       for (unsigned int i = ID_DBP_I_POS; i <= ID_DBP_D_GPS; i++)
       {
-            wxListItem item = getListItemForInstrument(i);
+            wxListItem item;
+            getListItemForInstrument(item, i);
             item.SetId(i);
             m_pListCtrlInstruments->InsertItem(item);
       }
I'll try to debug this in a few hours once I've a Windows build system ready.

Thanks
__________________
SethDart is offline   Reply With Quote
Old 23-10-2010, 15:42   #39
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 3,967
Same result
It looks to me like the problem actually isn't in the plug-in itself as it does nothing between the instantiation of the config page and handling the button click event when the crash happens.

Pavel
__________________
nohal is online now   Reply With Quote
Old 24-10-2010, 00:45   #40
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 3,967
git 1024 works

The problem is fixed in git 2.2.1024
There is just a small issue left - the instrument you move up or down in the toolbox looses it's icon and caption.

Pavel
Attached Thumbnails
Click image for larger version

Name:	config_1024.png
Views:	139
Size:	5.3 KB
ID:	20450  
__________________
nohal is online now   Reply With Quote
Old 24-10-2010, 01:31   #41
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,230
Quote:
Originally Posted by nohal View Post
The problem is fixed in git 2.2.1024
There is just a small issue left - the instrument you move up or down in the toolbox looses it's icon and caption.

Pavel
Very nice. Good job SethDart!

I'm just compiling 1024. On my 64 bit ubuntu 10.4, the issue nohal mention above with the toolbox, is a non issue. In other words it works!
1024 will soon be available for download at opencpn.org.
Thomas
__________________
cagney is offline   Reply With Quote
Old 24-10-2010, 04:03   #42
Registered User
 
Netsurfer's Avatar

Join Date: Jan 2010
Location: Cologne, Germany
Boat: Beneteau Oceanis 331
Posts: 557
Pavel,
Quote:
Originally Posted by nohal View Post
The problem is fixed in git 2.2.1024
There is just a small issue left - the instrument you move up or down in the toolbox looses it's icon and caption.
cannot confirm.

v1024 causes a lot of trouble for me. Cannot even activate the GRIB and Dashboard plugin, as OCPN crashes immediately when I click on OK. Celst is the only one which can be enabled but crashes also when trying to display.

BTW: Do I have to update to wxWidgets 2.9.1 or may I still use 2.8.11?

Gunther
__________________
Deutschsprachige Community- und Support-Website unter OpenCPN.de
Netsurfer is offline   Reply With Quote
Old 24-10-2010, 04:19   #43
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,230
Netsurfer

Quote:
BTW: Do I have to update to wxWidgets 2.9.1 or may I still use 2.8.11?
Stay with the 2.8.x version. OpenCPN assumes this. Apparently it is a major undertaking to port OpenCPN to the 2.9.x or later, that is coming up in the future...

Thomas
__________________
cagney is offline   Reply With Quote
Old 24-10-2010, 04:20   #44
Registered User
 
Netsurfer's Avatar

Join Date: Jan 2010
Location: Cologne, Germany
Boat: Beneteau Oceanis 331
Posts: 557
Quote:
Originally Posted by cagney View Post
Stay with the 2.8.x version.
OK, thanks Thomas.

Gunther
__________________
Deutschsprachige Community- und Support-Website unter OpenCPN.de
Netsurfer is offline   Reply With Quote
Old 24-10-2010, 05:39   #45
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,230
Further testing reveals a problem with 1024.

When coming back to OpenCPN after while, having used other applications in between, the screen is all grayed out an OpenCPN is hung. See the backtrace.

Thomas
Attached Thumbnails
Click image for larger version

Name:	backtrace.png
Views:	136
Size:	25.7 KB
ID:	20455  
__________________

__________________
cagney is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenCPN PlugIn Development bdbcat OpenCPN 78 29-07-2017 02:15


Our Communities

Our communities encompass many different hobbies and interests, but each one is built on friendly, intelligent membership.

» More about our Communities

Automotive Communities

Our Automotive communities encompass many different makes and models. From U.S. domestics to European Saloons.

» More about our Automotive Communities

Marine Communities

Our Marine websites focus on Cruising and Sailing Vessels, including forums and the largest cruising Wiki project on the web today.

» More about our Marine Communities


Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 07:51.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.