- Status Closed
- Percent Complete
- Task Type Bug Report
- Category Engine → Movement
- Assigned To No-one
- Operating System
- Severity Critical
- Priority
- Reported Version
- Due in Version Undecided
-
Due Date
Undecided
- Votes 7
- Private
FS#1749 - Crash related to !leaf and leaf, related to colliding with objects
Updated 13-12-2008:
This report is no longer only for the crash when running into a wall when minimized, but for all crashes in the !leaf_replaced code. Summarizing from below:
- crash is in PS code, resulting from a bounding box in the culler having NAN for one of the coordinates
- people report this happening (often) with the released client, but not with debug ones.
- for debug build the crash can sometimes be triggered when running in a wall minimized (see call stacks and comments).
CS ticket: http://www.crystalspace3d.org/trac/CS/ticket/587
Original details:
- Start running into a wall
- Minimize PlaneShift..
- Bring it up again.
- Crash!
This also works when minimizing and bringing back the console window while looking at the main PS window.
Setting this high priority because it may lead to many crashes during map loads when someone minimizes during the load, his character passes through the loading border and hits a wall, the person switches back to PS again and crashes.
Callstack:
ntdll.dll!7c901230()
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
> crystalspace-1.3-vc9_d.dll!CS::Debug::DebugBreak() Line 941 C++
crystalspace-1.3-vc9_d.dll!CS::Debug::AssertMessage(const char * expr=0x10509454, const char * filename=0x10509d68, int line=226, const char * msg=0x00000000) Line 82 C++
crystalspace-1.3-vc9_d.dll!csKDTree::DebugExit() Line 226 + 0x23 bytes C++
crystalspace-1.3-vc9_d.dll!csKDTree::DistributeLeafObjects() Line 465 C++
crystalspace-1.3-vc9_d.dll!csKDTree::Distribute() Line 599 C++
dynavis.dll!IntersectSegmentSloppy_Front2Back(csKDTree * treenode=0x163a6e90, void * userdata=0x0012f108, unsigned int cur_timestamp=24161, unsigned int & __formal=0) Line 2275 C++
crystalspace-1.3-vc9_d.dll!csKDTree::Front2Back(const csVector3 & pos={...}, bool (csKDTree *, void *, unsigned int, unsigned int &)* func=0x114473c0, void * userdata=0x0012f108, unsigned int cur_timestamp=24161, unsigned int frustum_mask=0) Line 795 + 0x13 bytes C++
crystalspace-1.3-vc9_d.dll!csKDTree::Front2Back(const csVector3 & pos={...}, bool (csKDTree *, void *, unsigned int, unsigned int &)* func=0x114473c0, void * userdata=0x0012f108, unsigned int cur_timestamp=24161, unsigned int frustum_mask=0) Line 809 C++
crystalspace-1.3-vc9_d.dll!csKDTree::Front2Back(const csVector3 & pos={...}, bool (csKDTree *, void *, unsigned int, unsigned int &)* func=0x114473c0, void * userdata=0x0012f108, unsigned int cur_timestamp=24161, unsigned int frustum_mask=0) Line 809 C++
crystalspace-1.3-vc9_d.dll!csKDTree::Front2Back(const csVector3 & pos={...}, bool (csKDTree *, void *, unsigned int, unsigned int &)* func=0x114473c0, void * userdata=0x0012f108, unsigned int frustum_mask=0) Line 857 C++
dynavis.dll!csDynaVis::IntersectSegmentSloppy(const csVector3 & start={...}, const csVector3 & end={...}) Line 2470 C++
crystalspace-1.3-vc9_d.dll!csColliderHelper::TraceBeam(iCollideSystem * cdsys=0x01e4bc50, iSector * sector=0x26f03548, const csVector3 & start={...}, const csVector3 & end={...}, bool traverse_portals=true, csIntersectingTriangle & closest_tri={...}, csVector3 & closest_isect={...}, iMeshWrapper * * closest_mesh=0x0012f55c, iSector * * end_sector=0x00000000) Line 464 + 0x1c bytes C++
psclient.exe!psCamera::CalcCollisionPos(const csVector3 & pseudoTarget={...}, const csVector3 & pseudoPosition={...}, iSector * sector=0x26f03548) Line 1454 + 0x31 bytes C++
psclient.exe!psCamera::DoElasticPhysics(bool isElastic=true, const unsigned int elapsedTicks=56, const psCamera::CameraData & deltaIdeal={...}, iSector * sector=0x26f03548) Line 1487 C++
psclient.exe!psCamera::Draw() Line 691 C++
psclient.exe!psEngine::HandleEvent(iEvent & ev={...}) Line 861 C++
psclient.exe!psEngine::EventHandler::HandleEvent(iEvent & ev={...}) Line 229 C++
crystalspace-1.3-vc9_d.dll!csEventTree::Dispatch(iEvent & e={...}) Line 576 + 0x10 bytes C++
crystalspace-1.3-vc9_d.dll!csEventTree::Notify() Line 547 C++
crystalspace-1.3-vc9_d.dll!csEventQueue::Notify(const unsigned long & name=) Line 270 C++
crystalspace-1.3-vc9_d.dll!csEventQueue::iTypedFrameEventDispatcher::HandleEvent(iEvent & __formal={...}) Line 257 C++
crystalspace-1.3-vc9_d.dll!csEventTree::Dispatch(iEvent & e={...}) Line 576 + 0x10 bytes C++
crystalspace-1.3-vc9_d.dll!csEventTree::Notify() Line 547 C++
crystalspace-1.3-vc9_d.dll!csEventQueue::Notify(const unsigned long & name=) Line 270 C++
crystalspace-1.3-vc9_d.dll!csEventQueue::Process() Line 290 C++
crystalspace-1.3-vc9_d.dll!csDefaultRunLoop(iObjectRegistry * r=0x0133c430) Line 102 C++
psclient.exe!main(int argc=1, char * * argv=0x003f56a0) Line 1940 + 0xa bytes C++
psclient.exe!__tmainCRTStartup() Line 582 + 0x19 bytes C
psclient.exe!mainCRTStartup() Line 399 C
kernel32.dll!7c816fd7()
| ID | Project | Summary | Priority | Severity | Assigned To | Progress | |
|---|---|---|---|---|---|---|---|
| 2190 | PlaneShift | High | |||||
| 1817 | PlaneShift | High | |||||
| 2152 | PlaneShift | Medium | |||||
| 2554 | PlaneShift | Low | |||||
| 2553 | PlaneShift | Low | |||||
| 2567 | PlaneShift | High | |||||
| 2583 | PlaneShift | Low | |||||
| 2585 | PlaneShift | Critical | |||||
| 2590 | PlaneShift | Critical | |||||
| 2695 | PlaneShift | Medium | |||||
| 2726 | PlaneShift | Medium |
| ID | Project | Summary | Priority | Severity | Assigned To | Progress | |
|---|---|---|---|---|---|---|---|
| 2794 | PlaneShift | High | Mike Gist, peeg |
23.12.2009 10:08
Reason for closing:
Additional comments about closing:
Re-opened + closed because of flyspray
problem of not removing re-open/close
requests.
i can confirm this. when a windows open in background , you hit win key or tab out of PS it seems looses it focus on the PS program and client crashes.
Confirmed.
Nairan did you test this with a trunk build or the release client? do you run ps in full screen mode?
tested with released client
what i did so far:
- ran to bdroad1
- went for gug
- ran into the loading area, minimized it before the loading occurs/minimized after the loading occurs (i ran into a wall)
- reloaded it after few secs
- crashed (sometimes after reloaded you can see for 1last sec the window correctly then crashed)
though this doesnt happen at each loading zones. at least for gug laoding area i can confirm, no dump files to save badly.
i tried it from gug to bdroad1 and bdroad1 to gug. crashing occurs often. tested with released client, not Trunk.
Could reproduce it on trunk under Windows (Vista), running from bdroad1 to gugrontid. Either the client crashes, either I get the 'received out of bounds positional data' message. Could also trigger it just after loading map sewers (upper entrance). Ran past the ladders towards the wall and minimized client window: same thing (sometimes crash, sometimes out of bounds message). Nothing at all happens when the client window is not minimized. Tried in several other places too, but couldn't trigger it. Furthermore, it happens whether I turn camera collision detection on or off.
Tried the sewer thing f-rd mentioned, and got the (almost) the same bt as Thom did.
CS asserts and prints this message in the console window:
DistributeLeafObjects failed: !leaf_replaced This node contains the following objects: 0: 'stonebm' (1.#QNAN,10.9182,-98.9289)-(1.#QNAN,12.373,-97.5396) Assertion failed: false Location: d:\prog\cs\libs\csgeom\kdtree.cpp:226obviously, 1.#QNAN is not what you would want to have :). Probably because there is 'no value' in there, all the ifs in csKDTree::DistributeLeafObjects () fail, which only can happen if the bounding box is smaller, larger and not the same as some value, all at the same time.
Added some prints, I see this when all is ok (running into the same wall):
and this when maximizing after it being minimized:
The printed min and max are the bbox_min and bbox_man that are used in function DistributeLeafObjects. Apparently, when maximizing, the bounding box is not defined.
Minimizing the window is not the only way to trigger that crash : make your char run into the wall and change your camera view or move your camera with mouse wheel and you'll get the same crash (same callstack and same messages in console).
There are many other places where you can trigger a crash by one of the above means:
- wall in swr-orange (near pos -49.47 -11.21 -153.24)
- wall in hybdr2 (pos 109.65, -173.95, -128.78)
- wall in hyoja2b (pos 466.31, -0.04, -159.99)
- wall in akk-central (pos -79.37, -7.02, -30.60)
- …
Furthermore, if you have a char standing nearby another char that is running into these walls your client will crash as well when moving your camera or changing your camera view! (same console output and mostly the same callstack). I can have it with one char standing at the Gugrontid mine while another char is running into the walls between Gugrontid and bdroad1.
Crashes by f-rd did not work for me. Finally I did the following in the sewers again:
- run into the loading area when just down the ladders
- minimized
- waited until it crashed on some code I added for that purpose.
BT:
> crystalspace-1.4-vc8_d.dll!csKDTree::DistributeLeafObjects() Line 480 + 0x3 bytes C++ crystalspace-1.4-vc8_d.dll!csKDTree::Distribute() Line 617 C++ dynavis.dll!VisTestBox_Front2Back(csKDTree * treenode=0x3d43a4b8, void * userdata=0x0012e694, unsigned int cur_timestamp=13124, unsigned int & __formal=0) Line 2077 C++ crystalspace-1.4-vc8_d.dll!csKDTree::Front2Back(const csVector3 & pos={...}, bool (csKDTree *, void *, unsigned int, unsigned int &)* func=0x0a5d5ee0, void * userdata=0x0012e694, unsigned int cur_timestamp=13124, unsigned int frustum_mask=0) Line 813 + 0x13 bytes C++ crystalspace-1.4-vc8_d.dll!csKDTree::Front2Back(const csVector3 & pos={...}, bool (csKDTree *, void *, unsigned int, unsigned int &)* func=0x0a5d5ee0, void * userdata=0x0012e694, unsigned int frustum_mask=0) Line 875 C++ dynavis.dll!csDynaVis::VisTest(const csBox3 & box={...}) Line 2128 C++ engine.dll!csEngine::GetNearbyMeshList(iSector * sector=0x3d385948, const csBox3 & box={...}, csArray<iMeshWrapper *,csArrayElementHandler<iMeshWrapper *>,CS::Memory::AllocatorMalloc,csArrayCapacityDefault> & list={...}, csSet<csPtrKey<iSector>,CS::Memory::AllocatorMalloc> & visited_sectors={...}, bool crossPortals=true) Line 2857 + 0x18 bytes C++ engine.dll!csEngine::GetNearbyMeshes(iSector * sector=0x3d385948, const csBox3 & box={...}, bool crossPortals=true) Line 2922 C++ crystalspace-1.4-vc8_d.dll!csColliderActor::CollisionDetect(iCollider * collider=0x2f46e2b0, iSector * sector=0x3d385948, csReversibleTransform * transform=0x0012efec, csReversibleTransform * old_transform=0x0012f044) Line 780 + 0x41 bytes C++ crystalspace-1.4-vc8_d.dll!csColliderActor::AdjustForCollisions(const csVector3 & oldpos={...}, csVector3 & newpos={...}, const csVector3 & vel={...}, float delta=0.18300000) Line 1003 + 0x26 bytes C++ psclient.exe!psCollisionDetection::AdjustForCollisions(csVector3 & oldpos={...}, csVector3 & newpos={...}, csVector3 & vel={...}, float delta=0.18300000, iMovable * __formal=0x26bf86d4) Line 95 C++ psclient.exe!psLinearMovement::MoveV(float delta=0.18300000) Line 503 + 0x33 bytes C++ psclient.exe!psLinearMovement::MoveSprite(float delta=0.18300000) Line 424 + 0xf bytes C++ psclient.exe!psLinearMovement::ExtrapolatePosition(float delta=0.18300000) Line 768 C++ psclient.exe!psLinearMovement::TickEveryFrame() Line 789 C++ psclient.exe!GEMClientActor::Update() Line 1450 C++ psclient.exe!psCelClient::Update() Line 794 C++ psclient.exe!psEngine::HandleEvent(iEvent & ev={...}) Line 851 C++ psclient.exe!psEngine::EventHandler::HandleEvent(iEvent & ev={...}) Line 229 C++ crystalspace-1.4-vc8_d.dll!csEventTree::Dispatch(iEvent & e={...}) Line 576 + 0x10 bytes C++ crystalspace-1.4-vc8_d.dll!csEventTree::Notify() Line 547 C++ crystalspace-1.4-vc8_d.dll!csEventQueue::Notify(const unsigned long & name=3) Line 270 C++ crystalspace-1.4-vc8_d.dll!csEventQueue::iTypedFrameEventDispatcher::HandleEvent(iEvent & __formal={...}) Line 259 C++ crystalspace-1.4-vc8_d.dll!csEventTree::Dispatch(iEvent & e={...}) Line 576 + 0x10 bytes C++ crystalspace-1.4-vc8_d.dll!csEventTree::Notify() Line 547 C++ crystalspace-1.4-vc8_d.dll!csEventQueue::Notify(const unsigned long & name=1) Line 270 C++ crystalspace-1.4-vc8_d.dll!csEventQueue::Process() Line 290 C++ crystalspace-1.4-vc8_d.dll!csDefaultRunLoop(iObjectRegistry * r=0x012e0380) Line 102 C++ psclient.exe!main(int argc=1, char * * argv=0x012957c0) Line 1950 + 0xa bytes C++ psclient.exe!__tmainCRTStartup() Line 597 + 0x19 bytes C psclient.exe!mainCRTStartup() Line 414 C kernel32.dll!7c817067() [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll] psclient.exe!psEngine::Initialize(int level=7798895) Line 432 C++ psclient.exe!psEngine::Initialize(int level=7798895) Line 432 C++ psclient.exe!psEngine::Initialize(int level=7340148) Line 432 C++ psclient.exe!pawsWidget::LoadFromFile(const csString & fileName={...}) Line 2237 + 0xe bytes C++ 00008888()Note: I added a lot of printfs and other code in kdtree.cpp, so line numbers are not correct. THe crash is where it says !leaf_replaced.
From the console:
no leaf_replacedDistributeLeafObjects failed: !leaf_replaced This node contains the following objects: 0: 'gobble' (1.#QNAN,-4.86345,-124.616)-(1.#QNAN,-3.75459,-123.391)So apparently a gobble somewhere caused the problem when my menki was changing map.
Some more debug info:
- numobjects=1, i=0
- objects[i] seems valid but objects[i]→bbox has invalid values (1.#QNAN00) for the first values for bbox.minbox.x and bbox.maxbox.x. The other values seem OK.
Checked back upto the 10th line (in AdjustForCollisions) where a sector is passed to CollisionDetect (and then to GetNearByMeshes). The bbox of the only object in the kdtree of the culler in this sector already has the problem. Either the wrong sector is selected, or something is just wrong in the sector.
Having relogged subsequent to such a crash reported in duplicate report I discovered I could trigger the crash just by rotating my camera view in first person.
Bilbous: did it happen near a sector crossing/portal, or also really in the middle in a map (i.e., not in the middle of a map where there might be a sector change).
The last time it happened, where I caused it to re-occur just by turning my body/rotating the first person camera view was on the platform above the stairs going down to the exit portal immediately in front of the eye in the Death Realm. The crash occurred when the camera view was partly encompassing the stone. When I was looking out into space I had no problem. It seemed like it might have had something to do with the viewport extending into the rock but that might be completely fallacious. Actually both time it crashed in this spot I was adjusting the camera view and not moving as those stairs are a little tricky to manoeuvrer in first person view if you are not watching your step.
Other times I believe I was in the middle of some map, whether I was closed to a sector change I do not know, are there many sectors in a large map?
I have not tested extensively nor did I get out of Hydlaa for much of 4.02 so I cannot be certain it is now worse, it does seem that way. Going forward I will try to take better note of where it happens. I gather I should expect it to be at sector changes/portal vicinities?
Hello, I had the crash in the official released version for linux 32 bits (ubuntu 32 bits here). In fact it was making the game unplayable for me. Each time that the char approaches to some players or npcs moved by players, it can crash. Have compiled the client, and so far the problem has disappeared, in case any is interested, there's a very good guide explaining how to compile the client in www.planeshift.it (section development/sourcecode). For ubuntu, when it says libopenal1a, change it for libopenal0a. Thanks too, to the people in the planeshift-build irc channel, who have helped me solving some doubts about the compilation process.
Just in case it can help anybody…
(Feel free to poke me in the game or irc channels, in case you need help with the compilation and the devs are buisy…)
i can confirm something similar on linux, while someone from my guild can't reproduce it: it works only on some walls (i.e. arena walls in the pits under the seats), and i don't have to minimize the client to crash.
see my report #2583 for further details and console output.
Just in case it can help, so far I couldn't trigger the bug, once I have compiled my client in linux 32 bits. While with the dowloaded version it crashed like 2 times each 5 minutes, and not related to walls or something here, but to other chars and npcs…
Dont have to minimize the client, the crashes occurs sometimes when monsters appears/disappears/change state (alive/dead) and are not in the vewport (visible on screen). and especially when another player is near (as near as i can see in the chat windows his stance changes)
I'm on linux 32bits 2.6.24-22 kernel and binary.
it seems that a build done by me either optimized (and I optimize way more of what configure allows me to by even editing jamconfig files) or debug can't reproduce it with gcc 4.3 on ubuntu. i was also told that mingw builds are also absent from this problem but i'm not 100% sure of this) and mac seems to not have the problem at all even on official builds.
Same problem here. Crashed after seconds with !leaf message. Build the client out of the sources and all is fine. System kubuntu 8.10 on an athlon 2400+ system with ati graphics
Xordan made a ticket in CS Bug space:
http://www.crystalspace3d.org/trac/CS/ticket/587
hi,
i'm using linux, and i can avoid the crashes using wine and the windows version of PS.
1. install wine
2. install cabextract
2. install the windows version of openAL into your wine
3. install vcrun6 and vcrun2005 via winetricks (http://www.kegel.com/wine/winetricks)
4. install the windows version of planeshift
5. run it
it worked for me as well as for Thob from my guild. However, all the ingame windows are transparent, their background images and buttons without text are invisible. But it never crashes.
Thu Dec 25 07:44:07 2008, <src/client/psclientdr.cpp:212 HandleDeadReckon SEVERE>
Thu Dec 25 07:44:07 2008, Got DR message for unknown entity EID:28741.
Thu Dec 25 07:44:29 2008, <src/client/psclientdr.cpp:212 HandleDeadReckon SEVERE>
Thu Dec 25 07:44:29 2008, Got DR message for unknown entity EID:25331.
DistributeLeafObjects failed: !leaf_replaced
Screens of 'unkown entity' preceding this and i cant do anything more complex than stand still.
Out in the wilds with nothing else around it never crashes. Seems to be when a player or npc enters
my gamespace and even then its spontaneous.
Using the linux 32bit client and this started happening with the last update a few weeks back.
UPDATE:
I havent noticed it happening when im walking or running even through crowded spots like harnquists forge it mostly happens while standing still or standing doing jobs like smelting and forging. Dont know if this helps.
I will also try playing with all labels turned off to see if thats any better.
This happens consistently now, when someone is leaving my area. In particular it happens predictably when I am near the brigand on bd road 1 and someone leaves the area to head for the nearby portal to bd road 2.
Since 4.03 and my switch to the mesa drivers on ubuntu, plus turning off texture compression, I seem to be getting a variant of this instead of falling out of bounds. After the crash I find myself in the default start location for the sector. Here is what the debug output looks like in these cases:
Sat Jan 10 17:55:26 2009, Server report HP but object is not alive
DistributeLeafObjects failed: !leaf_replaced
Cleaned up a bit deleting comments that did not have any information to add, such as old ones (mainly test team) about not being able to reproduce and newer ones that only said 'me too'. THese were all useful, but now just clutter the report.
Some update:
The problem is now pinpointed to doing a coordinate transform on a bounding box, which goes well several times (while running in a wall for example) but then suddenly has an invalid translation vector. Now we only have to find out why that vector is suddenly wrong.
I found the problem in CS collision detection code. It was clearly the cause of my reproducable crash, and even made a problem in another game go away. It is committed to the CS 1.9 and 1.4 branches.
This means that the crash should be gone if you build the client from svn stable, with latest revision of CS 1.4. Hopefully a precompiled binary can be distributed using the updater.
I will set this ready-to-test. Please report here if crashes are no longer occurring.
As is obvious by my bug report, I too am getting this bug - VERY regularly, on the official linux binary. I would like to vote for a new binary via the updater also.
Seconded Joran and good to know the bug got squashed in CS.
If someone is still having problems, here is a built (from svn) client without this bug: http://www.hydlaaplaza.com/smf/index.php?topic=35424
Please can this bug be re-opened until a new release is made that includes the fix? A fix in svn is all very well, but the game is almost unplayable for a lot of people whilst this bug is in the latest release.