The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Access Violation in CChar::CanMoveWalkTo
Author Message
Norlack
Apprentice
*

Posts: 35
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Jan 2013
Reputation: 0

New Hera Reborn

Post: #1
Access Violation in CChar::CanMoveWalkTo
I've enabled the flag "EF_WalkCheck" after a server crash few days ago. Unfortunately I have in heritage a shard with tons of custom scripts (many of which made by noobs that I'm fixing one by one or replacing) and I don't know where to look for exactly.

Code:
19:28:DEBUG:>>         5308     |  0 |               CWorld::OnTick | +0
19:28:DEBUG:>>         5308     |  1 |              CSector::OnTick | +0
19:28:DEBUG:>>         5308     |  2 |                CChar::OnTick | +125
19:28:DEBUG:>>         5308     |  3 |      CChar::NPC_OnTickAction | +0
19:28:DEBUG:>>         5308     |  4 |        CChar::NPC_Act_Wander | +0
19:28:DEBUG:>>         5308     |  5 |       CChar::NPC_WalkToPoint | +0
19:28:DEBUG:>>         5308     |  6 |         CChar::CanMoveWalkTo | +0 <-- exception catch point (below is guessed and could be incorrect!)
19:28:DEBUG:>>         5308     |  7 |    CChar::CheckValidMove_New | +0
19:28:DEBUG:>>         5308     |  8 |   CWorld::GetHeightPoint_New | +0
19:28:DEBUG:>>         5308     |  9 |     CItemBase::GetItemHeight | +0
19:28:DEBUG:>>         5308     | 10 | CItemBase::GetItemHeightFlags | +0
19:28:DEBUG:__ thread (5308) __ |  # | _____ function _____________ | ticks passed from previous function start ______
19:28:DEBUG:>>         5308     |  0 |               CWorld::OnTick | +0
19:28:DEBUG:>>         5308     |  1 |              CSector::OnTick | +0
19:28:DEBUG:>>         5308     |  2 |                CChar::OnTick | +125
19:28:DEBUG:>>         5308     |  4 |        CChar::NPC_Act_Wander | +0
19:28:DEBUG:>>         5308     |  5 |       CChar::NPC_WalkToPoint | +0
19:28:DEBUG:>>         5308     |  6 |         CChar::CanMoveWalkTo | +0 <-- exception catch point (below is guessed and could be incorrect!)
19:28:DEBUG:>>         5308     |  7 |    CChar::CheckValidMove_New | +0
19:28:DEBUG:>>         5308     |  8 |   CWorld::GetHeightPoint_New | +0
19:28:DEBUG:>>         5308     |  9 |     CItemBase::GetItemHeight | +0
19:28:DEBUG:>>         5308     | 10 | CItemBase::GetItemHeightFlags | +0
19:28:CRITICAL:"Access Violation" (0x127e16), in CChar::CanMoveWalkTo() #1 "Check Valid Move"

This is the occasional console-spam with the EF_WalkCheck enabled. Do you have any tips?
Thanks




Ah, I'm using 56b Nightly (april 2012), not the latest beacuse it causes some issues with our spells that I have to fix.
(This post was last modified: 02-28-2013 08:24 AM by Norlack.)
02-26-2013 04:39 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #2
RE: Access Violationi n CChar::CanMoveWalkTo
Either

a) your using a map that is not loaded in e.g. planes 2,3,4,5

You have to uncomment them in spheretables.scp to load their scripts or

b) You have an npc that is spawning beyond the edge of the map.

In my experience at least

[Image: 2nis46r.jpg]
02-26-2013 04:54 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Norlack
Apprentice
*

Posts: 35
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Jan 2013
Reputation: 0

New Hera Reborn

Post: #3
RE: Access Violationi n CChar::CanMoveWalkTo
well, maps are all loaded, we use them by years... and does not seems there are bad spawn locations. :\

doing some test...
- removed all existing chars
- removed all worldgembit
The error vanished.
- restored all worldgembit
The error reappeared and going to 1,1 position I've obtained this:

