Quantcast [open] Pasting Too Much Text Crashes The Game - ESOUI
Thread Tools Display Modes
06/02/18, 01:22 AM   #1
Phuein
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 41
[open] 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.
  Reply With Quote
06/02/18, 06:06 AM   #2
Baertram
 
Baertram's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 1,665
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.

Last edited by Baertram : 06/02/18 at 06:58 AM.
  Reply With Quote
06/02/18, 06:55 AM   #3
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,087
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.
__________________
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
  Reply With Quote
06/03/18, 12:50 AM   #4
Phuein
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 41
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
  Reply With Quote
06/03/18, 08:05 AM   #5
Baertram
 
Baertram's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 1,665
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?
  Reply With Quote
06/03/18, 11:26 PM   #6
Phuein
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 41
Originally Posted by Baertram View Post
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.
  Reply With Quote
06/04/18, 01:10 PM   #7
ZOS_DanBatson
ZOS Staff!
 
ZOS_DanBatson's Avatar
Yes this person is from ZeniMax!
Join Date: Jul 2015
Posts: 27
I was able to reproduce this issue. I'll look into it, thank you!
  Reply With Quote
06/04/18, 02:08 PM   #8
ZOS_DanBatson
ZOS Staff!
 
ZOS_DanBatson's Avatar
Yes this person is from ZeniMax!
Join Date: Jul 2015
Posts: 27
A fix has been submitted and should be good to go in the next major update.
  Reply With Quote
06/04/18, 08:35 PM   #9
Phuein
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 41
Originally Posted by ZOS_DanBatson View Post
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!
  Reply With Quote

ESOUI » Developer Discussions » Bug Reports » [open] Pasting Too Much Text Crashes The Game

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off