MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Error "overflow execution stack" while readinq a

This is a discussion on Error "overflow execution stack" while readinq a within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi, I am using a MapPoint 2004 Activex. Is there a limit in the number of records in the object ...


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

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-17-2005
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Error "overflow execution stack" while readinq a

Hi,

I am using a MapPoint 2004 Activex.

Is there a limit in the number of records in the object RecordSet?

I have an error while reading a RecordSet.

Code:
MyRecordSet.MoveFirst
Do while MyRecord.EOF = False

     ' Message(MyRecord.PushPin.Name 

    MyRecord.MoveNext
LOOP
When I read about 2000 records I have an overflow execution stack error in my application. ( I have about 8000 Pushpins in my map )

Thanks for your help

Mohamed
from CasaBlanca
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 02-17-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,105
Hi,

I dont know if there is a limit, but if you have 8000 pushpins on the map then reading 2000 of them cannot be a problem.

But I see something in your code:
Code:
Message(MyRecord.PushPin.Nam
Does this means you display a messagebox or another form from within the loop ? If this is the case then that could be the reason of a stack overflow, because executing a modal form will enter the message pump and your procedure could be reentered !

Another reason could be that there is something recursered. Eg you call a method whitch fires an event witch calls a method again etc and at some point fires the same event or calls one of the same methods. This way you can flow the stack also easy over.

Do you have the stack overflow also if you just loop in the recordset without doeing anything els e?
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 02-17-2005
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
overflow stack in reading Recordset

Hi Wilfried,

Thanks a lot for your answer. Very funny your Jokes in Mestdagh.biz !


Do you have the stack overflow also if you just loop in the recordset without doeing anything els e? [/quote]

I still have the overflow stack when I just loop, but It stops at the records
# 4000.

But, anyway I have to do something with the records names, for instance to put them in a list!!

I don't understand!

Something works: I loop 5 times after deleting the pushpins I've seen in
a previous loop.


Thanks again for your answer.

Mohamed
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 02-17-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,105
Hi Mohamed,

I just tryed out following code, which does create 8000 pushpins and loop trough the dataset without any error:

Code:
            int n = 0;
            Location Loc = MP.ActiveMap.GetLocation(50, 4, 1);
            while (n < 8000) {
                MP.ActiveMap.AddPushpin(Loc, n.ToString());
                n++;
            }
            n = 0;
            object o = "My Pushpins";
            MapPoint.DataSet ds = MP.ActiveMap.DataSets.get_Item(ref o);
            Recordset rs = ds.QueryAllRecords();
            rs.MoveFirst();
            while (!rs.EOF) {
                Console.WriteLine(rs.Pushpin.Name.ToString());
                rs.MoveNext();
            }
Stack overflow must be somewhere in your application. Can you do a stack trace in VB ? If you can (I really dont know) you can see the callers and see who is overflowing the stack.

But wy are you looping trough 8000 records? ths take extremely long time. Ifyo try to seek a name of a pushpin and do something with it, then you have to keep an array of used pushpins and loop trough it.. If this still take mutch time you can sort them by name and search trough it eventually with an index mechanism like in a database.
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 02-18-2005
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Stack overflow

Hi Wilfried,

I am using my MapPoint Activex with Windev 9. May be the problem comes from that language. I've sent the message error to the Windev-Support. I hope they will give me a solution. Otherwise I will try
with VB6.


I've translated your test code as following, and I have the same stack overflow error at the same moment ( num = 4312 ):
Code:
n, num, nbrecords sont des entiers
ObjRecords, ObjDatSet, ObjMap, ObjLoc, ObjPin  sont  des objet Automation dynamique

cMagasin est une chaîne = ""

ObjMap = MapPointControl1>>activemap

ObjLoc = ObjMap>>GetLocation(50, 4, 1)
TANTQUE n < 8000
	n++
	Trace(n)
	ObjMap>>AddPushpin(ObjLoc, NumériqueVersChaine(n));
FIN

ObjRecords  = ObjMap>>DataSets>>item(1)>>Queryallrecords

nbrecords = ObjRecords>>Parent>>RecordCount

Info(nbrecords)
num = 0

ObjRecords>>MoveFirst	

TANTQUE  ObjRecords>>EOF = Faux   

	num++
	ObjPin =  ObjRecords>>PushPin
	cMagasin = Majuscule(ObjPin>>Name)
    // Here error when Num = 4312
	Trace(num,cMagasin)

  ObjRecords>>MoveNext
FIN
The error is :

"Votre code a provoqué un dépassement de la pile"


Thanks again for your help.

Mohamed
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 02-18-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,105
Hi Mohamed,

Translation seems ok.

I dont know Windev, but is it possible to if the exception occure to view the stack ? Or at least the call stack ? Is it also possible in Windev to do inline assembler ? (eg to put ESP and EBP into a variable for displaying) Or to set a break and view CPU registers, eg after every thousand loop ?

I also see you dont need to define variables in the loop. I assume Windev define itself. Maybe a bug that stack grow deeper in the loop itself ? Hmm just brainstorming maybe you or others have better (or more intelligent ideas on how to debug this

ps: is it always 4312 ? You nentioned other numbers in previous posts (please check, it may or may not be importand)
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

Tags
error, overflow execution stack, readinq


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
Error in calling "get_streetAddress" dgaranz MapPoint 2006/2009 Discussion 5 06-23-2006 05:03 AM
Getting "unspecified error" in VB during FindAddre mschoonmaker MapPoint 2006/2009 Discussion 5 06-12-2006 01:11 PM
MapPoint OLE error: "Could not update object" wiecho_k MapPoint 2006/2009 Discussion 1 07-23-2005 10:53 AM
Do I need "Autoroute Europe", if I install "M bigtail MapPoint 2006/2009 Discussion 1 03-23-2004 11:58 PM
error 16398 with NT service "localsystem" arsenic77 MapPoint 2006/2009 Discussion 3 06-19-2003 10:37 AM


All times are GMT -5. The time now is 07:36 AM.


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


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 52