ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Bug Reports (https://www.esoui.com/forums/forumdisplay.php?f=187)
-   -   [fixed] Pasting Too Much Text Crashes The Game (https://www.esoui.com/forums/showthread.php?t=7830)

Phuein 06/02/18 01:22 AM

[fixed] Pasting Too Much Text Crashes The Game
 
As the author of the recent Notebook 2018 addon, I've seen how pasting several paragraphs, especially with a lot of special unicode characters, can crash the game. Freeze and crash. Apparently, a friend had that happen too recently, for the same reason.

This is pertinent to my addon - and addons in general, so I'm posting it here, rather than just another /bug report. :)

Baertram 06/02/18 06:06 AM

I'm not sure where in the game I could post long paragraphs of text so I rather think this is related to an addon? The only place I can think of is the mail send panel but the tetxbox got a maxed size. Are you able to rebuild the crash there without any addon loaded?

Check your addons code, is there any handler OnChanged or OnTextChanged or something like this which is run as the long text is pasted? Maybe disable it and see if the crash still happens then.

sirinsidiator 06/02/18 06:55 AM

I agree with Baertram. The crash could as well be due to your own code taking too long when you paste long unicode texts. Try to create just a plain edit control without any handlers and see if it still happens when you paste the text into that. If that is the case, you could create a thread in the bug reports forum with a small example addon that creates just this box and the text you copy into it to crash the game.

Phuein 06/03/18 12:50 AM

Great suggestions.

This bug doesn't happen with Mail messages, probably because the character limit is pretty tight.

I tried again, removing the OnTextChanged handler from my box, and it still crashes.

This is the code I use (which otherwise works as expected):
Code:

NBUI.NB1RightPage_Contents = WINDOW_MANAGER:CreateControlFromVirtual("NBUI_NB1RightPage_Contents", NBUI.NB1RightPage_ScrollContainer, "ZO_DefaultEditMultiLineForBackdrop")       
        NBUI.NB1RightPage_Contents:SetColor(0, 0, 0, 0.7)               
        NBUI.NB1RightPage_Contents:SetDrawLayer(0)
        NBUI.NB1RightPage_Contents:SetDrawLevel(3)
        NBUI.NB1RightPage_Contents:SetDrawTier(1)       
        NBUI.NB1RightPage_Contents:SetFont("ZoFontBookPaper")
        NBUI.NB1RightPage_Contents:SetMaxInputChars(2048)
        NBUI.NB1RightPage_Contents:SetMultiLine(true)
        NBUI.NB1RightPage_Contents:SetHidden(true)


For the sake of this experiment I just copied and pasted the whole page from:
https://en.wikipedia.org/wiki/List_o...ode_characters

Baertram 06/03/18 08:05 AM

You wrote "which otherwise works as expected".

Does that mean if you paste any other text it works? Are you able to narrow it down to a maximum length or if it really is about "special characters" inside the text?

Does it crash as well if you use the ":SetText()" function with a long text?

Phuein 06/03/18 11:26 PM

Quote:

Originally Posted by Baertram (Post 34933)
You wrote "which otherwise works as expected".

Does that mean if you paste any other text it works? Are you able to narrow it down to a maximum length or if it really is about "special characters" inside the text?

Does it crash as well if you use the ":SetText()" function with a long text?


Good idea. I tried it with 1,000 words of Lorem Ipsum. No special characters. Still crashes same as before.

I've personally had enough of crashes to debug this issue. It's well replicated in code that should be stable. Hopefully, a dev' will notice this and inspect further. Thanks for helping out guys in verifying this bug.

I welcome anyone else to replicate this bug and post here.

ZOS_DanBatson 06/04/18 01:10 PM

I was able to reproduce this issue. I'll look into it, thank you!

ZOS_DanBatson 06/04/18 02:08 PM

A fix has been submitted and should be good to go in the next major update.

Phuein 06/04/18 08:35 PM

Quote:

Originally Posted by ZOS_DanBatson (Post 34956)
A fix has been submitted and should be good to go in the next major update.


What a boss. Amazing attention to addon dev' forums with game features/bugs so far! Bravo! :banana:


All times are GMT -6. The time now is 05:11 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI