Copy link to clipboard
Copied
Hello,
My function sometimes throws this error and then stops to work.
I have made a debug and find that the whole message is: "Oops! An untagged string (C stack overflow) got thrown far enough that we display it to the user. This shouldn't happen."
The stack is below. getPhotos function cause this error even though my photo object is correct
How can I block this error and continue my function works because after the error my function crashes.
Any suggestions will be greatly appreciated.
Thanks in advance
0: [unnamed] - C
1: [unnamed] - C
2: method close - 1478146055:429+9
3: [unnamed] - 1438065897:309+36
4: [unnamed] - tail
5: [unnamed] - 345274524:75+44
6: [unnamed] - tail
7: [unnamed] - tail
8: field getCollectionInfo - 775833618:147+21
9: method isSmartCollection - 149456304:467+10
10: method getPhotos - 149456304:484+6
11: field CheckIt - Test.lua:286
Copy link to clipboard
Copied
I've seen a C stack overflow once or twice before over the years, and I recall it being a symptom of invalid arguments passed to an API call.
Are you using a debugger, either the ZeroBrane debugger or my debugging toolkit? ZeroBrane is a full-fledged IDE but it's debugger doesn't know about a number of LR's oddities with respect to tasks, while my debugging toolkit is more minimal but fully aware of LR.
You could singlestep through the offending code and examine the arguments to each of the API calls carefully.
Copy link to clipboard
Copied
Thank you so much for your answer!
I am using ZeroBrane and never used my debugging. I will try to use it as well.
I created a timer a calling my function for every 10 secs. This error is being thrown after 10 minutes or 1 hour even though all variables/arguments are the same. So it is very difficult to debug it because I don't know when the error throws. maybe after 10 minutes, maybe 2 hours
Copy link to clipboard
Copied
My favourite doh! is using a period instead of a colon calling a Lightroom object method. I've seen this error too and there's something nudging at the back of my head telling me it might have been from doing this. Or not. Just a thought, is all.