Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 14-05-2014, 05:33   #61
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: Sean's Optimum Branch Merge

Quote:
Originally Posted by nohal View Post
Are you sure you pulled the latest code? The change likely causing this on some linux versions is already reverted in the master.

Pavel
You are right again

Did a git pull earlier, now on 3.3.1713.

Very close to perfect, but now crashes in konni logbook if you select "add line" or have the timer insert a new line. Seems to be fine with no gps data coming in.
Will insert a new line with no gps, but if you turn on the gps and then back of again and try to add line it will crash with segmentation fault.


gps/ais attached via a ftdi chip usb/serial adaptor.

thnx
conachair is offline   Reply With Quote
Old 14-05-2014, 05:50   #62
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: Sean's Optimum Branch Merge

Quote:
Originally Posted by bdbcat View Post
Sean...

ChartSymbols::GetImage fails on the very first load of an image, with rasterSymbolsLoadedColorMapNumber == (-1), the default.

Actual fail is in LoadRasterFileForColorTable(rasterSymbolsLoadedCol orMapNumber, false, true);

I guess we need another step to get the proper very first symbol set loaded.

At this point, probably quicker for you to see the solution. I'll catch up soon.

Dave
I have a new commit now which I believe fixes the issue. I can see why it could maybe be a problem, but not exactly sure how to trigger it. If I could trigger it maybe I could come up with a better solution. For me I cannot get a value of -1 because the color scheme is always set before the routine gets called (which was what I had assumed)
seandepagnier is offline   Reply With Quote
Old 14-05-2014, 09:11   #63
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: Sean's Optimum Branch Merge

3.3.1713 Kubuntu 14.04 amd64.

Two minor things.
Zooming with the scroll wheel is now using way to big step. One noth on the wheel is equal to about 4 presses on the "+" key.

Sector lights. The black dashed lines close to the lights are doubled. If each sector is delimited with a dashed line, on both sides, it will lead to this problem.

Thomas
cagney is offline   Reply With Quote
Old 14-05-2014, 12:23   #64
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,150
Re: Sean's Optimum Branch Merge

3.3.1713 Crash report:
Win32 XP
cmake release build. crash on start up, see log file below.
VC++ debug:
Code:
First-chance exception at 0x00b220a7 (msvcr100d.dll) in opencpn.exe: 0xC0000005: Access violation reading location 0xcccccccc.
Unhandled exception at 0x00b220a7 (msvcr100d.dll) in opencpn.exe: 0xC0000005: Access violation reading location 0xcccccccc.

Debug break:


output.c  row 1642
                        text.sz = __nullstring;
                    p = text.sz;
->                    while (i-- && *p)    >>>> text.wz = 0xcccccccc <Bad Ptr>
From log file:
Code:
20:51:15: 2014-05-14
20:51:15:  ------- Starting OpenCPN -------
20:51:15: Version 3.3.1713 Build 2014-05-13
20:51:15: wxWidgets version: wxWidgets 2.8.12
20:51:15: MemoryStatus:  mem_total: 2047 mb,  mem_initial: 9 mb
20:51:15: SData_Locn is C:\Program\OpenCPN\
20:51:15: Using existing Config_File: C:\Documents and Settings\All Users\Application Data\opencpn\opencpn.ini
20:51:15: Styles loading from C:\Program\OpenCPN\uidata\styles.xml
20:51:15: No styles found at: C:\Documents and Settings\All Users\Application Data\opencpn\
20:51:15: No styles found at: C:\Documents and Settings\All Users\Application Data\opencpn\.opencpn\
20:51:15: Error: XPM: truncated image data at line 4!
20:51:15: Setting Viewpoint Lat/Lon 58.272, 11.4651
20:51:15: Setting Ownship Lat/Lon 58.0927, 11.731
20:51:15: System default Language:  sv_SE
20:51:15: Opencpn language set to:  sv_SE
20:51:18: ChartSymbols loaded from C:\Program\OpenCPN\s57data\chartsymbols.xml
20:51:19: Using s57data in C:\Program\OpenCPN\s57data
20:51:19: Setting Viewpoint Lat/Lon 58.272, 11.4651
20:51:19: Setting Ownship Lat/Lon 58.0927, 11.731
20:51:19: Opening NMEA Datastream UDP:192.168.x.x:10110
20:51:21: Opening NMEA Datastream TCP:ais1.shipraiser.net:6492
20:51:21: Creating glChartCanvas
20:51:21: PlugInManager searching for PlugIns in location C:\Program\OpenCPN\plugins
20:51:21: PlugInManager: Loading PlugIn: C:\Program\OpenCPN\plugins\dashboard_pi.dll
20:51:21:   C:\Program\OpenCPN\plugins\dashboard_pi.dll
              API Version detected: 106
              PlugIn Version detected: 311
