It is currently Wed Jul 24, 2019 10:45 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 142 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10  Next
Author Message
 Post subject: Re: PBMap - OSM, Here, Geoserver maps in a Canvas gadget
PostPosted: Mon Jun 11, 2018 4:04 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2005 2:46 pm
Posts: 1786
Location: Pas-de-Calais, France
Thank you for your code and your report, Michael. I'll try this evening.


Top
 Profile  
Reply with quote  
 Post subject: Re: PBMap - OSM, Here, Geoserver maps in a Canvas gadget
PostPosted: Mon Jun 11, 2018 10:15 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2005 2:46 pm
Posts: 1786
Location: Pas-de-Calais, France
Michael Vogel> I can't recreate the bug on x86 and x64. I've tried clicking several seconds on normal pbmap application and multiple maps, nothing. Could you give me more details, please ?


Top
 Profile  
Reply with quote  
 Post subject: Re: PBMap - OSM, Here, Geoserver maps in a Canvas gadget
PostPosted: Tue Jun 12, 2018 2:07 am 
Offline
Enthusiast
Enthusiast

Joined: Mon Jan 20, 2014 6:32 pm
Posts: 237
@djes: can you or actually I guess any one just test this?

Code:
Case #PB_EventType_RightClick
        Debug "Right click"
        Debug Pixel2Lat(CanvasMouseX)
        Debug Pixel2Lon(CanvasMouseY)


If I click center of the circle in the middle of the map the Lon I get back is the bottom of the canvas I think but its just not matching up with the center of the circle.

The Lat is fine.

Thanks

_________________
WARNING: I dont know what I am doing! I just put stuff here and there and sometimes like magic it works. So please improve on my code and post your changes so I can learn more. TIA


Top
 Profile  
Reply with quote  
 Post subject: Re: PBMap - OSM, Here, Geoserver maps in a Canvas gadget
PostPosted: Tue Jun 12, 2018 6:27 am 
Offline
Addict
Addict
User avatar

Joined: Thu Feb 09, 2006 11:27 pm
Posts: 2430
Hard to find a pattern when the program gets unstable, most often it happens when coordinates are entered manually (0/0 or 52/0) followed by a 'Enter' and then I do one (or some more) double click(s) to move the center point of the map. Another time the crash could be reproduced when entering a location name ("greenwich") instead of the lat/lon coordinates or to enter the location name directly after the coordinates have been entered.

Some other times I can do the same things with no single crash, maybe it depends on how long the cache tiles need to be loaded from the internet (maybe you can try to add a delay into these routines just for a test).

Sorry I can't give you more detailed information at the moment...

