MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




MapPoint Gets closed on its own

This is a discussion on MapPoint Gets closed on its own within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi, I am using MapPoint application object. When I try to use the application object with single its working fine. ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-06-2005
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
MapPoint Gets closed on its own

Hi,

I am using MapPoint application object.

When I try to use the application object with single its working fine.

When I try to use the same with multiple users, it doesn't work proper.

Actually it invokes 2 mappoint.exe on the system, but after sometime, mappoint.exe gets closed on it own.

I am not able to understand what could be the reason.

I am not sure, if MapPoint has got any timeout.

Any info / pointer regarding this would be much appreciated.

Thanks,
Vijay
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 01-06-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,055
Hi,

Quote:
When I try to use the same with multiple users, it doesn't work proper.
Can you please tell me what exacly does not work ?

Quote:
Actually it invokes 2 mappoint.exe on the system, but after sometime, mappoint.exe gets closed on it own
I just started several programs of me using mappoint. they all start an instance of mappoint in background. Nothing get closed. Can you please describe exacly the problem or did I istundersteasd ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 01-06-2005
Junior Member
White Belt
 
Join Date: Nov 2004
Posts: 6
Send a message via MSN to gvkreddy Send a message via Yahoo to gvkreddy
Hi Wilfried ,

Thanks for the reply.

I am using MapPoint.Application to load MapPoint file programmatically. After loading am searching for some addresses given to me. Based on matched addresses am generating a report.

I am able to search for nearly 400 addresses in a loop...

When I use the same application with a single user it works fine. It takes nearly 1:30 secs to generate the report in csv format.

But when I try to use the same with more than one user it works fine for 400 addresses search and generating the report.

When I increase the number of addresses more than 400, then MapPoint does not seems to be working.

For some time I can see the MapPoint instances in the memory, but after some time those instances will not be there.

I am not able to understand why is this happening.

Is there any MapPoint timeout??

Please do let me know how to solve this issue.

Thanks
Vijay
__________________
Thanks & Regards,
Vijay
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 01-07-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,055
Hi,

Thanks, now I understeand

Looks a strange problem. A workaround could be to spit your addresses into chuncks of 200..400 and operate the chuncks sequential.

Maybe Mappoint has a problem because the calling application is not responding ? You can simple try this out by calling the message pump in your loop.

Be aware that if you call windows message pump your code can get re-entered and you have to do it different in final release. Bur for test it is quick tested if that whas the proble.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 01-07-2005
Junior Member
White Belt
 
Join Date: Nov 2004
Posts: 6
Send a message via MSN to gvkreddy Send a message via Yahoo to gvkreddy
Thanks for the information,

I would like to tell you one more thing on this. The application is developed as web application.

Does using MapPoint ActiveX control in web applications cause any problems?
__________________
Thanks & Regards,
Vijay
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 01-07-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,055
Hi,

Quote:
Does using MapPoint ActiveX control in web applications cause any problems
I'm not sure, but I dont think that can give any problems.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 01-07-2005
Junior Member
White Belt
 
Join Date: Nov 2004
Posts: 6
Send a message via MSN to gvkreddy Send a message via Yahoo to gvkreddy
Code:
Maybe Mappoint has a problem because the calling application is not responding ? You can simple try this out by calling the message pump in your loop.
Is there any timeout for MapPoint?

Am not too sure how to use the same in "message pump in your loop."

By the way I would like to inform one morething i.e. I am using System.Runtime.InteropServices.Marshal.ReleaseComO bject to release the objects, Does this cause any problems??

Thanks,
Vijay
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8 (permalink)  
Old 01-07-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,055
Hi,

Quote:
Is there any timeout for MapPoint?
There is some 10 second timeout wich can cause the 'server busy' problem that some people have, but you talk about 1 minute and 30 seconds, so it should be something else

Quote:
Am not too sure how to use the same in "message pump in your loop."
In .NET you enter the message pump by calling:
Code:
Application.DoEvents();
Quote:
System.Runtime.InteropServices.Marshal.ReleaseComO bject to release the objects, Does this cause any problems??
I dont think so but I never used this.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9 (permalink)  
Old 01-07-2005
Junior Member
White Belt
 
