Newbie Spellweaver
- Joined
- Jan 25, 2014
- Messages
- 40
- Reaction score
- 0
Hi, guild isn't updating properly (Rev 120) It is buggy, players still shown online although they have logged off, is there a fix for it? Thanks in advance.
Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!
Join Today!Hi, guild isn't updating properly (Rev 120) It is buggy, players still shown online although they have logged off, is there a fix for it? Thanks in advance.
if (bl != null) {
if (!this.serverTransition) {
worlda.loggedOff(player.getName(), player.getId(), channel, player.getBuddylist().getBuddyIds());
} else {
worlda.loggedOn(player.getName(), player.getId(), channel, player.getBuddylist().getBuddyIds());
}
}
if (player.getGuildId() > 0) {
Server.getInstance().setGuildMemberOnline(player.getMGC(), false, -1);
}
com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
at com.mysql.jdbc.Util.getInstance(Util.java:384)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1066)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3562)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3494)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1960)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2114)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2696)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2105)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2398)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2316)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2301)
at client.inventory.ItemFactory.saveItems(ItemFactory.java:143)
at server.CashShop.save(CashShop.java:445)
at client.MapleCharacter.saveToDB(MapleCharacter.java:3795)
at client.MapleClient.disconnect(MapleClient.java:627)
at net.MapleServerHandler.sessionClosed(MapleServerHandler.java:105)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.sessionClosed(DefaultIoFilterChain.java:642)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextSessionClosed(DefaultIoFilterChain.java:382)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$900(DefaultIoFilterChain.java:47)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.sessionClosed(DefaultIoFilterChain.java:750)
at org.apache.mina.filter.codec.ProtocolCodecFilter.sessionClosed(ProtocolCodecFilter.java:369)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextSessionClosed(DefaultIoFilterChain.java:382)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$900(DefaultIoFilterChain.java:47)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.sessionClosed(DefaultIoFilterChain.java:750)
at org.apache.mina.core.filterchain.IoFilterAdapter.sessionClosed(IoFilterAdapter.java:88)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextSessionClosed(DefaultIoFilterChain.java:382)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireSessionClosed(DefaultIoFilterChain.java:375)
at org.apache.mina.core.service.IoServiceListenerSupport.fireSessionDestroyed(IoServiceListenerSupport.java:244)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.removeNow(AbstractPollingIoProcessor.java:600)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.removeSessions(AbstractPollingIoProcessor.java:560)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$800(AbstractPollingIoProcessor.java:67)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1132)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1075)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3562)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3494)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1960)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2114)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2696)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2105)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2398)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2316)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2301)
at client.inventory.ItemFactory.saveItems(ItemFactory.java:143)
at server.CashShop.save(CashShop.java:445)
at client.MapleCharacter.saveToDB(MapleCharacter.java:3795)
at net.server.channel.handlers.EnterCashShopHandler.handlePacket(EnterCashShopHandler.java:47)
at net.MapleServerHandler.messageReceived(MapleServerHandler.java:127)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:690)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765)
at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:407)
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:236)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765)
at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:109)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:410)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:710)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:664)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:653)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:67)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1124)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Thanks! It worked, however there's deadlock found. This wasn't affected by the guild in MapleClient, before this, it already happened. This bunch of text is found in logs > error > saveToDB.txt :
The only good fix is sql related. You should add more indexes in tables and make better relations between them.If you create a lock around the source of the problem in ItemFactory (and make sure it is a fair lock), then it should bandage the problem enough to where you won't have it happen again. The main theory (no idea if this is correct) is that there are some race conditions on the SQL server's side that prevent that portion from actually executing on time; it not certain if this is a result of the connection being outside of an auto-commit configuration for a while or not. You can generally see this happen frequently if more than one person changes their channel at a time.
Another one of the fun things that happens (I did not discover this one, Twdtwd did) in ItemFactory.java is that none of the equipment are removed upon saving. If you want me to prove this to you, just look at the size of your equipment table versus your general items table. There should never be more rows in the equipment table since an equip is inserted into both tables (and you will see this is not the case at all).
This source has way too many problems because of Kevin periodically breaking things over and over again. You will run into far less problems in the long run if you avoid using this source especially since this source has all of the same problems original OdinMS has PLUS more bugs and exploits MINUS scalability (i.e. you would be lucky to even be able to host 50 players on this without it just burning to the ground).@ Zygon, how do i create a lock in ItemFactory? I don't understand what you're trying to say in the second paragraph, shouldn't be a problem as long as there are no roll-backs.
Yes, because the code you've added over time is so damn perfect it always works - just need to tinker with things that aren't in the source. Sarcasm aside, considering your track record of breaking things and then going back to fix them over and over again, it isn't a surprise that your code quality is literally on par with garbage. Also, your "solution" does not even address the latter portion of my post: the fact equips do not get deleted despite the fact they get inserted rather than updated; indexing doesn't fix that leak.The only good fix is sql related. You should add more indexes in tables and make better relations between them.
SELECT * FROM inventoryitems;
-->
/* Affected rows: 0 Found rows: 699 Warnings: 0 Duration for 1 query: 0.000 sec. */
SELECT * FROM inventoryequips;
-->
/* Affected rows: 0 Found rows: 486 Warnings: 0 Duration for 1 query: 0.000 sec. */
SELECT COUNT(*) FROM inventoryitems WHERE characterid = 8527;
--> 171
SELECT COUNT(*) FROM (SELECT * FROM inventoryitems LEFT JOIN inventoryequips USING (inventoryitemid) WHERE inventoryequipid IS NOT NULL AND characterid = 8527) as MyEquips;
--> 109
DELETE FROM inventoryitems WHERE characterid = 8527;
-->
/* Affected rows: 171 Found rows: 0 Warnings: 0 Duration for 1 query: 0.156 sec. */
SELECT COUNT(*) FROM (SELECT * FROM inventoryitems LEFT JOIN inventoryequips USING (inventoryitemid) WHERE inventoryequipid IS NOT NULL AND characterid = 8527) as MyEquips;
--> 0
Well you know, when I created this source I had absolutely know knowledge of Java. I do have that right now and that is why I am completely revamping everything. I might forget some parts, but my goal is to have a complete 'new' source that is almost 100% bugfree.This source has way too many problems because of Kevin periodically breaking things over and over again. You will run into far less problems in the long run if you avoid using this source especially since this source has all of the same problems original OdinMS has PLUS more bugs and exploits MINUS scalability (i.e. you would be lucky to even be able to host 50 players on this without it just burning to the ground).
The reason why the latter part of my previous post is a problem is because you end up with >1 million rows in your equipment table because they don't get deleted. If you don't understand why this is bad, then you seriously need to reconsider even bothering with this game's emulation scene.
You know what, just keep using this source. No one is going to be able to lend you a hand when running a server regardless of what source you use. This is especially true of Kevin since he doesn't give a damn if this source is actually bad or not. As long as it has features, the kiddies will come and grab it and thank him for literally giving them a pile of feces to smear all over player's faces when they find out their time investment was a joke to begin with when script kiddies can literally do whatever they want due to all of the latent exploits in this source.
Yes, because the code you've added over time is so damn perfect it always works - just need to tinker with things that aren't in the source. Sarcasm aside, considering your track record of breaking things and then going back to fix them over and over again, it isn't a surprise that your code quality is literally on par with garbage. Also, your "solution" does not even address the latter portion of my post: the fact equips do not get deleted despite the fact they get inserted rather than updated; indexing doesn't fix that leak.
Well you know, when I created this source I had absolutely know knowledge of Java. I do have that right now and that is why I am completely revamping everything. I might forget some parts, but my goal is to have a complete 'new' source that is almost 100% bugfree.
If you want to complain about ItemFactory, you might as well just contact Flav.
This is the nature of open source development. No individual can hope to have more than a small impact, and I don't believe Kevin ever claimed otherwise. (At least not in this thread.) Everyone has to start somewhere, and programming skills are something that is built up over years with experience in multiple projects. It's pretty ridiculous to judge someone's ability solely based on their work from years ago. I know every year I gain more programming experience and I consistently am adjusting my ideas of good design; thus, anything I made more than a year ago almost always looks like trash. At least wait until the next revision, and don't judge old code.I don't know if this is clear to you or not, but you did not create this emulator. Your contributions are pretty much absolutely nothing compared to the complete workings of the original emulator this is a fork of. I honestly will never take you seriously if you believe that your contributions to this emulator have made such an impact as for you to believe that your work is paramount compared to the original authors'.
Also, if you base your work around what you have now, it will almost certainly fail to be better. Of course, you would never know this since most of the problems incurred with this source are much more obvious when brought to a live environment; which I am almost certain you never really have done extensive debugging for this.
Mm idk, a few months ago?Hey Kev! When the eta for snapshot 121?
No etaHey Kev! When the eta for snapshot 121?
The progress is currently very very slow. I am quite busy with school at the moment and I've gained intereset in making a bot for Clash of Clans. However, whenever I get more time, I will certainly start coding again and I will probably make a new repository so you can track all updates!
Hey Kev! When the eta for snapshot 121?
I realize that and I was testing it out, and give him my feedback, I was seeing how the progress was and if he had an ETA yet.He shared a snapshot back in December 2014: https://forum.ragezone.com/redirect-to/?redirect=http://www.mooplestory.com/MoopleDEVss121.rar
This is the nature of open source development. No individual can hope to have more than a small impact, and I don't believe Kevin ever claimed otherwise. (At least not in this thread.) Everyone has to start somewhere, and programming skills are something that is built up over years with experience in multiple projects. It's pretty ridiculous to judge someone's ability solely based on their work from years ago. I know every year I gain more programming experience and I consistently am adjusting my ideas of good design; thus, anything I made more than a year ago almost always looks like trash. At least wait until the next revision, then judge away.
However, keep in mind that there were many people who worked on OdinMS and its forks before Kevin and his work. (As you have already pointed out.) This also means they created numerous problems, and it's quite unfair to expect one individual to fix all of those problems. Code design is an imperfect art, and any judgment on it is highly subjective.
Really now? You want to come to me about making contributions? I've had way more projects publicly released than Kevin has and you want to talk to ME about making contributions to this community? Seriously? The difference between your perceived reality and the actual one is that Kevin doesn't try: he has made absolutely 0 progress in becoming better at programming in general and that is incredibly evident in everything he's done - more particularly hasn't done - in the snapshot he's provided from the next revision. There's no possible way you can argue with that if you've actually LOOKED at the code in the snapshot.If you are truly concerned about the quality of code, the most constructive thing you can possibly do is make your own contributions, do the best you can, and release the code. At least Kevin is doing that. It's not constructive at all to trash somebody else for trying.