Code:
[09:46:27] [COMPILER] Line 354: File not found (C:\Users\Michael\AppData\Local\Temp\gettext.pbi).
:
[09:47:05] The Program execution has finished.
[09:47:11] Waiting for executable to start...
:
[09:47:13] The Program execution has finished.
[09:47:19] Waiting for executable to start...
[09:47:19] Executable type: Windows - x86  (32bit, Unicode, Thread)
[09:47:19] Executable started.
[09:48:33] [ERROR] Line: 1241
[09:48:33] [ERROR] Invalid memory access. (read error at address 4294967293)
[09:48:55] The debugged executable quit unexpectedly.
[09:48:58] Waiting for executable to start...
[09:48:57] Executable type: Windows - x86  (32bit, Unicode, Thread)
[09:48:58] Executable started.
[09:51:23] [ERROR] Line: 1241
[09:51:23] [ERROR] Invalid memory access. (read error at address 4294967293)
[09:53:48] The debugged executable quit unexpectedly.
[09:57:21] Waiting for executable to start...
[09:57:21] Executable type: Windows - x86  (32bit, Unicode, Thread)
[09:57:21] Executable started.
[09:58:19] [ERROR] Line: 1143
[09:58:19] [ERROR] Invalid memory access. (read error at address 4294967293)
[09:58:45] The debugged executable quit unexpectedly.
[07:08:59] Waiting for executable to start...
[07:08:59] Executable type: Windows - x86  (32bit, Unicode, Thread)
[07:08:59] Executable started.
[07:12:18] The Program execution has finished.
[07:12:23] Waiting for executable to start...
[07:12:23] Executable type: Windows - x86  (32bit, Unicode, Thread)
[07:12:23] Executable started.
[07:12:37] [ERROR] Line: 1143
[07:12:37] [ERROR] Invalid memory access. (read error at address 4294967293)
[07:12:57] The Program was killed.
[07:13:04] Waiting for executable to start...
[07:13:04] Executable type: Windows - x86  (32bit, Unicode, Thread)
[07:13:04] Executable started.
[07:13:51] The Program execution has finished.
[07:13:56] Waiting for executable to start...
[07:13:56] Executable type: Windows - x86  (32bit, Unicode, Thread)
[07:13:56] Executable started.
[07:14:22] The Program execution has finished.
[07:14:31] Waiting for executable to start...
[07:14:31] Executable type: Windows - x86  (32bit, Unicode, Thread)
[07:14:31] Executable started.
[07:14:54] [ERROR] Line: 1474
[07:14:54] [ERROR] Invalid memory access. (read error at address 4294967293)
[07:15:10] The debugged executable quit unexpectedly.
[07:17:20] Waiting for executable to start...
[07:17:19] Executable type: Windows - x86  (32bit, Unicode, Thread)
[07:17:20] Executable started.
[07:17:42] [ERROR] Line: 1347
[07:17:42] [ERROR] Invalid memory access. (read error at address 4294967293)
[07:17:50] The Program was killed.


Just a small point I would change for the edit gadgets - these three lines of code for selecting the whole text when getting the focus:
Code:
Case #StringLatitude, #StringLongitude
Select EventType()
Case #PB_EventType_Focus
   CompilerIf #PB_Compiler_OS=#PB_OS_Windows
      SendMessage_(GadgetID(Gadget),#EM_SETSEL,0,-1)
   CompilerEndIf
   AddKeyboardShortcut(#Window_0, #PB_Shortcut_Return, #MenuEventLonLatStringEnter)


Top
 Profile  
Reply with quote  
 Post subject: Re: PBMap - OSM, Here, Geoserver maps in a Canvas gadget
PostPosted: Tue Jun 12, 2018 7:38 am 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2005 2:46 pm
Posts: 1786
Location: Pas-de-Calais, France
Ok, thanx for the feedback, I'll test soon.
Don't forget that the project needs contributors, you're welcome ! :)


Top
 Profile  
Reply with quote  
 Post subject: Re: PBMap - OSM, Here, Geoserver maps in a Canvas gadget
PostPosted: Thu Aug 23, 2018 8:17 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2005 2:46 pm
Posts: 1786
Location: Pas-de-Calais, France
It seems that compiling with PB 5.62 leads to crash, when compiling with oldest 5.60 is OK. Anybody can confirm ?


Top
 Profile  
Reply with quote  
 Post subject: Re: PBMap - OSM, Here, Geoserver maps in a Canvas gadget
PostPosted: Thu Aug 23, 2018 11:05 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 6:14 pm
Posts: 1696
Location: Germany (Saxony, Deutscheinsiedel)
djes wrote:
It seems that compiling with PB 5.62 leads to crash, when compiling with oldest 5.60 is OK. Anybody can confirm ?

I use the PBMap include from March 2018 without problems, when compiling it as part of my GeoWorldEditor with PB5.62 :)

_________________
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)


Top
 Profile  
Reply with quote  
 Post subject: Re: PBMap - OSM, Here, Geoserver maps in a Canvas gadget
PostPosted: Fri Aug 24, 2018 9:10 am 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2005 2:46 pm
Posts: 1786
Location: Pas-de-Calais, France
Very strange. I have to investigate ! Maybe next week...


Top
 Profile  
Reply with quote  
 Post subject: Re: PBMap - OSM, Here, Geoserver maps in a Canvas gadget
PostPosted: Mon Sep 03, 2018 1:22 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2005 2:46 pm
Posts: 1786
Location: Pas-de-Calais, France
vwidmer wrote:
@djes: can you or actually I guess any one just test this?

