Erupe-Legacy icon indicating copy to clipboard operation
Erupe-Legacy copied to clipboard

Not really a problem just a Bug Report? Sigils being equip crashes the game.

Open StarGrabberDee opened this issue 3 years ago • 10 comments

As in the title Equiping a Sigil makes it Crash the game image image

StarGrabberDee avatar Jan 19 '22 23:01 StarGrabberDee

Have you fixed it yet?

YufaWishui avatar Jan 25 '22 08:01 YufaWishui

I have seen the line: "Failed to decompress platedata from db {"error": "EOF"}" in some other issues as well namely #22 and some other issue related to the database somehow. Though do not really have a plan how to fix this sadly.

@StarGrabberDee Is it possible for you to post the error message in plain text and translated to english? You can copy windows error-messages when clicking on the window and hitting CTRL+C then copy this into notepad or somewhere else really. Then you can use https://deepl.com to translate it. It may help get down to the issue (hopefully).

Also if you want to post console-output to github it really helps when you copy the stuff out the cmd. To do that select (or highlight) the text you want to copy with the mouse and right click somewhere in the cmd. You can then copy it into notepad.

For posting the stuff on github you can either put the text into backticks (`) or use the code function in githubs editor. Thank you

Stefan240 avatar Jan 25 '22 09:01 Stefan240

Screenshot_20220124-122554_Google This is the error code translated through Google lens. After it does that it restarts the client and all.

StarGrabberDee avatar Jan 25 '22 14:01 StarGrabberDee

I'll get the other code part soon

StarGrabberDee avatar Jan 25 '22 14:01 StarGrabberDee

Screenshot_20220124-122554_Google This is the error code translated through Google lens. After it does that it restarts the client and all.

nothing that really helps but thank you

Stefan240 avatar Jan 25 '22 14:01 Stefan240

2022-01-25T09:05:48.872-0600 INFO main.channel.127.0.0.1:61068 channelserver/handlers.go:1866 Decompressing... 2022-01-25T09:05:48.873-0600 FATAL main.channel.127.0.0.1:61068 channelserver/handlers.go:1869 Failed to decompress platedata from db {"error": "EOF"} github.com/Andoryuuta/Erupe/server/channelserver.handleMsgMhfSavePlateData C:/Users/darry/Downloads/Erupe-master/Erupe-master/server/channelserver/handlers.go:1869 github.com/Andoryuuta/Erupe/server/channelserver.(*Session).handlePacketGroup C:/Users/darry/Downloads/Erupe-master/Erupe-master/server/channelserver/session.go:189 github.com/Andoryuuta/Erupe/server/channelserver.(*Session).handlePacketGroup C:/Users/darry/Downloads/Erupe-master/Erupe-master/server/channelserver/session.go:194 github.com/Andoryuuta/Erupe/server/channelserver.(*Session).handlePacketGroup C:/Users/darry/Downloads/Erupe-master/Erupe-master/server/channelserver/session.go:194 github.com/Andoryuuta/Erupe/server/channelserver.(*Session).recvLoop C:/Users/darry/Downloads/Erupe-master/Erupe-master/server/channelserver/session.go:149 github.com/Andoryuuta/Erupe/server/channelserver.(*Session).Start.func1 C:/Users/darry/Downloads/Erupe-master/Erupe-master/server/channelserver/session.go:66 exit status 1

StarGrabberDee avatar Jan 25 '22 15:01 StarGrabberDee

Many features such as sigil and transmog(skin) are not implemented. Looking at the handlers, it looks like the process overwrites the saved data currently stored in the DB. If the sigil or transmog(skin_hist?) table in the DB is null, it will crash. There must be some solution to save the saved data if it is not there.

K-Lemu avatar Jan 26 '22 13:01 K-Lemu

Many features such as sigil and transmog(skin) are not implemented. Looking at the handlers, it looks like the process overwrites the saved data currently stored in the DB. If the sigil or transmog(skin_hist?) table in the DB is null, it will crash. There must be some solution to save the saved data if it is not there.

I mean creating the table in the database itself is the easier task tbh. One could just add another migration file for that, which is simple enough really. The problem then would become a) What is the correct name for the table and b) what columns you may need and which values or keys are needed.

If that is solved adding a migration for the issues where something in the database is just not there might be an easy task

Stefan240 avatar Jan 26 '22 14:01 Stefan240

The saveplatebox in Line 1907~ of channelserver/handlers.go contains a process(Line:1921) to create a save to DB, but the saveplatedata in Line 1847~ doesn't have such a process.

  // Decompress
  if len(data) > 0 {
  	// Decompress
  	s.logger.Info("Decompressing...")
  	data, err = nullcomp.Decompress(data)
  	if err != nil {
  		s.logger.Fatal("Failed to decompress savedata from db", zap.Error(err))
  	}
  } else {
  	// create empty save if absent
  	data = make([]byte, 0x820)
  }

I guess, that can just copy the relevant part, but I don't know what value to set for Length in the make function. I looked at other files, but I couldn't find how the len:0x820 of the platebox was determined.

K-Lemu avatar Jan 27 '22 09:01 K-Lemu

The saveplatebox in Line 1907~ of channelserver/handlers.go contains a process(Line:1921) to create a save to DB, but the saveplatedata in Line 1847~ doesn't have such a process.

  // Decompress
  if len(data) > 0 {
  	// Decompress
  	s.logger.Info("Decompressing...")
  	data, err = nullcomp.Decompress(data)
  	if err != nil {
  		s.logger.Fatal("Failed to decompress savedata from db", zap.Error(err))
  	}
  } else {
  	// create empty save if absent
  	data = make([]byte, 0x820)
  }

I guess, that can just copy the relevant part, but I don't know what value to set for Length in the make function. I looked at other files, but I couldn't find how the len:0x820 of the platebox was determined.

Feel free to fork and test this stuff. Sadly I have like no expertise when it comes to go and how all of the ins and outs of the server work.

If you happen to stumble upon a viable solution feel free to drop a PR ^^" (Sadly I can't really assist you with such stuff. Maybe @ricochhet knows more than me on such stuff)

Stefan240 avatar Jan 27 '22 09:01 Stefan240