This is a migrated thread and some comments may be shown as answers.

Was Working Application Crashing Graphite & Logs Not Showing Why The Graphite Hangs

3 Answers 23 Views
AppBuilder Windows client
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Terran
Top achievements
Rank 1
Terran asked on 11 Nov 2012, 08:39 PM
Hi,

My first app in Icenum has been brought over from a working app I've done with Jquery and Dreamweaver. When running 2 things are happening to the app its self:

1) The UI does not appear yet I get no errors from Graphite despite making a few minor changes and having gone through it nothing jumps out at such. I am wondering if its related to the following issue in the application.js which is called before the rest of index.html

2) My app grabs some json info, a location and cycles through presenting it as HTML divs. Here is my problem... some thing is happening here but the 'log' coming from the simulator is repeating ( presumably as it cycles through the json ) but then Graphite hangs and I can not even look at the log to work out why and what is an error.

Is there a why to look locally to see any log from Graphite before the crash to work out where my issue is coming from because again I've got no reported errors and this was working code.

Many Thanks

Terran




3 Answers, 1 is accepted

Sort by
0
Deyan Varchev
Telerik team
answered on 13 Nov 2012, 02:31 PM
Hello,

 I had a look at your problem and it turns out there are some issues in your application.js. 
The the main issue is with the datatime variable that you have defined. It is initialized as empty string - "" and used later on in "detectLocationtimersset" function. There you compare it with null, which returns false and goes in the else block. There it multiplies the value of datatime by some number and as a result returns 0. After that it calls setInterval with 0 as milliseconds interval. This causes an infinite calling of detectLocation. At this point this creates a constant execution - like infinite loop. Which at some point causes a crash in the system.
 To solve this you can either initialize datatime to null (not empty string) or some number different than 0. This will make your code not fall into that frequent calls to detectLocation.

 There is some url in "detectLocation" function that is not properly commented out. This however appears to be syntactically correct as http: is recognized as label in the code and the rest as comment. This it does not cause any significant problems for your app.

 I'd recommend you to use the simulator debugger in order to solve javascript problems. You can inspect your UI elements and you can put breakpoints in your javascript code there. You can look for more information here

 I hope this will help you solve your problem. If you still encounter any problems please feel free to write us again.

Kind regards,
Deyan Varchev
the Telerik team

Share feedback and vote for features on our Feedback Portal.
Want some Kendo UI online training - head over to Pluralsight.
0
Terran
Top achievements
Rank 1
answered on 20 Nov 2012, 12:00 AM
Deyan... found my initial prob - datatime is some thing thats pulled using a settings script in my other version so for now I've sorted that and the webkit console was exactly what I was looking for. I'm also looking at the lists side of Kendo UI how ever I'm getting the following:

 Uncaught Type Error - Can not ready property '_e3_' of undefined main.js.18
Uncaught SyntaxError: Unexpected identifier kendo.mobile.min.js:9
Uncaught Typeerror Can not read property 'offsetwidth of null main.js.29

This is probably down to my self as well how ever been your main code ( I assume ) its not some thing thats obvious. I'm still not able to get the GUI to fire up but according to the console application.js seems to be running in the background.

Terran

PS Copy and paste from the app would be very handy
0
Deyan Varchev
Telerik team
answered on 21 Nov 2012, 02:42 PM
Hi,

 Nice to see you have handled some of the problems. I had a look at your errors and I think those are coming from your code. 
 The first one is most probably caused when you try to subscribe to google maps events. Namely the "click" event. - "google.maps.event.addListener(map, "click",....)". There, you pass a map variable that is not initialized. It gets initialized in another part of your app. You should do that subscription after the map object is created.
 The second error comes from the fact that you have defined incorrect data-click attribute - "Cancel Check". It should be the name (identifier) of the function you want to be called on click. Thus it must not contain any spaces.
 The third error may have been as a result of the first error or something related. It is in google maps code as well.

 I hope this will help you and if you have any more troubles. Please don't hesitate to write us back.

All the best,
Deyan Varchev
the Telerik team

Share feedback and vote for features on our Feedback Portal.
Want some Kendo UI online training - head over to Pluralsight.
Tags
AppBuilder Windows client
Asked by
Terran
Top achievements
Rank 1
Answers by
Deyan Varchev
Telerik team
Terran
Top achievements
Rank 1
Share this question
or