How to crash client with haven error

The worst monsters in the Hearthlands warp the fabric of space and time..

How to crash client with haven error

Postby kobnach » Fri Aug 28, 2009 7:28 am

Be chatting in party
Have other party member log out, as you are typing a message
kobnach
 
Posts: 671
Joined: Wed Jun 10, 2009 5:04 am

Re: How to crash client with haven error

Postby loftar » Fri Aug 28, 2009 1:57 pm

Oooh, I see. I've been seeing the chat widget a lot in the error reports, but I didn't know that was what caused it. Thanks!
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9045
Joined: Fri Apr 03, 2009 7:05 am

Re: How to crash client with haven error

Postby kobnach » Fri Aug 28, 2009 6:40 pm

Glad to help. It took a while for me to spot the pattern.
kobnach
 
Posts: 671
Joined: Wed Jun 10, 2009 5:04 am

Re: How to crash client with haven error

Postby Blaze » Sat Aug 29, 2009 9:05 am

I've already mentioned this before: viewtopic.php?f=4&t=595&p=5095

Also, if the last non-leading member of the party joins a different party without leaving the first one, the leader will be stuck with a party chat menu and cannot leave it.
You see a masterful engraving by Blaze. On it is Blaze, bears, boars, and foxes. Blaze is striking down the bears. The boars are screaming. The foxes are in a fetal position. The image relates to the return of Blaze in the late winter of 2009.
User avatar
Blaze
 
Posts: 1072
Joined: Sun May 31, 2009 3:59 am
Location: Hearth

Re: How to crash client with haven error

Postby kobnach » Sat Aug 29, 2009 6:01 pm

Blaze wrote:I've already mentioned this before: viewtopic.php?f=4&t=595&p=5095

Also, if the last non-leading member of the party joins a different party without leaving the first one, the leader will be stuck with a party chat menu and cannot leave it.


oh! That's how I got the party of one the other day.
kobnach
 
Posts: 671
Joined: Wed Jun 10, 2009 5:04 am

Re: How to crash client with haven error

Postby ZestyLemons » Wed Sep 02, 2009 2:56 am

If you enter a message that is too long as well, it crashes you and everyone in your party
One day I hope to start a village. It shall be called 'Fruit Town'
User avatar
ZestyLemons
 
Posts: 58
Joined: Tue Aug 11, 2009 9:49 pm

Re: How to crash client with haven error

Postby loftar » Wed Sep 02, 2009 3:21 am

ZestyLemons wrote:If you enter a message that is too long as well, it crashes you and everyone in your party

Yeah, I know (though actually, it's one word that needs to be too long)... that really does needs to be fixed, but it requires me finding out how to actually measure text and such stuff in Java. The current line-wrapping code is terribly ugly and buggy because I haven't yet manage to gather the will-power to penetrate further into Java's text and font library. It also ties in with creating multi-line and styled tooltips.

Hey -- the client is open source. Any takers? :)
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9045
Joined: Fri Apr 03, 2009 7:05 am

Re: How to crash client with haven error

Postby theTrav » Wed Sep 02, 2009 3:32 am

loftar wrote:Hey -- the client is open source. Any takers? :)

Heh, I'll take a look at it after I've got custom resource packs working (looked at it last night and you were right, you do already come really close to allowing for it, the version field is the only restriction)

Of course my quick fix will probably be to truncate words at an arbitrary length and just drop a heap of data. Blame the users, it's all their fault :P
User avatar
theTrav
 
Posts: 3464
Joined: Fri May 29, 2009 11:25 pm

Re: How to crash client with haven error

Postby theTrav » Sat Sep 05, 2009 3:39 pm

bug patched and pushed to my fork of your github code base.

Solution I've done is kind of rough but functional.

iterate through all words in text entered
if word can be added to current line add it
else, if current line has words, end current line, then recurs on the new word
if line is empty and word does not fit on it, split the word in half, recurs on each half in order

it can lead to some odd looking wraps, but only when you put in massive strings of text. To be honest, strings that massive are going to look odd no matter what.
User avatar
theTrav
 
Posts: 3464
Joined: Fri May 29, 2009 11:25 pm

Re: How to crash client with haven error

Postby loftar » Sat Sep 05, 2009 6:38 pm

Cool, I'll probably apply it as a fix until I will myself to look up the real text measuring APIs. Thanks!

I have to ask, though -- why are you using an Indir<StringBuffer> instead of just a StringBuffer?
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9045
Joined: Fri Apr 03, 2009 7:05 am

Next

Return to Bugs

Who is online

Users browsing this forum: Claude [Bot] and 0 guests