Bug 955 - [MapLab] adding class item to layer (tutorial), map preview errors out
: [MapLab] adding class item to layer (tutorial), map preview errors out
Status: REOPENED
: MapLab
map editor
: 2.2
: PC Windows XP
: P2 blocker
: ---
Assigned To:
:
:
:
: 1005
:
  Show dependency treegraph
 
Reported: 2005-02-10 10:09 by
Modified: 2006-10-12 16:01 (History)


Attachments
temp mapfile (8.52 KB, text/plain)
2005-02-17 18:28, Jeff McKenna
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2005-02-10 10:09:56
I installed ms4w yesterday on Windows XP Professional 2003.  I downloaded the 
MapLab application and proceeded to run the 'Maplab 2.2 Getting Started' 
tutorial.  When I got to 'Selecting the class item field' (MapEdit), at step 
4, the map preview pane opened up, but instead of seeing the map, I got the 
following error messages:

Warning: [MapServer Error]: msDrawMap(): Failed to draw layer named 'land_fn'. 
in C:\ms4w\apps\maplab-2.2\htdocs\mapedit\preview.php on line 469

Warning: [MapServer Error]: msDBFGetItemIndex(): Item 'CAPITAL' not found. in 
C:\ms4w\apps\maplab-2.2\htdocs\mapedit\preview.php on line 469

Warning: [MapServer Error]: msInsertHashTable: Invalid hash table or key in 
C:\ms4w\apps\maplab-2.2\htdocs\mapedit\preview.php on line 469
(above message 10 times!)

Fatal error: Call to a member function on a non-object in C:\ms4w\apps\maplab-
2.2\htdocs\mapedit\preview.php on line 474

From the second error message, it seems to be related to trying to access the 
DBF field.  I ran the tutorial to this point twice, just to ensure that I had 
not done something wrong prior!  The only deviation to the instructions that I 
made was to key in 'popplace.shp' for the data field of the 'capital' layer 
object, as when I tried to select it using the browse button, the following 
string was returned, which did not reference the popplace.shp file correctly:

../../../../../../../..//maplab-2.2/tutorial/data/popplace

By the way, my downloaded version of Maplab is 2.2, why is this not a choice 
in bugzilla bug reports?  I had to choose either 2.0, 2.1 or 3.0.

Thanks in advance!
------- Comment #1 From 2005-02-10 11:14:07 -------
Jeff, can you try to reproduce this?
------- Comment #2 From 2005-02-17 16:03:54 -------
trying now
------- Comment #3 From 2005-02-17 18:24:51 -------
i can duplicate your exact errors.

note there are 2 bugs here: 

1) the file browsers (every one i tried) for the mapfile parameters return
invalid paths in the textbox (e.g. browse for a shapefile in a DATA parameter
and see the returned path)

2) there seems to be a problem with adding a CLASSITEM.  Any time i add a
CLASSITEM, either to an existing layer (in tutorial.map) or to a new layer...the
CLASSITEM will also get written to ANOTHER layer. 

I've attached the temp mapfile that MapLab is trying to load when we get the
reported errors.  Users add a new layer "capital", with a CLASSITEM and
EXPRESSION...and taking a look at the temp mapfile you can see that the
"land_fn" layer also mysteriously has the CLASSITEM and EXPRESSION...which
causes the error.
------- Comment #4 From 2005-02-17 18:28:43 -------
Created an attachment (id=68) [details]
temp mapfile
------- Comment #5 From 2005-10-21 15:24:42 -------
This appears to be fixed by changes in PHP 4.4.0. Not sure what the fix was but
it is likely related to the 
reference problem fix described here: http://www.php.net/release_4_4_0.php

Note that 4.4.0 breaks binary compatibility with 4.3.x.

Please test on your platform. Do we have an MS4W which incorporates 4.4.0 yet?
------- Comment #6 From 2005-10-27 15:13:03 -------
PHP 4.4.0 solves this duplicate objects problem.  A new MS4W (1.3.0) will be
available shortly with this php version.

However the file browser problem reported here still exists (as well as
selecting a shape attribute browser).  I'll file new bugs for these.
------- Comment #7 From 2005-10-27 15:13:45 -------
*** Bug 1005 has been marked as a duplicate of this bug. ***
------- Comment #8 From 2005-10-27 15:42:15 -------
opened bug#1183 for the path issue.
------- Comment #9 From 2006-10-12 14:29:22 -------
ms4w will be released shortly with a newer PHP5 version (5.1.6), and this bug is
back (multiple classes ....)

------- Comment #10 From 2006-10-12 14:30:22 -------
it doesn't seem to happen with PHP 4.4.4 (which is included in this next
release).
------- Comment #11 From 2006-10-12 14:32:00 -------
a reminder: PHP4 will not be supported in MS4W after this month, so these PHP5
problems are critical.
------- Comment #12 From 2006-10-12 16:01:35 -------
we're gonna have to live with this for a bit - i painfully just tried a "php
5.2-dev snapshot".....i get scarey multithreaded errors for php_mapscript.  I
now have a big headache.  sorry, i tried.