20:51:21: PlugInManager: Loading PlugIn: C:\Program\OpenCPN\plugins\grib_pi.dll
20:51:21:   C:\Program\OpenCPN\plugins\grib_pi.dll
              API Version detected: 107
              PlugIn Version detected: 202
20:51:21: PlugInManager: Loading PlugIn: C:\Program\OpenCPN\plugins\vdr_win32_pi16_v03_pi.dll
20:51:21:   C:\Program\OpenCPN\plugins\vdr_win32_pi16_v03_pi.dll
              API Version detected: 106
              PlugIn Version detected: 3
20:51:22: OpenGL-> Renderer String: MOBILITY RADEON X600 x86/SSE2
20:51:22: OpenGL-> Texture rectangle format: 0
O crashes here
If you want a crash report please tell me. /Håkan
Hakan is offline   Reply With Quote
Old 14-05-2014, 12:53   #65
Registered User

Join Date: Apr 2009
Location: Marina Del Rey
Boat: Hylas 44
Posts: 387
Re: Sean's Optimum Branch Merge

Hakan

Here is a patch. The problem is that if the loop does not find an entry point then i=3. When the next entry point is checked, a bad index is used for the extensions array.

Code:
diff --git a/src/glChartCanvas.cpp b/src/glChartCanvas.cpp
index 8af566b..c9eee8d 100644
--- a/src/glChartCanvas.cpp
+++ b/src/glChartCanvas.cpp
@@ -361,7 +361,7 @@ static void GetglEntryPoints( void )
         if((s_glGenFramebuffers = (PFNGLGENFRAMEBUFFERSEXTPROC)
             ocpnGetProcAddress( "glGenFramebuffers", extensions[i])))
             break;
-
+    if(i<3){
     s_glGenRenderbuffers = (PFNGLGENRENDERBUFFERSEXTPROC)
         ocpnGetProcAddress( "glGenRenderbuffers", extensions[i]);
     s_glFramebufferTexture2D = (PFNGLFRAMEBUFFERTEXTURE2DEXTPROC)
@@ -382,13 +382,13 @@ static void GetglEntryPoints( void )
         ocpnGetProcAddress( "glDeleteRenderbuffers", extensions[i]);
     s_glGenerateMipmap = (PFNGLGENERATEMIPMAPEXTPROC)
         ocpnGetProcAddress( "glGenerateMipmap", extensions[i]);
-
+    }
 
     for(i=0; i<(sizeof extensions) / (sizeof *extensions); i++)
         if((s_glCompressedTexImage2D = (PFNGLCOMPRESSEDTEXIMAGE2DPROC)
             ocpnGetProcAddress( "glCompressedTexImage2D", extensions[i])))
             break;
-
+    if(i<3)
     s_glGetCompressedTexImage = (PFNGLGETCOMPRESSEDTEXIMAGEPROC)
         ocpnGetProcAddress( "glGetCompressedTexImage", extensions[i]);
 }
Chuck
ChuckSK is offline   Reply With Quote
Old 14-05-2014, 13:02   #66
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,150
Re: Sean's Optimum Branch Merge

Quote:
Originally Posted by ChuckSK View Post
Hakan

Here is a patch. The problem is that if the loop does not find an entry point then i=3. When the next entry point is checked, a bad index is use for the extensions array.

Chuck
Ok, thanks Chuck. I can very well change my code but it would also be pushed to master so everyone can get it right?
Håkan
Hakan is offline   Reply With Quote
Old 14-05-2014, 14:07   #67
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,150
Re: Sean's Optimum Branch Merge

