Page 1 of 1

Doomed NPE at Signets.

Posted: Tue Jul 13, 2010 8:55 pm
by Tryskell
L2J Revision Number: a weird number
L2JDP Revision Number: n/c

Heya all,

first and not the least, I must say my pack is a fully custom pack, massively edited by me. I got a timeline aswell, in case I got problem. So I can assume saying you than I didn't bad-edit any files in relation with my problem.

I can add too my project is based on a fork of L2J. Mainly, it's 90% L2J code, and the guy worked more about stability and network stuff. Aka, many importants things haven't been made, and it's why I'm following the timeline.

I must say I added many fixes from L2J timeline (I made 1450 -> 23xx actually), notably charEffectList, which wasn't existing in the signets support time. I suppose it has no incidence on the problem, but it's why you will see stranges things on my code (like staticReuse). Actually it's a sort-like between IL and newest stuff.

----

I got a weird problem on Signets add : http://www.l2jserver.com/trac/changeset/1836.

When all buffs type (and physics) symbols are working perfectly, I got a problem only on OFFENSIVE magics ones which need a callSkill on numerous targets (volcano / Cyclone / Gehenna / Raging waves). I tested for example mass recharge symbol, and it works normally (magic type, but on a single target).

Well now you're introduced on the problem, here the beast : (check error.jpg).

I understood the 'targets' are null instead of being anything else. But from previous code, it was looking the same.

After the 1836 code implementation, I begun to desesperate. I refactored (updated) from last revision both callSkill & doCast methods. Unfortunately, even if it didn't added problems (and surely improved methods lol), it didn't correct my NPE.

I tried to search in L2Skill where the case TARGET_PARTY_OTHER is normally edited. But nothing to say about it. I will do a check on getTargetList, as I suppose

Code: Select all

L2Object[] targets = skill.getTargetList(this);
return null where it should return a list of characters.

Here is my doCast, callSkill and getTargetList (see Bureau.rar, 3 txt files inside - why the heck I can't attach a txt/java... :/). It has been heavily modified to fit Gracia look. But still, it's not working (exact problem at exact same line).

I'm on this problem since 1,5 day actually. Ty to any clever answer and/or info. If you need any other part of code, or even full L2Character, just say to me, even if I don't think it's necessary.

If you see aberrations in the code, just tell me too (double code etc) : but don't forget I miss codes (masteries haven't been added for the instant reuse lol), and some parts have been added since IL (staticReuse, toggle skill stuff via charEffectList).

Rem finally it's IL, and some things aren't implemented (drain soul, aura_front / behind).

doCast and callSkill can be found in L2Character, when getTargetList can be found in L2Skill. For getTargetList, the Gracia++ need 3 arguments now, but the 2 arguments one is still used, as for signets use as example.

I'm stupid but the 5076 callSkill error comes to for (L2Object trg : targets), when the 1353 doCast come from callSkill(skill, targets);

To resume : at skill launch, and only on OFFENSIVE type signets, I got a NPE. This NPE refers to targets, which send null when it should send a list of character ? Why ? This is da question :D.

Regards,

Tryskell.

Re: Doomed NPE at Signets.

Posted: Tue Jul 13, 2010 9:55 pm
by JIV
before getTargetlLst return null but now _emptyTargetList (L2Object[0]).

Re: Doomed NPE at Signets.

Posted: Tue Jul 13, 2010 10:43 pm
by Tryskell
Hi JIV,

I remarked aswell this. But in 1836 timeline there isn't such a change. And in 1st time, before the whole signets patch, I had L2Object[] targets = skill.getTargetList(this); line, exactly same writted, and it wasn't buggin anything.

Have I added "myself versus me" this, using Gracia stuff ? Are signets use a particular way of the "targets" list ? I must say I really don't get it. Well, I get the "0" and "null" part, it can explain my problem and I guess it's the essential lol.

I'm gonna try to edit the part you pointed (was strange too for me, but I thought it was an equivalent), but I fear many code will be affected. I do a patch if anything goes wrong... To avoid to loose the 8/12 skills working lol.

Ty for your patience, I will give news soon or later :).

EDIT : Crap, you created a new religion. You're my new God lol. It was related to getTargetList. So if I understood well, all getTargetList related "== null checks" can / must be deleted.

Ty for assist, and death to NPEs :lol:




Tk.