Code:
23:56:ERROR:(sphere_npcs_m_Elementali.scp,506)Point(-1,-1): trying to get a sector for point on map #0 out of bounds for this map(6144,4096). Defaulting to sector 0 of the map.
23:56:ERROR:(sphere_npcs_m_Elementali.scp,506)Point(-1,-1): trying to get a sector for point on map #0 out of bounds for this map(6144,4096). Defaulting to sector 0 of the map.
23:56:ERROR:(sphere_npcs_m_AnimaliMalvagi.scp,499)Point(-1,-1): trying to get a sector for point on map #0 out of bounds for this map(6144,4096). Defaulting to sector 0 of the map.
23:56:ERROR:(sphere_npcs_m_Elementali.scp,506)Point(-1,-1): trying to get a sector for point on map #0 out of bounds for this map(6144,4096). Defaulting to sector 0 of the map.
23:56:ERROR:(sphere_npcs_m_Demoni.scp,422)Point(-1,-1): trying to get a sector for point on map #0 out of bounds for this map(6144,4096). Defaulting to sector 0 of the map.
23:56:ERROR:(sphere_npcs_a_Selvaggi.scp,1292)Point(-1,-1): trying to get a sector for point on map #0 out of bounds for this map(6144,4096). Defaulting to sector 0 of the map.
23:56:ERROR:(sphere_npcs_m_NonMorti.scp,468)Point(-1,-1): trying to get a sector for point on map #0 out of bounds for this map(6144,4096). Defaulting to sector 0 of the map.
23:56:ERROR:(sphere_npcs_m_NonMorti.scp,900)Point(-1,-1): trying to get a sector for point on map #0 out of bounds for this map(6144,4096). Defaulting to sector 0 of the map.
23:56:ERROR:(sphere_npcs_m_Insetti.scp,691)Point(-1,-1): trying to get a sector for point on map #0 out of bounds for this map(6144,4096). Defaulting to sector 0 of the map.

It's happening for every existing char @Create related to COLOR definition. Never seen something like this (and I've seen several oddities in the last 10+ years ^^').
(This post was last modified: 02-26-2013 09:10 AM by Norlack.)
02-26-2013 08:49 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #4
RE: Access Violationi n CChar::CanMoveWalkTo
That's definitely a spawn point spawning off the map. I had the same issue when i had a little bad math in my spawning script.
It may be fixable if you make sure your maps are properly defined in your .ini

Are you using standard UO maps? ML expansion? or something completely custom?

[Image: 2nis46r.jpg]
02-26-2013 09:22 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Norlack
Apprentice
*

Posts: 35
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Jan 2013
Reputation: 0

New Hera Reborn

Post: #5
RE: Access Violationi n CChar::CanMoveWalkTo
ML expansion and UO maps customized (but not in size), and the chars at issue use the standard t_spawn_char.
(This post was last modified: 02-26-2013 09:35 AM by Norlack.)
02-26-2013 09:28 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #6
RE: Access Violationi n CChar::CanMoveWalkTo
The issue seems to occur with gembits placed around the edge of the map where the distance set on the gembit (MOREP= <min time> <max time> <distance>) is greater than the distance to the edge of the map.

I'd suggest going and taking a look at a couple of these gembits and see what their distance is set to compared to their distance from the map edge.

[Image: 2nis46r.jpg]
02-26-2013 09:52 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Norlack
Apprentice
*

Posts: 35
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Jan 2013
Reputation: 0

New Hera Reborn

Post: #7
RE: Access Violationi n CChar::CanMoveWalkTo
already tried, there were just two spawns with distance beyond the edge of the map.


Code:
FORINSTANCES i_worldgem_bit
    IF ( <EVAL <P.X>-<MOREZ>> < 1 ) || ( <EVAL <P.X>+<MOREZ>> > 6143 ) || ( <EVAL <P.Y>-<MOREZ>> < 1 ) || ( <EVAL <P.Y>+<MOREZ>> > 4095 )
        SERV.LOG <P>
    ENDIF
ENDFOR
(This post was last modified: 02-26-2013 10:21 AM by Norlack.)
02-26-2013 10:18 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #8
RE: Access Violationi n CChar::CanMoveWalkTo
What I am saying is.

If the distance value stored under morep on the gembit is greater than the distance the gembit is from the edge of the map, you will have the problem you are having.

I've been there, done it and own the t-shirt

[Image: 2nis46r.jpg]
02-26-2013 10:36 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Norlack
Apprentice
*

Posts: 35
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Jan 2013
Reputation: 0

New Hera Reborn

Post: #9
RE: Access Violationi n CChar::CanMoveWalkTo
(02-26-2013 10:36 AM)Mordaunt Wrote:  If the distance value stored under morep on the gembit is greater than the distance the gembit is from the edge of the map, you will have the problem you are having.
This is exactly what I checked. There were just two spawns with those characteristics. ^^'
02-27-2013 02:42 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #10
RE: Access Violationi n CChar::CanMoveWalkTo
did you remove them? which would remove the npc's also.
I have actually raised a bug ticket for this issue now, which I should probably have done when I first encountered it myself

[Image: 2nis46r.jpg]
02-27-2013 02:57 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 4 Guest(s)