Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account
This post has been closed. You can still view previous posts, but you can't post any new replies.

Unresponsive Script freezing Firefox

I have had this problem before but for the last month it got even worse. The game freezes up for up to 10 seconds, then I get the error message (see pics attached), I pick "stop script" and check the box "don't ask me about this again" and yet after a minute or so the message repeats again. My 2nd picture has all the specs. The said problem happens only when I open my character journal, making the game difficult to play as I have a character sheet with all the info in it, including the rolls. The game is called D&D Tales from Ezris, we are using D&D 5e character sheets. The problem happens only in this game, and out of everyone else in the group I'm the only one who experiences it. I have also clicked "debug script" once, and copied the line that was highlighted, not sure if this will help: ;e.$el.find(".attributes .body").append(t.view.$el),t.view.rebindEvents(e.model),t.view.$el.find(".attrname").trigger("click")}),this.$el.on("click",".addabil",function(){var t=0;e.model.abilities.each(function(e){-1!==e.get("name").indexOf("New Ability")&&t++});var i=e.model.abilities.create({name:"New Ability "+t});e.$el.find(".abilities .body").append(i.view.$el),i.view.rebindEvents(e.model),i.view.$el.find(".abilname").trigger("click")}),this.allTabs={};var t,i;this.$el.on("click",".nav li a",function(){if(e.allTabs){t&&t.removeClass("active"),i&&(i.style.display="none");var n=$(this).attr("data-tab");e.allTabs[n]&&(e.allTabs[n].style.display="block",i=e.allTabs[n],$(this).parent().addClass("active"),t=$(this).parent())}}),this.$el[0].addEventListener("blur",function(t){var i=$(t.target);i.parentsUntil(this.$el,".charsheet").length&gt;0&&(i.is("input[type=text]")||i.is("input[type=number]")||i.is("textarea"))&&e.saveSheetValues(i[0])},!0),this.$el.on("click",".charsheet input[type=number]",function(){var e=$(this);e.is(":focus")||e.focus()}),this.$el.on("keyup",".charsheet input[type=text], .charsheet input[type=number]",function(e){13==e.which&&$(this).trigger("blur")}),this.$el.on("click",".charsheet .btn",function(){void 0!==document.activeElement&&void 0!==document.activeElement.name&&document.activeElement.name.length&gt;0&&document.activeElement.blur()}),this.$el.on("click","a",function(){var e=$(this).attr("href");if(-1!==e.indexOf("journal.roll20.net")){var t=e.split("/")[3],i=e.split("/")[4],n=d20.Campaign[t+"s"].get(i);if(n){var r=n.get("inplayerjournals").split(",");(window.is_gm||-1!==_.indexOf(r,"all")||window.currentPlayer&&-1!==_.indexOf(r,window.currentPlayer.id))&&n.view.showDialog()}return $("#existing"+t+"s").find("tr[data-"+t+"id="+i+"]").trigger("click"),!1}}),this.$el.on("change",".charsheet select",function(){e.saveSheetValues(this)}),this.$el.on("click",".charsheet input[type=checkbox], .charsheet input[type=radio]",function(){e.saveSheetValues(this)}),this.$el.on("click",".charsheet .repcontrol_add",function(){var e=$(this).parents(".repcontrol").prev(".repcontainer"),t=e.find(".repitem").length,i=e.prev("fieldset").html(),n=$(" "+i+" "),r=e.attr("data-groupname");n.find("input[type=radio]").each(function(){var e=$(this),i=e.attr("name").substring(5,e.attr("name").length);e.attr("name","attr_"+t+"_"+r+"_"+i),e.attr("data-attrname",i)}),e.append(" # "+n.html()+" ")}),this.$el.on("click",".charsheet .repcontrol_edit",function(){var e=$(this).parents(".repcontrol").prev(".repcontainer");e.hasClass("editmode")?(e.removeClass("editmode"),$(this).text("Modify"),$(this).next(".repcontrol_add").show()):(e.addClass("editmode"),$(this).text("Done"),$(this).next(".repcontrol_add").hide())}),this.$el.on("click",".charsheet .repcontrol_del",function(){var t=$(this).parents(".repitem"),i=$(this).parents(".repcontainer"),n=i.find(".repitem").index(t);t.remove(),e.saveAllRepeatingGroup(i,n)}),this.$el.on("click",".charsheet button[type=roll]",function(t){t.preventDefault();var i=$(this).parents(".repitem").length&gt;0?!0:!1,n={};i&&$(this).parents(".repitem").find('*[name^="attr_"]').each(function(){var e=$(this),t=void 0!==e.attr("data-attrname")?e.attr("data-attrname"):e.attr("name").substring(5,e.attr("name").length);"input"===e[0].tagName.toLowerCase()&&"checkbox"===e.attr("type")?(void 0===n[t.toLowerCase()]&&(n[t.toLowerCase()]="0"),e.is(":checked")&&(n[t.toLowerCase()]=d20.utils.strip_tags(e.attr("value")))):"input"===e[0].tagName.toLowerCase()&&"radio"===e.attr("type")?e.is(":checked")&&(n[t.toLowerCase()]=d20.utils.strip_tags(e.attr("value"))):n[t.toLowerCase()]=d20.utils.strip_tags(e.val())});var r=d20.utils.strip_tags($(this).attr("value"));r=r.split("\\n").join("\n");for(var o=0;99&gt;o;o++){var a;if(r=r.replace(/@{[^}]+}/g,function(t){var r=t.split("|");if(1===r.length||2===r.length&&"max}"===r[1].toLowerCase()){var o=t.substring(2,t.length-1);if(i){var a=2===r.length&&"max}"===r[1].toLowerCase()?r[0].substring(2,r[0].length)+"_max":o;if(void 0!==n[a.toLowerCase()])return n[a.toLowerCase()]}var s="@{"+e.model.get("name")+"|"+o+"}";return s}return t}),r===a)break;a=r}a=null,d20.textchat.doChatInput(r),r=null})},addBlob:function(e){var t=this;this.$el.find("."+e).html("Loading..."),this.model._getLatestBlob(e,function(i){var n=d20.utils.handleHTMLOutput(i,!0),r=!1;"SINGLESPACED!!"==n.substring(0,14)&&(n=n.substring(14,n.length),r=!0),t.$el.find("."+e).html(n),r&&t.$el.find("."+e).addClass("singlespaced")})},render:function(){var e=(new Date).getTime();console.log("--- RENDER CHARACTIVE VIEW ----");var t=this,i=this.$el.find(".nav li.active a");if(i=i.length&gt;0?i.attr("data-tab"):!1,this.$el.html(this._template.jqote(this.model)),this.$el.attr("data-characterid",this.model.id),this.$el.find(".nav li a").each(function(){t.allTabs[$(this).attr("data-tab")]=t.$el.find(".tab-pane."+$(this).attr("data-tab"))[0],t.allTabs[$(this).attr("data-tab")].style.display="none",$(this).parent().removeClass("active")}),this.addBlob("bio"),window.is_gm&&this.addBlob("gmnotes"),i?this.$el.find(".nav li a[data-tab="+i+"]").trigger("click"):this.$el.find(".nav li:first-child a").trigger("click"),this.model.currentPlayerControls()){$attrtable=this.$el.find(".attributes .body"),$abiltable=this.$el.find(".abilities .body"),$attrtable.addClass("editable"),$abiltable.addClass("editable");var n=this.model.get("attrorder").split(","),r=_.sortBy(this.model.attribs.models,function(e,t){var i=n.indexOf(e.id);return-1===i?t+1e3:i});_.each(r,function(e){return-1!==e.get("name").toLowerCase().indexOf("repeating_")?!0:(e.view.$el.appendTo($attrtable),void e.view.rebindEvents(t.model))});var n=this.model.get("abilorder").split(","),r=_.sortBy(this.model.abilities.models,function(e,t){var i=n.indexOf(e.id);return-1===i?t+1e3:i});_.each(r,function(e){e.view.$el.appendTo($abiltable),e.view.rebindEvents(t.model)}),$attrtable.sortable({items:".attrib",handle:".handle",distance:5,update:function(){var e=[];$attrtable.find(".attrib").each(function(){var t=$(this).attr("data-attrid");e.push(t)}),t.model.save({attrorder:e.join(",")})},axis:"y"}),$abiltable.sortable({items:".abil",handle:".handle",distance:5,update:function(){var e=[];$abiltable.find(".abil").each(function(){var t=$(this).attr("data-abilid");e.push(t)}),t.model.save({abilorder:e.join(",")})},axis:"y"}),this.$el.find(".draggableresult").draggable({revert:!0,distance:10,revertDuration:0,helper:"clone",appendTo:"body",scroll:!1}).addTouch(),this.$charsheet=this.$el.find(".charsheet"),this.$sheetform=this.$el.find(".sheetform"),this.$charsheet.length&gt;0&&d20.journal.useCustomSheets&&(console.log("Redoing charsheet html"),this.$charsheet.remove(),this.$charsheet.html(d20.journal.customSheets.layouthtml),t.setupRepeatingControls(),window.is_playerapp||t.$charsheet.find("button[type=roll]").draggable({revert:!0,distance:10,revertDuration:0,helper:"clone",appendTo:"body",scroll:!1,cancel:!1,connectToSortable:"#macrobar_macros",start:function(){return t.childWindow?!1:void $(this).attr("data-characterid",t.model.id)}}).addTouch(),t.updateSheetValues("all")),console.log((new Date).getTime()-e+"ms to end of html")}},_updateSheetValues:function(){if(console.log("Updating character sheet values"),this.$charsheet){var e=(new Date).getTime();this._ignoreSheetSaves=!0;var t=this,i={};this.$charsheet.find("fieldset").each(function(){var e=" # "+$(this).html()+" ",n=$(this).next(".repcontainer"),r=n.attr("data-groupname");if(n.length&lt;1||""===r)return!0;var o=r+"_",a={};t.model.attribs.each(function(e){if(e.get("name").toLowerCase().substring(0,o.length)===o.toLowerCase()){var t=e.get("name").toLowerCase().split("_"),i=e.get("name").substring(o.length+t[2].length+1,e.get("name").length);a[t[2]+""]||(a[t[2]+""]={}),a[t[2]+""][i.toLowerCase()]={current:e.get("current"),max:e.get("max")}}}),a=_.sortBy(a,function(e,t){return parseInt(t,10)});var s=_.keys(a).length,l=n.find(".repitem").length;if(l&gt;s)n.find(".repitem:gt("+(s-1)+")").remove();else if(s&gt;l)for(var c=$(e),h=l;s&gt;h;h++)c.find("input[type=radio]").each(function(){var e=$(this),t=e.attr("data-attrname")||e.attr("name").substring(5,e.attr("name").length);e.attr("name","attr_"+h+"_"+r+"_"+t),e.attr("data-attrname",t)}),n.append(c.html());i[r]=a,a=null});var n=function(e,i){if(!(i&gt;99)){if(d20.journal.customSheets.attrDeps[e])for(var r=0;r a;a++)n(t._dirtySheetAttributes[a].toLowerCase(),1);var s=this.$charsheet[0].querySelectorAll('*[name^="attr_"]');_.each(s,function(e){var n=e.getAttribute("data-attrname"),o=e.name,a=null!==n?n:o.substring(5,o.length);if(-1===t._dirtySheetAttributes.indexOf(a.toLowerCase())&&r===!1)return!0;var s=$(e);if(s.parentsUntil(t.$charsheet,"fieldset").length&gt;0)return!0;var l,c=s.parentsUntil(t.$charsheet,".repcontainer");c.length&gt;0&&(l=c.find(".repitem").index(s.parentsUntil(c,".repitem")),a=c.attr("data-groupname")+"_"+l+"_"+a);var h,d="current",u=a.split("_");"max"===u[u.length-1]&&(d="max",a=a.substring(0,a.length-4));var p;if("character_name"===a)p=t.model.get("name");else if(s.attr("disabled")){var f=s.attr("data-formula");try{var g={};c.length&gt;0&&(h=c.attr("data-groupname"),void 0!==l&&i[h]&&i[h].length&&i[h][l]&&(g=i[h][l]),h+="_"),p=t.model.autoCalcFormula(f,g,h),void 0!==s.data("data-prev-value")&&s.data("data-prev-value")!=p&&t.model.updateTokensByName(a),s.data("data-prev-value",p)}catch(m){console.log("ERROR parsing formula: "+f),console.log(m)}}else t.model.attribs.each(function(e){return e.get("name").toLowerCase()===a.toLowerCase()?(void 0!==e.get(d)&&""!==e.get(d)&&(p=e.get(d)),!1):void 0});void 0!==p&&("string"==typeof p&&-1!==p.indexOf("@{")&&d20.journal.updateSheetDeps(a,p),"input"===s[0].tagName.toLowerCase()&&"checkbox"===s.attr("type")?p==s.attr("value")?s.attr("checked","checked"):s.removeAttr("checked"):"input"===s[0].tagName.toLowerCase()&&"radio"===s.attr("type")?p==s.attr("value")?s.attr("checked","checked"):s.removeAttr("checked"):s.val()!==p&&s.val(p))}),i=null,this._ignoreSheetSaves=!1,t._dirtySheetAttributes=[],0==this.$sheetform.find(".charsheet").length&&(console.log("Appending to sheetform"),this.$sheetform.append(this.$charsheet)),console.log("Took "+((new Date).getTime()-e)+"ms")}},saveSheetValues:function(e){if(this._ignoreSheetSaves)return void console.log("Ignoring saves...");var t=this,i=$(e);if(void 0!=i.attr("name")&&-1!==i.attr("name").indexOf("attr_")&&!i.attr("disabled")){var n=!1,r="current",o=void 0!==i.attr("data-attrname")?i.attr("data-attrname"):i.attr("name").substring(5,i.attr("name").length),a=i.parentsUntil(t.$charsheet,".repitem");if(a.length&gt;0){var s=a.parentsUntil(t.$charsheet,".repcontainer");o=s.attr("data-groupname")+"_"+s.find(".repitem").index(a)+"_"+o}if("_max"===o.substring(o.length-4,o.length)&&(r="max",o=o.substring(0,o.length-4)),"character_name"===o.toLowerCase())return void this.model.save({name:d20.utils.strip_tags(i.val())});this.model.attribs.each(function(e){return e.get("name").toLowerCase()===o.toLowerCase()?(n=e,!1):void 0});var l={};l[r]=d20.utils.strip_tags("input"===i[0].tagName.toLowerCase()&&"checkbox"===i.attr("type")?i.is(":checked")?i.attr("value"):"0":"input"===i[0].tagName.toLowerCase()&&"radio"===i.attr("type")?i.attr("value"):i.val());var c=""===l[r]||void 0===l[r]?!0:!1;if(n)n.syncedSave(l);else{if(c)return;l.name=o;var h=this.model.attribs.create(l);h.syncedSave(l),-1===l.name.indexOf("repeating_")&&t.$el.find(".attributes .body").append(h.view.$el),h.view.rebindEvents(this.model)}}},saveAllRepeatingGroup:function(e,t){if(!this._ignoreSheetSaves){var i=this,n=0;e.find(".repitem").each(function(){var e=$(this);return t&&t&gt;n?(n++,!0):(e.find('*[name^="attr_"]').each(function(){var e=$(this);i.saveSheetValues(e[0])}),void n++)});var r=e.attr("data-groupname")+"_",o=[];this.model.attribs.each(function(e){if(e.get("name").toLowerCase().substring(0,r.length)===r.toLowerCase()){var t=parseInt(e.get("name").split("_")[2],10);t&gt;n-1&&o.push(e)}});for(var a=0;a<o.length;a++)o[a].destroy()}},setuprepeatingcontrols:function(){this.$charsheet.find("fieldset").each(function(){var e,t="this.classList;return" _.each(t,function(t){return"repeating_"="==t.substring(0,10)?(e=t.toLowerCase().replace(&quot;'&quot;,&quot;&quot;&quot;),!1):void" 0}),e?($(this).hide(),$(this).after(" Modify +Add "),void $(this).after("")):!0})},showDialog:function(e){if(console.log("Show Character View Dialog!"),this.childWindow){if(null!==this.childWindow.top)return console.log("Already has child window!"),void this.childWindow.focus();console.log("Orphaned child window."),this.$el.remove(),this.rebindViewEvents(),this.needsRebind=!0,this.childWindow=null}if(!$(this.el).is(":visible")){var t=this;if(t.render(),!e&&window.currentPlayer.get("usePopouts")===!0||"waspopout"==e)return void this.showPopout();var i=this.model.get("name");i=" | "+i,window.is_gm?i+=" Show to Players Edit ":this.model.currentPlayerControls()&&(i+=" Edit ");var n=500;window.is_gm&&(n=750);var r=$(window).height()-playerZoneHeight();r&gt;n&&(r=n);var o=900,a=$(window).width()-100;a&gt;o&&(a=o);var s=$(this.el).parent(),l=["center",30];s.length&gt;0&&s.hasClass("ui-dialog")&&(l=[parseInt(s.css("left").replace("px",""),10),parseInt(s.css("top").replace("px",""),10)],a=parseInt(s[0].style.width.replace("px",""),10)+1,r="auto"===s[0].style.height?r:parseInt(s[0].style.height.replace("px",""),10)+9),$(this.el).dialog({modal:!1,width:a,height:r,position:l,title:i,zIndex:10500,beforeClose:function(){var e=this;setTimeout(function(){t.childWindow||$(e).find(".tab-content").html("")},100)}}),this.$el.parent().find(".ui-dialog-titlebar button").on("mousedown",function(){return!1});var c=$(this.el).parent();c.length&gt;0&&c.hasClass("ui-dialog")&&(c[0].style.height=r+"px")}},showPopout:function(){var e=this,t=e.$el.parent(),i=900,n=750;console.log(e.$el),console.log(t),t.hasClass("ui-dialog")&&e.$el.hasClass("ui-dialog-content")&&(console.log("Was a dialog!"),i=t.width(),n=t.height(),e.$el.dialog("destroy")),this.childWindow=window.open("/editor/popout","Popout"+e.model.id,"menubar=0,location=0,toolbar=0,status=0,scrollbars=1,width="+i+",height="+n),window.allChildWindows.push(this.childWindow),this.childWindow.onload=function(){d20.journal.customSheets&&d20.journal.customSheets.styleel&&(console.log("Setting style element in child window."),$(d20.journal.customSheets.styleel).clone().appendTo(e.childWindow.document.head)),e.$el.appendTo(e.childWindow.document.getElementById("containerdiv")),e.childWindow.document.title=e.model.get("name"),e.$el.show().css("height","auto"),e.model.currentPlayerControls()&&(e.childWindow.document.getElementById("editobject").style.display="block",e.childWindow.document.getElementById("editobject").addEventListener("click",function(){console.log("Heard edit!");var t=e.model;t?(t.editview.showDialog("waspopout"),t.view.childWindow.close(),setTimeout(function(){window.focus()},500)):alert("ERROR: Unable to find character to edit.")}))},this.childWindow.onbeforeunload=function(){e.$el.appendTo(t.hasClass("ui-dialog")?t:$("body")),e.$el.find(".tab-content").html(""),e.$el.hide(),window.allChildWindows=_.without(window.allChildWindows,e.childWindow),e.childWindow=null}}}),d20.models.AbilityModel=Backbone.Model.extend({defaults:{name:"Untitled_Ability",description:"",action:"",order:-1,istokenaction:!1},initialize:function(){if(this.id)this.persisted=!0;else{var e=generateUUID();this.set({id:e}),this.url=this.collection.url+e}this.view=new d20.models.AbilityView({model:this})},isNew:function(){return!this.persisted}}),d20.models.AbilityCollection=Backbone.Collection.extend({model:d20.models.AbilityModel,initialize:function(){this.on("add remove change:name",function(){d20.player_settings&&d20.player_settings.debounced_refreshMacroBar()})}}),d20.models.AbilityView=Backbone.View.extend({_template:$("#tmpl_cs_ability"),initialize:function(){_.bindAll(this,"render");var e=this;this.$el.addClass("abil"),this.$el.attr("data-abilid",this.model.id),this.model.bind("remove",function(){e.$el.remove()}),this.model.bind("change",function(){e.render()}),e.render()},render:function(){this.$el.html(this._template.jqote(this.model)),this.$el.find(".action").val(this.convertForTokenizer(d20.utils.strip_tags(this.model.get("action")))),this.model.get("istokenaction")&&this.$el.find(".istokenaction").attr("checked","checked");var e=window.currentPlayer.get("macrobar");-1!==e.indexOf(this.model.id)?this.$el.find(".showinmacrobar").attr("checked","checked"):this.$el.find(".showinmacrobar").removeAttr("checked")},rebindEvents:function(e){var t=this;this.$el.on("click",".editabil",function(){if(t.$el.parentsUntil(".ui-dialog",".body").hasClass("editable")){t.$el.addClass("editing");var e=t.$el.find(".abilname");e.html(" "),e.find("input").val(t.model.get("name")).focus()}}),this.$el.on("click",".saveabil",function(){if(t.$el.parentsUntil(".ui-dialog",".body").hasClass("editable")){t.$el.removeClass("editing"),t.saveValues();var e=t.$el.find(".abilname");e.text(t.model.get("name"))}}),this.$el.on("click",".deleteabil",function(){if(t.$el.parentsUntil(".ui-dialog",".body").hasClass("editable")){var e=$(" Are you sure you want to delete this ability? This cannot be undone. ");e.dialog({modal:!0,buttons:{"Yes, Delete":function(){d20.Campaign.players.each(function(e){e.removeFromMacroBar(t.model.id)}),t.model.destroy(),e.dialog("destroy").remove()},"No, Cancel":function(){e.dialog("destroy").remove()}},beforeClose:function(){e.dialog("destroy").remove()},title:"Confirm Deletion"})}}),this.$el.on("keyup",".abilname input",function(e){if(32==e.which){console.log("sapce!");var t=$(this).val();$(this).val(t.substring(0,t.length-1).replace(" ","")+"-")}}),d20.Campaign&&(this.$el.find(".action").atwho("@",{cache:!1,tpl:" ${name} ",callbacks:{filter:function(t){var i=[],n=!1,r={};return e.attribs.each(function(o){if("repeating_"===o.get("name").substring(0,10))return!0;var a=(n?e.get("name")+"|":"")+o.get("name"),s=a.score(t);s&gt;0&&(i.push({name:o.get("name").replace("'","'"),score:s}),r[o.get("name").toLowerCase()]=!0)}),d20.journal.customSheets&&d20.journal.availableAttributes&&_.each(d20.journal.customSheets.availableAttributes,function(o,a){if(void 0!==r[a.toLowerCase()])return!0;var s=(n?e.get("name")+"|":"")+a,l=s.score(t);l&gt;0&&i.push({name:a.replace("'","'"),score:l})}),r=null,i=_.sortBy(i,function(e){return-e.score})},sorter:function(e,t){return t}}}),this.$el.find(".action").atwho("#",{cache:!1,callbacks:{filter:function(e){var t=[];return d20.Campaign.players.each(function(i){i.macros.each(function(n){return""==n.get("name")?!0:void((i.id==window.currentPlayer.id||n.visibleToCurrentPlayer())&&-1!==n.get("name").toLowerCase().indexOf(e)&&t.push({name:n.get("name"),val:n.get("name"),id:n.id}))})}),t}}}),this.$el.on("click",".testabil",function(){var e=d20.utils.strip_tags(t.convertFromTokenizer(t.$el.find(".action")));e=e.replace(/@{[^}]+}/g,function(e){if(-1===e.indexOf("|")){var i="@{"+t.model.collection.character.get("name")+"|"+e.substring(2,e.length);return i}return e}),d20.textchat.doChatInput(e)}),this.$el.on("click",".rollabil",function(){d20.textchat.doChatInput("%{"+t.model.collection.character.get("name")+"|"+t.model.get("name")+"}")}),this.$el.on("click",".showinmacrobar",function(){$(this).is(":checked")?window.currentPlayer.addToMacroBar(t.$el.parents(".abilities").attr("data-characterid")+"|"+t.model.id):window.currentPlayer.removeFromMacroBar(t.model.id)}),this.$el.on("click",".istokenaction",function(){t.model.save($(this).is(":checked")?{istokenaction:!0}:{istokenaction:!1})}))},saveValues:function(){var e={name:this.$el.find(".abilname input").length&gt;0?d20.utils.strip_tags(this.$el.find(".abilname input").val()):this.model.get("name"),action:d20.utils.strip_tags(this.convertFromTokenizer(this.$el.find(".action"))),istokenaction:this.$el.find(".istokenaction").is(":checked")};this.model.save(e)},convertFromTokenizer:function(e){return e.val()},convertForTokenizer:function(e){return e}}),d20.models.AttributeModel=Backbone.Model.extend({defaults:{name:"Untitled",current:"",max:""},initialize:function(){if(this.id)this.persisted=!0;else{var e=generateUUID();this.set({id:e}),this.url=this.collection.url+e}this.view=new d20.models.AttributeView({model:this})},isNew:function(){return!this.persisted},syncedSave:function(e){this.save(e),this.collection.character.updateTokensByName(this.get("name"),this.id)}}),d20.models.AttributeCollection=Backbone.Collection.extend({model:d20.models.AttributeModel,initialize:function(){this.on("change",function(){d20.engine&&d20.engine.debounced_renderAll()}),this.on("add",function(){})}}),d20.models.AttributeView=Backbone.View.extend({_template:$("#tmpl_cs_attribute"),initialize:function(){_.bindAll(this,"render","rebindEvents","saveValues");var e=this;this.$el.addClass("attrib"),this.$el.attr("data-attrid",this.model.id),this.model.bind("remove",function(){e.$el.remove()}),this.model.bind("change",function(){e.render()}),e.render()},render:function(){this.$el.html(this._template.jqote(this.model))},rebindEvents:function(){var e=this;this.$el.on("click",".attrname",function(){if(e.$el.parentsUntil(".ui-dialog",".body").hasClass("editable")){var t=$(this);if(!(t.find("input").length&gt;0)){var i=t.text();t.html(" "),t.find("input").val(i).focus()}}}),this.$el.on("keydown",".attrname",function(t){13==t.which&&(e.saveValues(),e.render())}),this.$el.on("click",".deleteattr",function(){e.$el.parentsUntil(".ui-dialog",".body").hasClass("editable")&&e.model.destroy()}),this.$el[0].addEventListener("blur",function(t){var i=$(t.target);i.is("input")&&setTimeout(function(){var t=e.$el.find("input:focus").attr("name");e.saveValues(),e.$el.find("input[name="+t+"]").focus()},100)},!0),this.$el.on("dosave",function(){e.saveValues(),e.$el.find(".attrname input").each(function(){$(this).parentsUntil(".ui-dialog",".attrname").text(e.model.get("name"))})}),this.$el.on("doclose",function(){e.$el.find(".attrname input").each(function(){$(this).parentsUntil(".ui-dialog",".attrname").text(e.model.get("name"))})})},saveValues:function(){var e={name:this.$el.find(".attrname input").length&gt;0?d20.utils.strip_tags(this.$el.find(".attrname input").val()):this.model.get("name"),current:d20.utils.strip_tags(this.$el.find(".current input").val()),max:d20.utils.strip_tags(this.$el.find(".max input").val())};this.model.syncedSave(e)}}),d20.models.Character=Backbone.Model.extend({defaults:{name:"",bio:"",gmnotes:"",avatar:"",inplayerjournals:"",controlledby:"",defaulttoken:"",tags:"",archived:!1,attrorder:"",abilorder:""},initialize:function(){var e=this;if(this.id)this.persisted=!0;else{var t=generateUUID();this.set({id:t}),this.url=this.collection.url+t}this.allowDelays={update:!0},this.attribs=new d20.models.AttributeCollection,this.attribs.url="/char-attribs/char/"+this.id+"/",this.attribs.character=this,this.abilities=new d20.models.AbilityCollection,this.abilities.url="/char-abils/char/"+this.id+"/",this.abilities.character=this,_.defer(function(){e.attribs.backboneFirebase=new BackboneFirebase(e.attribs),e.abilities.backboneFirebase=new BackboneFirebase(e.abilities)}),this.view=new d20.models.CharacterView({model:this}),this.editview=new d20.models.CharacterEditorView({model:this}),this.on("change:controlledby",function(){e.attribs.each(function(e){e.view&&e.view.render()}),e.abilities.each(function(e){e.view&&e.view.render()}),e.view.$el.is(":visible")&&e.view.render(),window.currentPlayer&&d20.player_settings&&d20.player_settings.refreshMacroBar()}),this._blobcache={}},isNew:function(){return!this.persisted},currentPlayerControls:function(){if(window.is_gm)return!0;var e=this.get("controlledby").split(",");return-1!=_.indexOf(e,window.currentPlayer.id)||-1!=_.indexOf(e,"all")?!0:!1},tagsArray:function(){try{var e=JSON.parse(this.get("tags"))}catch(t){return[]}return e},_getLatestBlob:function(e,t){if(this._blobcache[e])return void t(this._blobcache[e]);var i=this,n=!1;d20.Campaign.parentRef.child("char-blobs").child(this.id).child(e).on("value",function(r){i._blobcache[e]=r.val()?r.val():"",n?i.trigger("change:blob_"+e):t(i._blobcache[e]),n=!0})},autoCalcFormula:function(formula,additionalAttrs,defaultValuesPrefix,dolog){var character=this,varreg=/(@{[^}]+})/gm,prevformula;defaultValuesPrefix||(defaultValuesPrefix="");for(var i=0;99&gt;i&&(formula=formula.replace(varreg,function(e){var t,i;e=e.substring(2,e.length-1);var n=e.split("|");i=n[0];var r="current";"-"===n[0].substring(0,1)&&(t=character.attribs.get(n[0]),i=t.get("name")),n.length&gt;1&&"max"===n[1]&&(r="max"),t||character.attribs.each(function(e){return e.get("name").toLowerCase()==i.toLowerCase()?(t=e,!1):void 0});var o=void 0;if(t&&(o=t.get("max"==r?"max":"current")),!o&&additionalAttrs&&void 0!==additionalAttrs[i.toLowerCase()]&&(o=additionalAttrs[i.toLowerCase()][r]),!(void 0===o||""===o||d20.journal.customSheets&&d20.journal.customSheets.reservedAttributes[i.toLowerCase()+("max"===r?"_max":"")]))return o;var a=void 0;return""!==defaultValuesPrefix&&d20.journal.customSheets&&d20.journal.customSheets.availableAttributes&&void 0!==d20.journal.customSheets.availableAttributes[(defaultValuesPrefix+i+("max"===r?"_max":"")).toLowerCase()]?a=d20.journal.customSheets.availableAttributes[(defaultValuesPrefix+i+("max"===r?"_max":"")).toLowerCase()]:d20.journal.customSheets&&d20.journal.customSheets.availableAttributes&&void 0!==d20.journal.customSheets.availableAttributes[(i+("max"===r?"_max":"")).toLowerCase()]&&(a=d20.journal.customSheets.availableAttributes[(i+("max"===r?"_max":"")).toLowerCase()]),void 0!==o&&void 0===a?o:void 0!==a?a:(console.log("ERROR: Unable to find attribute "+e+" in auto-calc formula."),"")}),prevformula!==formula);i++)prevformula=formula;prevformula=null;var filterreg=/(floor)|([0-9\.]+)|(\()|(\))|(ceil)|(round)|(abs)|(\+)|(\/)|(\-)|(\*)|(%)/gi,finalString="";formula.replace(filterreg,function(e){finalString+=e});var result;try{!function(){"use strict";var floor=Math.floor,round=Math.round,ceil=Math.ceil,abs=Math.abs;dolog&&console.log(finalString),result=eval(finalString)}()}catch(e){result=formula}return(""===result||void 0===result)&&(result=formula),result},updateTokensByName:function(e,t){var i=this;e=e.toLowerCase(),this.attribs.each(function(i){return i.get("name").toLowerCase()===e?(t=i.id,!1):void 0}),d20.Campaign.pages.each(function(n){return n.thegraphics?void n.thegraphics.each(function(n){if(n.get("represents")===i.id){var r={};(void 0!==t&&n.get("bar1_link")===t||n.get("bar1_link").toLowerCase()==="sheetattr_"+e)&&(r.bar1_value=i.autoCalcFormula("@{"+(t?t:e)+"}"),r.bar1_max=i.autoCalcFormula("@{"+(t?t:e)+"|max}")),(void 0!==t&&n.get("bar2_link")===t||n.get("bar2_link").toLowerCase()==="sheetattr_"+e)&&(r.bar2_value=i.autoCalcFormula("@{"+(t?t:e)+"}"),r.bar2_max=i.autoCalcFormula("@{"+(t?t:e)+"|max}")),(void 0!==t&&n.get("bar3_link")===t||n.get("bar3_link").toLowerCase()==="sheetattr_"+e)&&(r.bar3_value=i.autoCalcFormula("@{"+(t?t:e)+"}"),r.bar3_max=i.autoCalcFormula("@{"+(t?t:e)+"|max}")),_.keys(r).length&gt;0&&n.save(r)}}):!0})},broadcastToPlayers:function(e){var t=this;if(""!==this.get("inplayerjournals")||e)d20.textchat.sendShout({type:"showcharacter",jid:this.id,jtype:"character",time:(new Date).getTime(),playerid:"all"});else{var i=$(" This character isn't currently shared with any players. Do you want to share with all players in the game? ");i.dialog({buttons:{"Show to Everyone":function(){t.save({inplayerjournals:["all"].join(",")}),setTimeout(function(){t.broadcastToPlayers(!0)},100),i.dialog("close")},Cancel:function(){setTimeout(function(){t.broadcastToPlayers(!0)},0),i.dialog("close")}},beforeClose:function(){i.dialog("destroy")},title:"Not Visible to Players"})}},safeDestroy:function(){var e=this,t=$(" Are you sure you want to delete this character? This cannot be undone. ");t.dialog({modal:!0,title:"Confirm Deletion",buttons:{"Delete Character":function(){d20.Campaign.players.each(function(t){t.removeFromMacroBar(e.id)}),e.attribs.backboneFirebase.reference.set(null),e.abilities.backboneFirebase.reference.set(null),d20.Campaign.parentRef.child("char-blobs").child(e.id).set(null),e.destroy(),$(this).dialog("destroy").remove(),e.editview.$el.is(":visible")&&e.editview.$el.dialog("destroy")},Cancel:function(){$(this).dialog("destroy").remove()}},beforeClose:function(){$(this).dialog("destroy").remove()}})}}),d20.models.CharacterCollection=Backbone.Collection.extend({model:d20.models.Character,url:"/characters/",initialize:function(){this.on("add change remove",function(){d20.journal&&d20.journal.refreshJournalList(),d20.utils&&d20.utils.refreshLinkCache()})}}),d20.models.HandoutEditorView=Backbone.View.extend({_template:$("#tmpl_handouteditor"),initialize:function(){var e=this;_.bindAll(this,"render","updateModel","showDialog"),this.model.bind("change:avatar",function(){e.$el.is(":visible")&&(e.render(),e.$el.find(".chosen").chosen())}),$(this.el).addClass("dialog"),this.$el=$(this.el);var e=this;this.$el.on("click",".delete",function(){e.model.safeDestroy()}),this.$el.on("click",".archive",function(){e.model.set({archived:!e.model.get("archived")}).save(),e.$el.dialog("destroy")})},addBlob:function(e){var t=this;this.$el.find("."+e).html("Loading..."),this.model._getLatestBlob(e,function(i){var n=d20.utils.handleHTMLOutput(i),r=!1;"SINGLESPACED!!"==n.substring(0,14)&&(n=n.substring(14,n.length),r=!0),t.$el.find("."+e).redactor(d20.utils.defaultRedactorSettings),t.$el.find("."+e).redactor("set",n,!1),r&&t.$el.find("textarea."+e).redactor("getObject").$editor.addClass("singlespaced")})},render:function(){var e=this;if(this.$el.html(this._template.jqote(this.model)),this.$el.attr("data-handoutid",this.model.id),this.$el.find(".name").val(this.model.get("name")),this.addBlob("notes"),d20.utils.setupAvatar(this.$el.find(".avatar"),e),window.is_gm){this.addBlob("gmnotes");var t=this.model.get("controlledby").split(",");_.each(t,function(t){e.$el.find(".controlledby option[value="+t+"]").attr("selected","selected")});var i=this.model.get("inplayerjournals").split(",");_.each(i,function(t){e.$el.find(".inplayerjournals option[value="+t+"]").attr("selected","selected")}),this.tagEditor=new $.TextboxList(this.$el.find(".tags"),{encode:function(){},decode:function(){},startEditableBit:!1,inBetweenEditableBits:!1,unique:!0,plugins:{autocomplete:{minLength:2}}});
1439758691
Pat S.
Forum Champion
Sheet Author
There has been people posting problems with the 5e sheet but lets start off with the basics. Can you please follow Steps 1-3 of our Solving Technical Issues wiki page, taking special care to temporarily disable all browser add-ons and extensions, temporarily pause your anti-virus, and try switching browsers (for Chrome/Firefox specific issues) to see if one of those components is causing the problem. If all of that fails, please follow Step 4 , including providing all of the necessary information, so that we can further assist you.
1439760014
Kryx
Pro
Sheet Author
API Scripter
Is this 5e sheet, or the 5e Shaped sheet? I haven't heard any cases of either crashing a brower or being the cause of anything like this.
Pat, I have disabled all the addons, the script still freezes. Cleared the cache, still happening (though now I have just a blank page instead of a character sheet since I disabled everything). I tried to run the game on Edge (new IE) a couple of days ago and it gave the same thing with the unresponsive script, and I don't even have anything added to Edge. Tried it just now on Edge again and while it does freeze up a bit and responds really slowly to me going from one part of the sheet to the other, I don't get the message about the script. Funnily enough, while typing this I received the unresponsive script message again and I didn't even have the character sheet open. Mark, it's the Shaped one, the 10th of August version.
1439762036
Kryx
Pro
Sheet Author
API Scripter
The 10s of lag is another bug that I opened recently. Hopefully Riley can look into that. Does this happen on all sheets, or just this one? Maybe there is an error on this specific character. Can you try opening the console and then loading the sheet? Copy anything that is in red.
I checked my Vampire the Masquerade game, I use sheets there as well, no problem there. I can't check the sheets of other characters, since I'm a player in this game, not a GM. Two messages poped up in the console when the unresponsive script happened, first message was in red, the second in orange: Loading mixed (insecure) display content "<a href="http://imgsrv.roll20.net/?src=i.imgur.com/4725LWH.png" rel="nofollow">http://imgsrv.roll20.net/?src=i.imgur.com/4725LWH.png</a>" on a secure page[Learn More] jquery.min.js:2:0 Error: Script terminated by timeout at: d20.models.CharacterView&lt;._updateSheetValues/&lt;/&lt;@<a href="https://d3clqjduf2gvxg.cloudfront.net/assets/app.js?1439300327:36:11450" rel="nofollow">https://d3clqjduf2gvxg.cloudfront.net/assets/app.js?1439300327:36:11450</a> k.forEach@<a href="https://d3clqjduf2gvxg.cloudfront.net/assets/base.js?1436377404:1:1626" rel="nofollow">https://d3clqjduf2gvxg.cloudfront.net/assets/base.js?1436377404:1:1626</a> h.prototype[t]@<a href="https://d3clqjduf2gvxg.cloudfront.net/assets/base.js?1436377404:1:24223" rel="nofollow">https://d3clqjduf2gvxg.cloudfront.net/assets/base.js?1436377404:1:24223</a> d20.models.CharacterView&lt;._updateSheetValues/&lt;@<a href="https://d3clqjduf2gvxg.cloudfront.net/assets/app.js?1439300327:36:11417" rel="nofollow">https://d3clqjduf2gvxg.cloudfront.net/assets/app.js?1439300327:36:11417</a> k.forEach@<a href="https://d3clqjduf2gvxg.cloudfront.net/assets/base.js?1436377404:1:1713" rel="nofollow">https://d3clqjduf2gvxg.cloudfront.net/assets/base.js?1436377404:1:1713</a> d20.models.CharacterView&lt;._updateSheetValues@<a href="https://d3clqjduf2gvxg.cloudfront.net/assets/app.js?1439300327:36:10459" rel="nofollow">https://d3clqjduf2gvxg.cloudfront.net/assets/app.js?1439300327:36:10459</a> k.debounce/&lt;/n@<a href="https://d3clqjduf2gvxg.cloudfront.net/assets/base.js?1436377404:1:7634" rel="nofollow">https://d3clqjduf2gvxg.cloudfront.net/assets/base.js?1436377404:1:7634</a> Also, weird, I still get the blank character sheet even though I enabled all the extensions now. Even weirder, on my second computer I just get the forever loading screen when I joined the game to see if I can see the character sheet there. The sheet still shows up on Edge though
1439764242
Kryx
Pro
Sheet Author
API Scripter
Can you make a new campaign with a fresh character to see if it is the sheet or something wrong with the character?
Just did that, experiencing no problems so far (other than the lag mentioned before). What if the source of the problem is the spells? I'm the only one in the group who added every spell available to me to the spellbook, could that be causing the massive freeze and lag and unresponsive script?
1439766645
Kryx
Pro
Sheet Author
API Scripter
As discussed in the [5e Shaped] Sheet loading time has significantly increased thread&nbsp;spells do definitely increase the loading time significantly - however, I've never seen a crash. Your error messages don't help me diagnose any known issues that I've seen - one of the devs will have to look.
Update: just had a friend try to look at my character sheet with my account. He is getting the same unresponsive script, so it's not my computer. He tried it on Firefox. However, he said that after that one error message (identical to the ones I'm getting), he got no other problems. Same friend looked at his character sheet and he told me that his just froze up at the beginning but after that everything was fine. Seems that it's only my character sheet that is the source of the proble, Also, thought I should mention that Windows 10 could not be the cause of it. I have been getting the error for many months, but it would come up every 5 minutes or so, so I didn't bother writing to support. But in the last few weeks it has gotten a lot worse to the point that it comes up every 10 seconds or so, making it very difficult to play
1439770150
Pat S.
Forum Champion
Sheet Author
I brought this issue up to the devs attention as it is responding differently than the other 5e shaped bug posts.
Just installed Chrome, and so far it's been the best choice. When I launched the game, it froze up for almost 20 seconds, then gave me a pop up window, saying that the page is unresponsive and I can wait or kill it. I waited and my character sheet loaded. It has less lag and a lot smoother than the Firefox and Edge, so if I can't solve the issue, I will use Chrome for the game
Hey guys, no idea what you did, but everything got fixed about a week ago! While it gives rare freezes in Firefox, the unresponsive script almost doesn't appear anymore and the sheet isn't nearly as slow as it was. Thanks!
1442669413
Ziechael
Forum Champion
Sheet Author
API Scripter
Hi Gabriela, i'm glad it is now working for you. I'll close this thread, should it reoccur please create a new one.