Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4487)

Issue 7726: Planeshift contributor patch bug 2425, prevents crash viewing containers (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 6 months ago by Lanarel
Modified:
14 years, 9 months ago
Reviewers:
planeshift-reviews, Kayden, andy.dai
Base URL:
https://planeshift.svn.sourceforge.net/svnroot/planeshift/trunk/
Visibility:
Public.

Description

With the contributor being me. weltall had a look and thinks it is OK. I would prefer if Kayden or someone knowing differences between EID/UID and FindObject/FindEntity had a look. THis probably prevents a bunch of crashes on LAanx (although it sounds similar other crashes near the same code occur). Would be nice if it could be applied on Laanx if this code is OK. Adding link to bug here (will try to do that in better place next time :) ): http://www.hydlaa.com/flyspray_upgrade/index.php?do=details&task_id=2425

Patch Set 1 #

Patch Set 2 : Better fix to bug FS#2425 - Server crash when viewing container . Hopefully #

Patch Set 3 : Hopefully correct patch for Better fix to FS#2425 - Server crash when viewing container . Hopefully #

Patch Set 4 : Nicer code for FS#2425 - Server crash when viewing container #

Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -59 lines) Patch
src/server/bulkobjects/psitem.cpp View 2 1 chunk +1 line, -1 line 0 comments Download
src/server/client.h View 2 3 2 chunks +0 lines, -6 lines 0 comments Download
src/server/client.cpp View 1 2 3 1 chunk +0 lines, -51 lines 0 comments Download
src/server/gem.h View 1 chunk +8 lines, -0 lines 0 comments Download
src/server/gem.cpp View 1 chunk +48 lines, -0 lines 0 comments Download
src/server/slotmanager.cpp View 2 3 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 12
Lanarel
15 years, 6 months ago (2008-11-01 19:02:44 UTC) #1
Khaki
Looks fine but Kayden should check the cast. http://codereview.appspot.com/7726/diff/1/2 File src/server/client.cpp (right): http://codereview.appspot.com/7726/diff/1/2#newcode522 Line 522: ...
15 years, 6 months ago (2008-11-01 19:58:24 UTC) #2
Lanarel
Added a comment where I copied my code change from. http://codereview.appspot.com/7726/diff/1/2 File src/server/client.cpp (right): http://codereview.appspot.com/7726/diff/1/2#newcode491 ...
15 years, 6 months ago (2008-11-01 21:43:31 UTC) #3
Lanarel
Better fix to bug FS#2425 - Server crash when viewing container . Hopefully
15 years, 6 months ago (2008-11-01 22:54:38 UTC) #4
Lanarel
Hopefully correct patch for Better fix to FS#2425 - Server crash when viewing container . ...
15 years, 6 months ago (2008-11-01 23:02:16 UTC) #5
Lanarel
After vengeance convinced me that I did not know what I was doing and that ...
15 years, 6 months ago (2008-11-01 23:06:46 UTC) #6
Khaki
Looks good to me and committed in r2340. Please close.
15 years, 6 months ago (2008-11-02 00:07:03 UTC) #7
Kayden
I was very surprised by this patch—I thought that CanTake was used when picking up ...
15 years, 6 months ago (2008-11-02 08:32:30 UTC) #8
Lanarel
Well, that explains a think in the code that was weird. If it could not ...
15 years, 6 months ago (2008-11-02 09:51:19 UTC) #9
Lanarel
Nicer code for FS#2425 - Server crash when viewing container
15 years, 6 months ago (2008-11-02 11:49:18 UTC) #10
Lanarel
Some clarification for my last set of patches: - CanTake is cleaned up, combining several ...
15 years, 6 months ago (2008-11-02 11:51:53 UTC) #11
Lanarel
15 years, 6 months ago (2008-11-02 13:42:31 UTC) #12
And another note to myself it seems :):
CanTake appears to be used not only for chests you drop, but more importantly
for items in furnaces and such. Which is why it should check the item is
guarded, and not the container. I 'accidentally' then do not check if the guard
is nearby the item, but do that for the container (preventing a crash). Tested
with furnace, all works fine.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b