Log error question
Stéphane RIFF
stephane.riff at CERENE.FR
Wed Jul 20 05:55:44 PDT 2005
Thanks for your answer.
All my data are stored in POSTGIS so i can't use your utility.
About the scale i tried at the same scale with DEBUG ON and OFF
When it's ON -> no crash
When it's OFF -> crash
Maybe my layer def is bad, i have post about my layer definition but had
no answer
I resend it here.
This layer represent some car track on one day, i use gps date to
delimitate each path.
It a bit long but hope someone could tell me if it's really bad to do this :
The data table structure is :
| gps_date | speed | altitude | heading |
engine_onoff |
geom |
2005-06-27 04:58:20 | 100 | 350 | 159 |
1 | SRID=4326;POINT(2.315729 48.777176)
2005-06-27 04:59:19 | 90 | 345 | 120 |
1 | SRID=4326;POINT(2.314061 48.771334)
- | - | - |
- | 0 | -
- | - | - |
- | 0 | -
- | - | - |
- | 0 | -
- | - | - |
- | 1 | -
and so on .....
The field engine_onoff represent each track when it's 1 the engine is
power on
when it's 0 the engine is power off.
My goal is that all path (engine_onoff == 1) are represents in a
different color. ( I use seven colors and rotate )
At this time i use a sql query to determinate all tracks starts and
ends, then create a dynamic layer via phpmapscript.
Here is the layer definition
LAYER
CLASSITEM "gps_date"
CONNECTION "host=localhost dbname=database1 port=5432 user=usr1
password=pwd1"
CONNECTIONTYPE POSTGIS
DATA "geom from history"
FILTER ( (natural_id=1002514153) AND (TIMESTAMP '2005-06-27
00:00:01',TIMESTAMP '2005-06-27 23:59:59') OVERLAPS (gps_date,INTERVAL
'0 days'))
GROUP "G.P.S"
LABELANGLEITEM "heading"
LABELCACHE OFF
METADATA
END
NAME "GPS_REM"
PROJECTION
"init=epsg:4326"
END
SIZEUNITS PIXELS
STATUS ON
TOLERANCE 6
TOLERANCEUNITS PIXELS
TRANSPARENCY 1000
TYPE ANNOTATION
UNITS METERS
CLASS
NAME "0"
EXPRESSION ( ('[gps_date]' >= '2005-07-11 06:57:06' AND
'[gps_date]' < '2005-07-11 07:02:36')
OR ('[gps_date]' >= '2005-07-11 12:16:09'
AND '[gps_date]' < '2005-07-11 12:18:49')
OR ('[gps_date]' >= '2005-07-11 17:29:04'
AND '[gps_date]' < '2005-07-11 17:37:54')
OR ('[gps_date]' >= '2005-07-11 19:18:58'
AND '[gps_date]' < '2005-07-11 19:19:13')
OR ('[gps_date]' >= '2005-07-11 20:24:25'
AND '[gps_date]' < '2005-07-11 20:38:05') )
LABEL
ANGLE -21.000000
ANTIALIAS TRUE
FONT Symbols
MAXSIZE 256
MINSIZE 4
SIZE 14
TYPE TRUETYPE
BUFFER 0
COLOR 0 128 128
FORCE TRUE
MINDISTANCE -1
MINFEATURESIZE -1
OFFSET 0 0
PARTIALS TRUE
POSITION CC
END
METADATA
END
STYLE
COLOR 0 0 255
MAXSIZE 500
MINSIZE 1
SIZE 14
SYMBOL "point"
END
TEMPLATE "dummy"
TEXT "b"
END
CLASS
NAME "1"
EXPRESSION ( ('[gps_date]' >= '2005-07-11 07:10:19' AND
'[gps_date]' < '2005-07-11 07:48:45')
OR ('[gps_date]' >= '2005-07-11 12:18:49'
AND '[gps_date]' < '2005-07-11 12:34:15')
OR ('[gps_date]' >= '2005-07-11 17:37:54'
AND '[gps_date]' < '2005-07-11 18:00:53')
OR ('[gps_date]' >= '2005-07-11 19:29:20'
AND '[gps_date]' < '2005-07-11 19:30:05')
OR ('[gps_date]' >= '2005-07-11 20:38:05'
AND '[gps_date]' < '2005-07-11 20:44:50') )
LABEL
ANGLE -21.000000
ANTIALIAS TRUE
FONT Symbols
MAXSIZE 256
MINSIZE 4
SIZE 14
TYPE TRUETYPE
BUFFER 0
COLOR 0 0 128
FORCE TRUE
MINDISTANCE -1
MINFEATURESIZE -1
OFFSET 0 0
PARTIALS TRUE
POSITION CC
END
METADATA
END
STYLE
COLOR 0 0 255
MAXSIZE 500
MINSIZE 1
SIZE 14
SYMBOL "point"
END
TEMPLATE "dummy"
TEXT "b"
END
CLASS
NAME "2"
EXPRESSION ( ('[gps_date]' >= '2005-07-11 07:56:22' AND
'[gps_date]' < '2005-07-11 08:00:22')
OR ('[gps_date]' >= '2005-07-11 12:37:30'
AND '[gps_date]' < '2005-07-11 12:44:30')
OR ('[gps_date]' >= '2005-07-11 18:00:53'
AND '[gps_date]' < '2005-07-11 18:33:29')
OR ('[gps_date]' >= '2005-07-11 19:37:37'
AND '[gps_date]' < '2005-07-11 19:39:52')
OR ('[gps_date]' >= '2005-07-11 20:44:50'
AND '[gps_date]' < '2005-07-11 20:46:35') )
LABEL
ANGLE -168.000000
ANTIALIAS TRUE
FONT Symbols
MAXSIZE 256
MINSIZE 4
SIZE 14
TYPE TRUETYPE
BUFFER 0
COLOR 128 0 128
FORCE TRUE
MINDISTANCE -1
MINFEATURESIZE -1
OFFSET 0 0
PARTIALS TRUE
POSITION CC
END
METADATA
END
STYLE
COLOR 0 0 255
MAXSIZE 500
MINSIZE 1
SIZE 14
SYMBOL "point"
END
TEMPLATE "dummy"
TEXT "b"
END
CLASS
NAME "3"
EXPRESSION ( ('[gps_date]' >= '2005-07-11 08:02:07' AND
'[gps_date]' < '2005-07-11 08:19:54')
OR ('[gps_date]' >= '2005-07-11 15:21:47'
AND '[gps_date]' < '2005-07-11 15:38:00')
OR ('[gps_date]' >= '2005-07-11 18:33:29'
AND '[gps_date]' < '2005-07-11 18:42:53')
OR ('[gps_date]' >= '2005-07-11 19:52:07'
AND '[gps_date]' < '2005-07-11 20:05:55')
OR ('[gps_date]' >= '2005-07-11 20:47:35'
AND '[gps_date]' < '2005-07-11 20:47:50') )
LABEL
ANGLE -261.000000
ANTIALIAS TRUE
FONT Symbols
MAXSIZE 256
MINSIZE 4
SIZE 14
TYPE TRUETYPE
BUFFER 0
COLOR 128 128 128
FORCE TRUE
MINDISTANCE -1
MINFEATURESIZE -1
OFFSET 0 0
PARTIALS TRUE
POSITION CC
END
METADATA
END
STYLE
COLOR 0 0 255
MAXSIZE 500
MINSIZE 1
SIZE 14
SYMBOL "point"
END
TEMPLATE "dummy"
TEXT "b"
END
CLASS
NAME "4"
EXPRESSION ( ('[gps_date]' >= '2005-07-11 08:20:09' AND
'[gps_date]' < '2005-07-11 08:21:24')
OR ('[gps_date]' >= '2005-07-11 15:41:45'
AND '[gps_date]' < '2005-07-11 16:53:00')
OR ('[gps_date]' >= '2005-07-11 18:42:53'
AND '[gps_date]' < '2005-07-11 18:46:38')
OR ('[gps_date]' >= '2005-07-11 20:05:55'
AND '[gps_date]' < '2005-07-11 20:10:40')
OR ('[gps_date]' >= '2005-07-11 21:24:58'
AND '[gps_date]' < '2005-07-11 21:25:28') )
LABEL
ANGLE -286.000000
ANTIALIAS TRUE
FONT Symbols
MAXSIZE 256
MINSIZE 4
SIZE 14
TYPE TRUETYPE
BUFFER 0
COLOR 0 0 0
FORCE TRUE
MINDISTANCE -1
MINFEATURESIZE -1
OFFSET 0 0
PARTIALS TRUE
POSITION CC
END
METADATA
END
STYLE
COLOR 0 0 255
MAXSIZE 500
MINSIZE 1
SIZE 14
SYMBOL "point"
END
TEMPLATE "dummy"
TEXT "b"
END
CLASS
NAME "5"
EXPRESSION ( ('[gps_date]' >= '2005-07-11 08:46:27' AND
'[gps_date]' < '2005-07-11 09:15:20')
OR ('[gps_date]' >= '2005-07-11 16:53:00'
AND '[gps_date]' < '2005-07-11 17:20:19')
OR ('[gps_date]' >= '2005-07-11 18:55:38'
AND '[gps_date]' < '2005-07-11 18:59:08')
OR ('[gps_date]' >= '2005-07-11 20:10:40'
AND '[gps_date]' < '2005-07-11 20:20:10') )
LABEL
ANGLE -11.000000
ANTIALIAS TRUE
FONT Symbols
MAXSIZE 256
MINSIZE 4
SIZE 14
TYPE TRUETYPE
BUFFER 0
COLOR 128 128 0
FORCE TRUE
MINDISTANCE -1
MINFEATURESIZE -1
OFFSET 0 0
PARTIALS TRUE
POSITION CC
END
METADATA
END
STYLE
COLOR 0 0 255
MAXSIZE 500
MINSIZE 1
SIZE 14
SYMBOL "point"
END
TEMPLATE "dummy"
TEXT "b"
END
CLASS
NAME "6"
EXPRESSION ( ('[gps_date]' >= '2005-07-11 11:21:04' AND
'[gps_date]' < '2005-07-11 11:50:10')
OR ('[gps_date]' >= '2005-07-11 17:20:19'
AND '[gps_date]' < '2005-07-11 17:29:04')
OR ('[gps_date]' >= '2005-07-11 19:12:43'
AND '[gps_date]' < '2005-07-11 19:16:58')
OR ('[gps_date]' >= '2005-07-11 20:20:10'
AND '[gps_date]' < '2005-07-11 20:21:25') )
LABEL
ANGLE -6.000000
ANTIALIAS TRUE
FONT Symbols
MAXSIZE 256
MINSIZE 4
SIZE 14
TYPE TRUETYPE
BUFFER 0
COLOR 255 0 255
FORCE TRUE
MINDISTANCE -1
MINFEATURESIZE -1
OFFSET 0 0
PARTIALS TRUE
POSITION CC
END
METADATA
END
STYLE
COLOR 0 0 255
MAXSIZE 500
MINSIZE 1
SIZE 14
SYMBOL "point"
END
TEMPLATE "dummy"
TEXT "b"
END
CLASS
NAME "stop"
EXPRESSION ( ('[gps_date]' eq '2005-07-10 23:04:48') OR
('[gps_date]' eq '2005-07-11 07:02:36')
OR ('[gps_date]' eq '2005-07-11
07:48:45') OR ('[gps_date]' eq '2005-07-11 07:53:52')
OR ('[gps_date]' eq '2005-07-11
08:00:22') OR ('[gps_date]' eq '2005-07-11 08:19:54')
OR ('[gps_date]' eq '2005-07-11
08:21:24') OR ('[gps_date]' eq '2005-07-11 08:22:24')
OR ('[gps_date]' eq '2005-07-11
09:15:20') OR ('[gps_date]' eq '2005-07-11 11:50:10')
OR ('[gps_date]' eq '2005-07-11
12:34:15') OR ('[gps_date]' eq '2005-07-11 12:44:30')
OR ('[gps_date]' eq '2005-07-11
13:39:04') OR ('[gps_date]' eq '2005-07-11 15:38:00')
OR ('[gps_date]' eq '2005-07-11
18:46:38') OR ('[gps_date]' eq '2005-07-11 18:59:08')
OR ('[gps_date]' eq '2005-07-11
19:16:58') OR ('[gps_date]' eq '2005-07-11 19:19:13')
OR ('[gps_date]' eq '2005-07-11
19:30:05') OR ('[gps_date]' eq '2005-07-11 19:34:37')
OR ('[gps_date]' eq '2005-07-11
19:34:52') OR ('[gps_date]' eq '2005-07-11 19:39:52')
OR ('[gps_date]' eq '2005-07-11
19:41:52') OR ('[gps_date]' eq '2005-07-11 19:45:22')
OR ('[gps_date]' eq '2005-07-11
19:45:37') OR ('[gps_date]' eq '2005-07-11 19:48:37')
OR ('[gps_date]' eq '2005-07-11
19:48:52') OR ('[gps_date]' eq '2005-07-11 19:50:07')
OR ('[gps_date]' eq '2005-07-11
20:21:25') OR ('[gps_date]' eq '2005-07-11 20:23:55')
OR ('[gps_date]' eq '2005-07-11
20:46:35') OR ('[gps_date]' eq '2005-07-11 20:47:50')
OR ('[gps_date]' eq '2005-07-11
21:25:28') OR ('[gps_date]' eq '2005-07-11 22:38:02') )
LABEL
ANGLE -244.000000
ANTIALIAS TRUE
FONT Symbols
MAXSIZE 256
MINSIZE 4
SIZE 14
TYPE TRUETYPE
BUFFER 0
COLOR 255 0 0
FORCE TRUE
MINDISTANCE -1
MINFEATURESIZE -1
OFFSET 0 0
PARTIALS TRUE
POSITION CC
END
METADATA
END
TEMPLATE "dummy"
TEXT "f"
END
END
Stephen Woodbridge wrote:
> This sounds like it might be a data problem with the layer you are
> having problems with. If you have a bad file or a bad object in the
> file it would work most of the time but only crash when you are at the
> correct zoom scale and at the correct spatial extents to cause the
> object to be rendered.
>
> There used to be a utility called chkshp or checkshp or something like
> that that you can run on shape files to check them. You might want to
> consider doing that to make sure it is not a data problem.
>
> -Steve W.
>
> Stéphane RIFF wrote:
>
>> I really don't understand because when i turn DEBUG ON my never crash
>> I know it's really strange but it's what i see....
>> I use php 4.3.9 and i saw on php.net that php 4.4.0 release had
>> resolve some
>> bug on references : Do you think that i had to update my php version ???
>>
>> Stéphane RIFF wrote:
>>
>>> Hello,
>>>
>>> I have some problem on a phpmapscript application. Some time it
>>> seems that
>>> $map->draw() crash for unknown reason. It's not logical (I think),
>>> it happened
>>> randomly but only when a specific layer is on.
>>>
>>> What i want to know is to debug phpmapscript, so i made an
>>> error_handler for my php script
>>> but i didn't log the phpmapscript errors. So i tried map DEBUG but
>>> the informations
>>> are very orientated for time performance. Is it possible to log only
>>> crash ???
>>>
>>> Hope this clear...
>>> Thanks
>>> Steff
>>>
>>>
>>
>
>
More information about the MapServer-users
mailing list