Quote:
Originally Posted by Hakan View Post
Ok, thanks Chuck. I can very well change my code but it would also be pushed to master so everyone can get it right?
Håkan
By the way...
It didn't helped much.
Now I got a debug break in glCartCanvas.ccp row 481
Code:
 /* expand opengl widget to fill viewport */
    ViewPort &VP = cc1->GetVP(); >>>>>ViewPort = {clat=??? clon=??? view_scale_ppm=??? ...}
    if( GetSize().x != VP.pix_width || GetSize().y != VP.pix_height ) {
        SetSize( VP.pix_width, VP.pix_height );
        if( m_bsetup && !m_b_BuiltFBO ) {
            BuildFBO();
            ( s_glBindFramebuffer )( GL_FRAMEBUFFER_EXT, 0 );
        }
Håkan
Hakan is offline   Reply With Quote
Old 14-05-2014, 14:40   #68
Registered User

Join Date: Apr 2009
Location: Marina Del Rey
Boat: Hylas 44
Posts: 387
Re: Sean's Optimum Branch Merge

Hakan

Try this.

Code:
diff --git a/src/glChartCanvas.cpp b/src/glChartCanvas.cpp
index 8af566b..40dce6b 100644
--- a/src/glChartCanvas.cpp
+++ b/src/glChartCanvas.cpp

@@ -475,7 +475,7 @@ void glChartCanvas::OnSize( wxSizeEvent& event )
     ViewPort &VP = cc1->GetVP();
     if( GetSize().x != VP.pix_width || GetSize().y != VP.pix_height ) {
         SetSize( VP.pix_width, VP.pix_height );
-        if( m_bsetup && !m_b_BuiltFBO ) {
+        if( m_bsetup && !m_b_BuiltFBO && !m_b_DisableFBO ) {
             BuildFBO();
             ( s_glBindFramebuffer )( GL_FRAMEBUFFER_EXT, 0 );
         }
ChuckSK is offline   Reply With Quote
Old 14-05-2014, 17:53   #69
Registered User

Join Date: Jun 2011
Location: 27south
Boat: Easton 47
Posts: 65
Re: Sean's Optimum Branch Merge

ok, created an xcode project, and built it, ran the executable
pretty much the same result as cmake in the terminal, immediate crash.

Debugger backtrace was as follows -

(lldb) bt
* thread #1: tid = 0x2007, 0x00007fff8a79c4f0 libsystem_c.dylib`strlen + 16, stop reason = EXC_BAD_ACCESS (code=13, address=0x0)
frame #0: 0x00007fff8a79c4f0 libsystem_c.dylib`strlen + 16
frame #1: 0x00007fff8a73d8c3 libsystem_c.dylib`__vfprintf + 4704
frame #2: 0x00007fff8a73bedb libsystem_c.dylib`vsnprintf_l + 396
frame #3: 0x00007fff8a744f22 libsystem_c.dylib`snprintf + 169
frame #4: 0x000000010035eebc OpenCPN`ocpnGetProcAddress(char const*, char const*) + 92 at glChartCanvas.cpp:348
frame #5: 0x000000010036158d OpenCPN`GetglEntryPoints + 157 at glChartCanvas.cpp:366
frame #6: 0x0000000100360a97 OpenCPN`glChartCanvas::SetupOpenGL() + 2935 at glChartCanvas.cpp:621
frame #7: 0x000000010035f005 OpenCPN`glChartCanvas::OnPaint(wxPaintEvent&) + 197 at glChartCanvas.cpp:696
frame #8: 0x0000000100afc3d8 libwx_baseu-2.9.4.0.0.dylib`wxEvtHandler::ProcessEventIfMatche sId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) + 88
frame #9: 0x0000000100afc2c9 libwx_baseu-2.9.4.0.0.dylib`wxEventHashTable::HandleEvent(wxEv ent&, wxEvtHandler*) + 313
frame #10: 0x0000000100afd67c libwx_baseu-2.9.4.0.0.dylib`wxEvtHandler::ProcessEventLocally( wxEvent&) + 92
frame #11: 0x0000000100afd5f6 libwx_baseu-2.9.4.0.0.dylib`wxEvtHandler::ProcessEvent(wxEvent &) + 246
frame #12: 0x0000000100afd87f libwx_baseu-2.9.4.0.0.dylib`wxEvtHandler::SafelyProcessEvent(w xEvent&) + 15
frame #13: 0x0000000100e4afc0 libwx_osx_cocoau_core-2.9.4.0.0.dylib`wxWindowBase::HandleWindowEvent(wx Event&) const + 16
frame #14: 0x0000000100c5c197 libwx_osx_cocoau_core-2.9.4.0.0.dylib`wxWindow::MacDoRedraw(long) + 999
frame #15: 0x0000000100d39e2d libwx_osx_cocoau_core-2.9.4.0.0.dylib`wxWidgetCocoaImpl::drawRect(void*, NSView*, void*) + 1437
frame #16: 0x0000000100d383ae libwx_osx_cocoau_core-2.9.4.0.0.dylib`wxOSX_drawRect(NSView*, objc_selector*, CGRect) + 750
frame #17: 0x00007fff91d112ce AppKit`-[NSView _drawRect:clip:] + 3758
frame #18: 0x00007fff91d3e49b AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 1583
frame #19: 0x00007fff91d3e8c7 AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2651
frame #20: 0x00007fff91d3e8c7 AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2651
frame #21: 0x00007fff91d3e8c7 AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2651
frame #22: 0x00007fff91d0e8a9 AppKit`-[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVis ibleRect:rectIsVisibleRectForView:topView:] + 1032
frame #23: 0x00007fff91d0dda3 AppKit`-[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVis ibleRect:rectIsVisibleRectForView:topView:] + 270
frame #24: 0x00007fff91d091bb AppKit`-[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVi sibleRectForView:] + 4755
frame #25: 0x00007fff91d01c35 AppKit`-[NSView displayIfNeeded] + 1676
frame #26: 0x00007fff91dbf2fb AppKit`-[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter :force:isModal:] + 1306
frame #27: 0x00007fff91dbecf8 AppKit`-[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force :isModal:] + 807
frame #28: 0x00007fff91dbe97c AppKit`-[NSWindow orderWindow:relativeTo:] + 154
frame #29: 0x00007fff91dbe21d AppKit`-[NSWindow makeKeyAndOrderFront:] + 49
frame #30: 0x0000000100d206bd libwx_osx_cocoau_core-2.9.4.0.0.dylib`wxNonOwnedWindowCocoaImpl::Show(bo ol) + 301
frame #31: 0x0000000100c52363 libwx_osx_cocoau_core-2.9.4.0.0.dylib`wxNonOwnedWindow::Show(bool) + 67
frame #32: 0x000000010000e79f OpenCPN`MyApp::OnInit() + 23775 at chart1.cpp:1916
frame #33: 0x0000000100c9ea61 libwx_osx_cocoau_core-2.9.4.0.0.dylib`wxApp::CallOnInit() + 33
frame #34: 0x0000000100a4cef8 libwx_baseu-2.9.4.0.0.dylib`wxEntry(int&, wchar_t**) + 88
frame #35: 0x0000000100007ef6 OpenCPN`main + 38 at chart1.cpp:774
frame #36: 0x0000000100006394 OpenCPN`start + 52
(lldb) print (int) printf("%s", cObject->toString())
error: use of undeclared identifier 'cObject'
error: 1 errors parsing expression
(lldb)

hope thats of more use

Mo
Icnoships is offline   Reply With Quote
Old 14-05-2014, 18:04   #70
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,402
Re: Sean's Optimum Branch Merge

Sean...

Fault on ChartSymbols::GetImage() induced by having S63_pi chart as first and only chart loaded. Root cause is that S52PLIB does not fully set up the default color scheme, and expects the first chart loaded to call SetPLIBColorScheme() before accessing any symbol tables. Unfortunately, S63_pi forgets to do that, while all other chart types do the right thing.

Solution is to just fully establish the default colour table contents in the S52PLIB ctor. Commit in current github master does this now, and all is well.

Dave
bdbcat is online now   Reply With Quote
Old 14-05-2014, 18:32   #71
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: Sean's Optimum Branch Merge

Quote:
Originally Posted by ChuckSK View Post
Hakan

Here is a patch. The problem is that if the loop does not find an entry point then i=3. When the next entry point is checked, a bad index is used for the extensions array.


[/CODE]

Chuck
Thank you.. I was trying to avoid a very confusing situation where mixing extensions can do undefined things but missed the more likely case (that the extension doesn't exist) This should fix all the crashes on startup.

Quote:
Originally Posted by bdbcat View Post
Sean...

Fault on ChartSymbols::GetImage() induced by having S63_pi chart as first and only chart loaded. Root cause is that S52PLIB does not fully set up the default color scheme, and expects the first chart loaded to call SetPLIBColorScheme() before accessing any symbol tables. Unfortunately, S63_pi forgets to do that, while all other chart types do the right thing.

Solution is to just fully establish the default colour table contents in the S52PLIB ctor. Commit in current github master does this now, and all is well.

Dave
I like this solution better I will revert the one I made.


I'm getting very close, but I think the last commits may be rather large.
seandepagnier is offline   Reply With Quote
Old 14-05-2014, 18:44   #72
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,402
Re: Sean's Optimum Branch Merge

Hakan/ChuckSK...

Chuck's patches committed to github master. 3.3.1713 on XP with standard OpenGL now loads and runs.

Thanks, Chuck

Sean, sorry if we collided here. Typing at the same time....

Dave
bdbcat is online now   Reply With Quote
Old 14-05-2014, 19:48   #73
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: Sean's Optimum Branch Merge

Quote:
Originally Posted by bdbcat View Post
Hakan/ChuckSK...

Chuck's patches committed to github master. 3.3.1713 on XP with standard OpenGL now loads and runs.

Thanks, Chuck

Sean, sorry if we collided here. Typing at the same time....

Dave
Yes.. I have a more elegant solution. In any case.. sorry for the trouble. I'm using this opportunity to try to improve things but often I overlook the obvious.
seandepagnier is offline   Reply With Quote
Old 14-05-2014, 20:05   #74
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,402
Re: Sean's Optimum Branch Merge

Sean/Mo...

I implemented the systemGetProcAddress(ADDR) function for OSX. Committed to github now. Mac 10.7.5 builds and runs in OpenGL mode.

fyi, here is what my Mac Mini can do:

From the log

Code:
22:57:28 EDT: OpenGL-> Renderer String: Intel GMA 950 OpenGL Engine
22:57:28 EDT: OpenGL-> Detected Intel renderer, disabling stencil buffer
22:57:28 EDT: OpenGL-> Detected Intel renderer, disabling FBO
22:57:28 EDT: OpenGL-> Texture rectangle format: de1
22:57:28 EDT: OpenGL-> Framebuffer Objects unavailable
22:57:28 EDT: OpenGL-> Using Depth buffer clipping
Good Luck
Dave
bdbcat is online now   Reply With Quote
Old 14-05-2014, 20:53   #75
Registered User

Join Date: Jun 2011
Location: 27south
Boat: Easton 47
Posts: 65
Re: Sean's Optimum Branch Merge

Dave/Sean many thanks for the effort..
just pulled and compiled that in Xcode
we leapt the first hurdle and O started OK
but fell at the second
As soon as i attempt to Zoom ...WX assert..
dismissing it slow O to a halt.

System log output -

../src/osx/carbon/dcclient.cpp(184): assert "window->MacGetCGContextRef() != NULL" failed in wxPaintDCImpl(): using wxPaintDC without being in a native paint event
Collecting stack trace information, please wait...

O's log has the following -

13:40:31 EST: ChartSymbols loaded from /Users/mo/OpenCPN/build/Debug/OpenCPN.app/Contents/SharedSupport/s57data/chartsymbols.xml
13:40:32 EST: Warning: unable to use texture for chart symbols
13:40:32 EST: Using s57data in /Users/mo/OpenCPN/build/Debug/OpenCPN.app/Contents/SharedSupport/s57data
1

Mo
Attached Thumbnails
Click image for larger version

Name:	Screen Shot 2014-05-15 at 1.52.33 PM.png
Views:	171
Size:	128.2 KB
ID:	81306  
Icnoships is offline   Reply With Quote
Reply


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
Two-pole branch protection witzgall Electrical: Batteries, Generators & Solar 12 19-11-2013 08:53
Optimum Dagger Board Use solarbri Multihull Sailboats 15 03-03-2013 13:56
Linux link error on master branch teotwawki OpenCPN 4 19-10-2012 06:13
VHF antenna optimum height bobalpep Marine Electronics 13 04-03-2009 09:38
Marine Accident Investigation Branch (UK Govt) David_Old_Jersey Health, Safety & Related Gear 3 05-02-2007 15:30

Advertise Here


All times are GMT -7. The time now is 11:04.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.