Circular structure to JSON when deploying - json

Recently, code that I wrote was being deployed to our server, and an error was thrown during deployment that would appear to be my fault.
TypeError: Converting circular structure to JSON
--> starting at object with constructor 'SourceFileObject'
property 'statements' -> object with constructor'Array'
index0 -> object with constructor 'NodeObject'
---property 'parent' closes the circle
at stringify(<anonymous>)
at writeChannelMessage (node:internal/child_process/serialization: 127:20)
at process.target.send(node:internal/child_process:819:17)
at process.target.send(node:internal/child_process:719:19)
at process.send(/*project*/*projectname*/node_modules/pm2/lib/ProcessContainer.js:51:21)
at process.uncaughtListener(/*project*/*projectname*/node_modules/pm2/lib/ProcessContainer.js:275:19
at process.emit(node:events:402:35)
at process.emit(node:domain:475:12)
at process.emit.sharedData.processEmitHook.installedValue [as emit] (/*project*/*projectname*/node_modules/pm2/node_modules/#cspotcode/source-map-support/source-map-support.js745:40)
at process_fatalException(node:internal/process/execution:164:25)
I have been told to fix this, but I can't reproduce any error in my local. I can't post the code, but it is an express backend with a few apis. I know what a circular reference is, and I don't believe I have any in my code, so, just curious if anyone can help me narrow my search at all. Any advice or help would be greatly appreciated.

Related

Error Odatasource editor System.Net.HttpWebresponse

Hope someone can help me on this. I've created a SSIS package with ODatasource where the feed URL used to work fine couple of days ago. But now it is throwing the following exception:
Cannot access a disposed object. Object name: 'System.Net.HttpWebresponse'.
Anyone encountered this error before? Thanks !

Unknown warning: "Member from unopened namespace"

Within my Pure AS3 app (using IntelliJ) I'm getting the following warning:
"Member from unopened namespace" associated with the instance of the model.
The initial instantiation of the Model is fine (singleton) but each reference to it within the class that it's instantiated after the constructor are throwing the above warning.
The model it's self appear fine as is instantiated without issue from multiple other view classes.
Has anyone come across this before? Interesting that neither SO or Google verbatim throws up any results.
as ever, all suggestions and help appreciated!

Custom control casting exception during DesignTime but not RunTime

Been dealing with a casting exception during design time only that getting me nuts.
I'm trying to create a custom control for winRT (a week view control just like windows phone 8.1). The control works fine during run time but in design time it gives me COMException. During my investigation of the cause of this COMException, I found out that there is a casting exception inside one of the component of my control. This component is a custom listview that implement ContainerContentChanging event. Inside this event there is a casting which raises this exception.
Here is a the custom list view class:-
The code is removed coz the source code is shared below.
The TemplatedListViewEntry cctor look like this one:-
The code is removed coz the source code is shared below.
And the AppointmentModel:-
The code is removed coz the source code is shared below.
OBS!!! while debugging using 2 instance of VS or VS+Blend and put a breakpoint before this line I can see that args.Item is of type ContentControl while during run time it is AppointmentModel.
Could it be a problem with the ItemsSource which is null at design time?
If yes how should I preceed and assign this_ If No, anyone here that can help me figure out what is the problem?
OBS!!! I anyone needs more info please ask and I would gladly share the entire code with you.
Edit 1
Even if i initiate my viewmodel in the cctor of the custom Control, it raises casting exception in Designtime and not in Run tim
Edit 2
After i wrote Edit 1 above i noticed that now i have to Cast exception in two different Styles (CustomWeekView style and TemplatedListView Style) this is if you open Generic.xaml inside Blend. It is really getting annoying and i'm out of thoughts now. That is why i decided to share the source code of this Project, hopfully someone will be able to help looking at it. Below you will see the source code.
CustomWeekView

How to access returned JSON object from soundcloud api

I am trying to access a json object returned from soundcloud. I can access it using the following
var myJSON = $.getJSON("http://api.soundcloud.com/users/<myuserid hidden>/tracks.json?client_id=<myclientid hidden>");
now, I know all the data has been correctly assigned to the var myJSON, as when I log it to the console, everything is there. It returns something like this:
"[{"kind":"track","id":<trackid>,"created_at":"2012/12/17 21:48:03 +0000","user_id":<myid>,"duration":185147,"commentable":true,"state".......
However, when I try to access anything like, say, the title of the first track with:
console.log(myJSON[0].title);
chrome simply gives the error Uncaught TypeError: Cannot read property 'title' of undefined
so... I am probably missing something quite basic here. Anybody got any idea as to what I'm doing wrong? Help would be very much appreciated!
EDIT: everything needs to be done inside the $.getJSON call, as such:
$.getJSON('http://api.soundcloud.com/users/<userid>/tracks.json?client_id=<client_id>', function(sounds) { **enter whatever code you want to execuse
The "function(sounds)" part is what's important to add. Apparently, it's not very straightforward to access anything you get from the JSON object outside of the .getJSON method. (there are some ways, but require some workarounds that I didn't really understand much of). soo... I needed to add all my code inside here.

How to trace COM objects exceptions?

I have a DLL with some COM objects. Sometimes, this objects crashes and register an error event in the Windows Event Log with lots of hexadecimal informations. I have no clue why this crashes happens.
So, How can I trace those COM objects exceptions?
The first step is to lookup the Fail code's hex value (E.G. E_FAIL 0x80004005). I've had really good luck with posting that value in Google to get a sense of what the error code means.
Then, I just use trial and error to try to isolate the location in code that's failing, and the root cause of the failure.
If you just want a really quick way to find out what the error code means, you could use the "Error Lookup" tool packaged with Visual Studio (details here). Enter the hex value, and it will give you the string describing that error code.
Of course, once you know that, you've still got to figure out why it's happening.
A good way to look up error (hresult) codes is HResult Plus or welt.exe (Windows Error Lookup Tool).
I use logging internally in the COM-classes to see what is going on. Also, once the COM-class is loaded by the executable, you can attach the VS debugger to it and debug the COM code with breakpoints, watches, and all that fun stuff.
COM objects don't throw exceptions. They return HRESULTs, most of which indicate a failure. So if you're looking for the equivalent of an exception stack trace, you're out of luck. You're going to have to walk through the code by hand and figure out what's going on.