Page 1 of 1
Genie crashes on loading 9999 html container
Posted: Fri Jan 20, 2017 2:02 pm
by kaindala
Using grid.getAllDataValues we created a table in html container. The data load is completed in onload, but the browser crashes without loading the screen. How to find what went wrong, cannot see any error in console.
Re: Genie crashes on loading 9999 html container
Posted: Fri Jan 20, 2017 4:02 pm
by matt.denninghoff
Have you used a web browser's debugger before? If not, here is a starting point:
http://www.w3schools.com/js/js_debugging.asp
Sometimes setting breakpoints and stepping through your javascript is the only way to find problems.
If the browser is crashing, i suspect some loop is running out of control and creating too many elements. Keep in mind that the onload event fires every time the server responds with a new page or handles a keypress. You can see when it responds by setting this in the onload property:
Re: Genie crashes on loading 9999 html container
Posted: Fri Jan 20, 2017 5:24 pm
by kaindala
matt.denninghoff wrote:Have you used a web browser's debugger before? If not, here is a starting point:
http://www.w3schools.com/js/js_debugging.asp
Sometimes setting breakpoints and stepping through your javascript is the only way to find problems.
If the browser is crashing, i suspect some loop is running out of control and creating too many elements. Keep in mind that the onload event fires every time the server responds with a new page or handles a keypress. You can see when it responds by setting this in the onload property:
I have debugged the code, the script written to load the table works fine. After the table is loaded to html container, the genie does not respond and crashes. It works well when there are fewer records, any thing more the 2000 it doesn't load the screen
Re: Genie crashes on loading 9999 html container
Posted: Fri Jan 20, 2017 6:16 pm
by kaindala
kaindala wrote:matt.denninghoff wrote:Have you used a web browser's debugger before? If not, here is a starting point:
http://www.w3schools.com/js/js_debugging.asp
Sometimes setting breakpoints and stepping through your javascript is the only way to find problems.
If the browser is crashing, i suspect some loop is running out of control and creating too many elements. Keep in mind that the onload event fires every time the server responds with a new page or handles a keypress. You can see when it responds by setting this in the onload property:
I have debugged the code, the script written to load the table works fine. After the table is loaded to html container, the genie does not respond and crashes. It works well when there are fewer records, any thing more the 2000 it doesn't load the screen
when I debugged genie.js - this.check function keeps looping, you can see in the image, the data is loaded to table, but the script keeps looping in this.check.
- genielooping.jpg (198.43 KiB) Viewed 1649 times
Re: Genie crashes on loading 9999 html container
Posted: Mon Jan 23, 2017 2:38 pm
by kaindala
Found the issue, it was with how the table was created, Javascripts runs fast when dynamic table is created using appendChild instead of building HTML string. It worked faster, there was not issue with Profound code.
Below link helped
http://stackoverflow.com/questions/8734 ... -it-to-dom
Re: Genie crashes on loading 9999 html container
Posted: Tue Jan 24, 2017 11:29 am
by matt.denninghoff
Glad you were able to solve the problem. For reference, that particular function, "check", is a routine in pui.Timer (
http://www.profoundlogic.com/docs/displ ... mer+object). So if any pui.Timer objects are setup, then that "check" code will run periodically.