Join Date: Nov 2004
Posts: 6
Send a message via MSN to gvkreddy Send a message via Yahoo to gvkreddy
Thank you very much.

Before deciding on the message pump I would like to share the code what I had used in my application.

I would request you to evaluate the same.


Code:
private int GetCounsellorCount(string street, string city, string state, string zip, string country, double radius)
        {
            // Find the Address Results into oResults Object 
		
			if(street.Length >=1)
			{
				if(street.Substring(0,1)=="#")
					street=street.Replace("#","No "); 
			}

	        oResults=oMap.FindAddressResults(street,city,"" ,state, zip, country);
				
            int counselCount=0;
            
            if(oResults.ResultsQuality.ToString() == "geoFirstResultGood")
            {
                    {
						 
                        // Get the location object from Results
                        IEnumerator item = oResults.GetEnumerator();
                        while(item.MoveNext())
                        {
                            MapPoint.Location loc = (MapPoint.Location)item.Current ;
                            
                            if(loc != null)
                            {
                                try
                                {
                                    // Find the Pushpin with in the specified radius
                                    oRs=oDss.QueryCircle(loc, radius);
                                    if(oRs!=null)
                                    {
                                        oRs.MoveFirst();
                                        while(!oRs.EOF )
                                        {
                                            oPin=oRs.Pushpin;
                                            if(oPin !=null)
                                                counselCount=counselCount+1;
                                            oRs.MoveNext(); 
                                        }
                                    }
                                }
                                catch (Exception exe)
                                {
                                    // Log Error
                                }
                            }
                            break;
                       }
                }
            }
            else
                counselCount=-1;

            return counselCount;
        }
The above is the function to which I make a call for every address that I would search
__________________
Thanks & Regards,
Vijay
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10 (permalink)  
Old 01-07-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,055
Hi,

I think code is ok. If I find some sparetime this eve I will eventually try it out. However I'm not sure what to assign to oDss ?

I also think you should replace this:

Code:
//MapPoint.Location loc = (MapPoint.Location)item.Current
MapPoint.Location loc = item.Current as MapPoint.Location
if item.Current is _not_ a Location object then loc will be defenitively null which is (I think) not the case with the typecast and maybe can give unhandled exception then. However I dont think this has anything to do with the problem you see.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Determine if Map has been closed BirdIslander MapPoint 2006/2009 Discussion 1 12-07-2005 01:33 PM
Determine if a polyline is closed? Anonymous MapPoint 2006/2009 Discussion 4 03-29-2005 11:37 AM
If I draw a closed shape around some pushpins, and.... Anonymous MapPoint 2006/2009 Discussion 1 03-09-2002 10:48 PM
Export to Excel works from 'closed shapes'. Is i.... Anonymous MapPoint 2006/2009 Discussion 1 03-04-2002 09:54 AM


All times are GMT -5. The time now is 11:47 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map

Jersey Flights
Holiday Hypermarket should be your first choice for cheap flights. Book flights to exotic destinations or even just to Jersey.

Greece Weather
Check out Greece Weather - Travel Counsellors details information on Greece including, weather, flights and accommodation.

Cuba Holiday
A Cuba Holiday has so much to offer with numerous different cultures affecting the sights, sounds and tastes. Visit this fascinating country with dealchecker.co.uk.

Bahamas Holidays
Bahamas Holidays offer pure blue skies, soft white beaches and the holiday of a lifetime. Visit us for a great deal to the Bahamas.

Tunisia
Tunisia enjoys excellent weather, golden beaches and a beautiful blue sea. Moving away from the beach you will find a country that has a rich and varied past. Discover the secrets of history yourself by exploring all the ruins.

All inclusive holiday
Travel.co.uk is a travel comparison service which makes it easy to search and find your all inclusive holiday.

Holidays in Cyprus
Visit the tombs of the island kings! Visit On The Beach for information on holidays in Cyprus.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51