Code:
Case #PB_EventType_RightClick
        Debug "Right click"
        Debug Pixel2Lat(CanvasMouseX)
        Debug Pixel2Lon(CanvasMouseY)


If I click center of the circle in the middle of the map the Lon I get back is the bottom of the canvas I think but its just not matching up with the center of the circle.

The Lat is fine.

Thanks

Sorry for the delay, I've missed your post. These functions are not to be used to convert a canvas position, but to convert an internal x, y representation in pixel to lon, lat. If you want the mouse position, just use the GetMouseLon() and GetMouseLat() functions:
Code:
      Case #PB_EventType_RightClick
        Debug "Right click"
        Debug GetMouseLongitude(MapGadget)
        Debug GetMouseLatitude(MapGadget)

All> I don't have any crash since my last windows update... Anyone suffering crashes ?

Last update here, as usual : https://github.com/djes/PBMap/tree/djes


Top
 Profile  
Reply with quote  
 Post subject: Re: PBMap - OSM, Here, Geoserver maps in a Canvas gadget
PostPosted: Thu Jul 11, 2019 5:30 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Fri Apr 25, 2003 4:34 pm
Posts: 895
Location: Canada
Is this still maintained at all?

It looks very interesting but it randomly crashes when zooming the map in or out.

_________________
Image Image


Top
 Profile  
Reply with quote  
 Post subject: Re: PBMap - OSM, Here, Geoserver maps in a Canvas gadget
PostPosted: Thu Jul 11, 2019 9:40 am 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2005 2:46 pm
Posts: 1786
Location: Pas-de-Calais, France
Hi, nice to see that someone is using it. In fact, there isn't much activity especially because of the lack of users... As pbmap relies on more pb functions, it's essential to know your platform, pb version and some details on the bug.


Top
 Profile  
Reply with quote  
 Post subject: Re: PBMap - OSM, Here, Geoserver maps in a Canvas gadget
PostPosted: Thu Jul 11, 2019 12:59 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon Jan 20, 2014 6:32 pm
Posts: 237
I am using PBMap everyday :) with very slight modifications... And couple other map sources.. Its very nice.. Thanks

_________________
WARNING: I dont know what I am doing! I just put stuff here and there and sometimes like magic it works. So please improve on my code and post your changes so I can learn more. TIA


Top
 Profile  
Reply with quote  
 Post subject: Re: PBMap - OSM, Here, Geoserver maps in a Canvas gadget
PostPosted: Thu Jul 11, 2019 5:41 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2005 2:46 pm
Posts: 1786
Location: Pas-de-Calais, France
vwidmer wrote:
I am using PBMap everyday :) with very slight modifications... And couple other map sources.. Its very nice.. Thanks

Good to know ! :)


Top
 Profile  
Reply with quote  
 Post subject: Re: PBMap - OSM, Here, Geoserver maps in a Canvas gadget
PostPosted: Fri Jul 12, 2019 3:21 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Fri Apr 25, 2003 4:34 pm
Posts: 895
Location: Canada
On Windows 8.1 x64 / PB 5.70 x86 when moving the map and zooming in/out quite a bit there are constant Invalid Memory Access errors in Procedure GetImageThread(*Tile.Tile)

Usually the compiler gives this line
*Tile\Download = ReceiveHTTPFile(*Tile\URL, *Tile\CacheFile, #PB_HTTP_Asynchronous, #USERAGENT)

or this one
*Tile\Size = FinishHTTP(*Tile\Download)

Tried it on Mac and it also crashes with Invalid Memory Access :(

_________________
Image Image


Top
 Profile  
Reply with quote  
 Post subject: Re: PBMap - OSM, Here, Geoserver maps in a Canvas gadget
PostPosted: Sat Jul 13, 2019 1:37 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2005 2:46 pm
Posts: 1786
Location: Pas-de-Calais, France
Thank you. Have you tried to clear the cache ? Sometimes a malformed/incomplete file can't be replaced on the disk and leads to a crash.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 142 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye