Getting "Single stepping until exit from function CALayerGetDelegate, which has no line number information." in iphone sdk - calayer

My code is as follows:
if ([dematAllocationDict count] > 0)
{
[dematTableV reloadData]; // debugger stops here
dematTableV.hidden = FALSE;
}
When I call the method , my code runs good at first time. But when I call it again then I am getting the message in console, i.e.
"Single stepping until exit from function CALayerGetDelegate, which has no line number information."
I tried a lot but not getting the solution. When I do continue to run the app then it gives BAD ACCESS.
Debugger stops at :
[dematTableV reloadData];
Please help me... :(
Thanks in advance.

Related

Need To Get The Status of Each Iteration in UFT

Need To Get The Status of Each Iteration in UFT like Execution Status, Error Message if the that particular iteration is failed and the status of Checkpoint. Whether it is pass or failed. I have checked for one code which i got from another forum but cannot be self explanatory. Can anyone help in getting more clear on the option to get the status of each iteration.
Code:
List<IterationStatus> iterationList = this.Context.ExecutionStatus.IterationStatus;
if (iterationList.Count > 0)
{
this.Context.UserLogger.Info(iterationList[1].CheckpointFailed.ToString());
this.Context.UserLogger.Info(iterationList[1].Succeed.ToString());
}

OSX-Parse - How to get images in background

I have this code going to get Parse images into my OSX app.
// give our representation to the image browser
- (id)imageRepresentation {
NSLog(#"%s", __FUNCTION__);
return [_file getData];
}
This works but results in :
Warning: A long-running Parse operation is being executed on the main thread.
Break on warnParseOperationOnMainThread() to debug.
I need to move the [_file getData] method to a background thread, and could use some help.
The error message you are getting -
Warning: A long-running Parse operation is being executed on the main thread.
Break on warnParseOperationOnMainThread() to debug.
Is simply a warning when running queries that are asynchronous. More information can be found here.
If you want to run a query in the background, use the findObjectsInBackgroundWithBlock: method of the PFQuery class.

AVAssetWriter finishWriting failure when CTCallStateIncoming

I use AVAssetWriter AVCaptureSession to recording video.it work well.I use UIApplicationDidEnterBackgroundNotification and CTCallCenter.callEventHandler to stop record when Application goes background or a call come in.UIApplicationDidEnterBackgroundNotification works well.But in CTCallCenter.callEventHandler,[AVAssetWriter finishWriting] return NO . here is AVAssetWriter.error:
Error Domain=AVFoundationErrorDomain Code=-11800 "这项操作无法完成" UserInfo=0x6c0bc20 {NSLocalizedFailureReason=发生未知错误(-12785), NSUnderlyingError=0x6c0fc80 "The operation couldn’t be completed. (OSStatus error -12785.)", NSLocalizedDescription=这项操作无法完成}
It seems AVAssetWriter failed immediately when a call coming.The recorded file not finished and can't be played.Can someone tell me how to do with it?
CTCallCenter code:
m_callCenter = [[CTCallCenter alloc] init];
m_callCenter.callEventHandler= ^(CTCall* call)
{
if (call.callState == CTCallStateDialing || call.callState == CTCallStateIncoming){
[self stopRecording];
//[self performSelectorOnMainThread:#selector(stopRecording) withObject:nil waitUntilDone:NO];
}
};
stopRecording work fine in other case.
Phone calls cause AudioSession interruptions, so you might find out sooner if you use the AudioSession callback. Although I suspect your AVAssetWriter may already be fried at this point.
Setting AVAssetWriter.movieFragmentInterval should help minimize your loss - from AVAssetWriter.h:
When movie fragments are used, a partially written asset whose writing
is unexpectedly interrupted can be successfully opened and played up
to multiples of the specified time interval.

AEInstallEventHandler handler not being called on startup

I've installed a Apple Event handler for URL's in my app:
OSStatus e = AEInstallEventHandler( kInternetEventClass,
kAEGetURL,
NewAEEventHandlerUPP(AppleEventProc),
(SRefCon)this,
false);
And that works if my application is running. However if my app is NOT running, clicking a URL in a browser starts the application but no Apple Event is received on my handler. My call to AEInstallEventHandler is during my app's startup phase, before it reaches the message loop. It's not the very first thing I do, but not too far off it. (Obviously I've setup the plist correctly, as I'm getting events while running)
Any ideas on how to get this working?
Interestingly when Chrome starts my to handle a mailto URL it passes "-psn_0_5100765" on the command line. Which doesn't mean anything to me, does anyone know what it's trying to tell me?
Note: I've setup Apple Event debugging and run it again. I'm definitely getting sent a GURL event on startup, after I have installed the callback handler. However I still can't work out why my callback is not called with that Event.
So I have some code using ReceiveNextEvent:
while
(
ReceiveNextEvent
(
0,
NULL,
0.001, // kEventDurationForever,
kEventRemoveFromQueue,
&theEvent
)
==
noErr
)
{
SendEventToEventTarget(theEvent, theTarget);
ReleaseEvent(theEvent);
}
That is called a number of times during application startup. What is happening is the processing of these events is not taking into account the need to call AEProcessEvent for kEventAppleEvent events. This is done automatically inside RunApplicationEventLoop, but you have to do it manually if you use a ReceiveNextEvent loop. So I've added that to my loop like this:
while
(
ReceiveNextEvent
(
0,
NULL,
0.001, // kEventDurationForever,
kEventRemoveFromQueue,
&theEvent
)
==
noErr
)
{
if (GetEventKind(theEvent) == kEventAppleEvent)
AEProcessEvent(theEvent);
SendEventToEventTarget(theEvent, theTarget);
ReleaseEvent(theEvent);
}
And now it works at start up AND during run time.
Uli Kusterer was responsible for pointing me in the right direction. So many thanks to him.

PowerBuilder crashes in debug mode by errors inside try/catch blocks

When in debug mode, powerbuilder (ver 10.5) throws application execution error and terminates the application, for errors raised by statements put inside try/catch blocks?
For example line 3 below throws, an "array boundary exceeded" error and the application is terminated. How can I overcome this (handled) error and debug the rest of the code?
try
// lstr_passed_values = message.powerobjectparm
ls_symv_no = gstr_symv_passed_values.is_values[1]
if isnull(ls_symv_no) or ls_symv_no = "" then
is_symv_no="%"
else
is_symv_no = ls_symv_no
gstr_symv_passed_values.is_values[1]=""
end if
catch (throwable err)
is_symv_no="%"
end try
Struggling with debug?
I would say the PB Debugger is behaving as it should. If you try to really grasp the concept of debugging, it's suppose to step through your code line by line. By giving you an "Array boundary exceeded" error, the debugger has actually proven that there's a potential unhandled exception in your code (which is why you placed the Try-Catch code there).
It's not suppose to Throw the exception until the Debugger has actually reached that point. This defeats the purpose of a debugger. Do you get what I mean?
Now if you want to skip a particular code block while on debug mode, you need to use "Set Next Statement".
From your modified sample code below, set the breakpoint on Line 1. Once the debugger reaches the breakpoint, right-click "Edit Variable" the string "is_symv_no". Then move the point cursor on Line 14 and click "Set Next Statement". That will bypass the whole try-catch routine (Lines 2-13) and allow your program to continue.
1 ls_symv_no = ""
2 try
3 // lstr_passed_values = message.powerobjectparm
4 ls_symv_no = gstr_symv_passed_values.is_values[1]
5 if isnull(ls_symv_no) or ls_symv_no = "" then
6 is_symv_no="%"
7 else
8 is_symv_no = ls_symv_no
9 gstr_symv_passed_values.is_values[1]=""
10 end if
11 catch (throwable err)
12 is_symv_no="%"
13 end try
14 return
In case anyone stumbles upon this thread - if clicking on "Ignore" doesn't get you through the TRY...CATCH block while debugging, then to avoid the crashing, go to Debug...Exceptions in the PB Debugger. Choose the option to "Continue" for the appropriate exception type.

Resources