Search first file line after Error and display

I have a log file which contains information like below (more than 200 ERROR sets).
Here I want to find first .c file and function after "ERROR: AddressSanitizer" line.

If you see here after "ERROR:" line first

file - asfrecohandling.c
function - ASFPotRecoHandling_Create_RecPaxSrvcComp

=================================================================
==10073==ERROR: AddressSanitizer: heap-use-after-free on address 0x7f5941fe08c0 at pc 0x7f5ed5d37de8 bp 0x7fffe6927310 sp 0x7fffe6927308
READ of size 4 at 0x7f5941fe08c0 thread T0
    #0 0x7f5ed5d37de7 in ASFPotRecoHandling_Create_RecPaxSrvcComp ../Sources/ASFServices_Process/C/asfrecohandling.c:1431
    #1 0x7f5ed5d2ef50 in ASFPotRecoHandling ../Sources/ASFServices_Process/C/asfrecohandling.c:399

Any attempts / ideas / thoughts from your side?

Indeed, the .c file name is in the second line after your ERROR string.

Sometimes .c file will be in 3 or 4 th lines also so we need to take first .c file after ERROR line.

Any attempts / ideas / thoughts from your side?

Please become accustomed to provide decent context info of your problem.
It is always helpful to support a request with system info like OS and shell, related environment (variables, options), preferred tools, and adequate (representative) sample input and desired output data and the logics connecting the two, to avoid ambiguities and keep people from guessing.

cat console.log | grep "ERROR" -A3 | tail -n 17

it is displaying but I would require first .c file and function of the file after ERROR line.

hope you got my point.

output :--

==10073==ERROR: AddressSanitizer: heap-use-after-free on address 0x7f5941fe08c0 at pc 0x7f5ed5d37de8 bp 0x7fffe6927310 sp 0x7fffe6927308
READ of size 4 at 0x7f5941fe08c0 thread T0
    #0 0x7f5ed5d37de7 in _________trptc ../Sources/TRPTC_Process/--
==13400==ERROR: AddressSanitizer: heap-use-after-free on address 0x7f10e193fad0 at pc 0x7f16758ccde8 bp 0x7fff2d2b60e0 sp 0x7fff2d2b60d8
READ of size 4 at 0x7f10e193fad0 thread T0
    #0 0x7f16758ccde7 in ASFPotRecoHandling_Create_RecPaxSrvcComp ../Sources/ASFServices_Process/C/asfrecohandling.c:1431
--
==12454==ERROR: AddressSanitizer: SEGV on unknown address 0x632000156500 (pc 0x7f1e67a38def bp 0x7fff2270e330 sp 0x7fff2270db50 T0)
    #0 0x7f1e67a38dee in ASFPotRecoHandling_Create_RecPaxSrvcComp ../Sources/ASFServices_Process/C/asfrecohandling.c:1431
    #1 0x7f1e67a2ff50 in ASFPotRecoHandling ../Sources/ASFServices_Process/C/asfrecohandling.c:399
--
==9443==ERROR: AddressSanitizer: heap-use-after-free on address 0x62d000038452 at pc 0x7fd37561c5cf bp 0x7fffddd55ba0 sp 0x7fffddd55b98
READ of size 1 at 0x62d000038452 thread T0
    #0 0x7fd37561c5ce in ASFProcessSC_CheckSrvcComp ../Sources/ASFServices_Common/C/asfprocesssc.c:2119
ppolakala@ncefqdev12:~/ASAN> cat console | grep "ERROR" -A3 | tail -n 17
    #0 0x7f5ed5d37de7 in ASFPotRecoHandling_Create_RecPaxSrvcComp ../Sources/ASFServices_Process/C/asfrecohandling.c:1431
    #1 0x7f5ed5d2ef50 in ASFPotRecoHandling ../Sources/ASFServices_Process/C/asfrecohandling.c:399
--
==13400==ERROR: AddressSanitizer: heap-use-after-free on address 0x7f10e193fad0 at pc 0x7f16758ccde8 bp 0x7fff2d2b60e0 sp 0x7fff2d2b60d8
READ of size 4 at 0x7f10e193fad0 thread T0
    #0 0x7f16758ccde7 in ASFPotRecoHandling_Create_RecPaxSrvcComp ../Sources/ASFServices_Process/C/asfrecohandling.c:1431
    #1 0x7f16758c3f50 in ASFPotRecoHandling ../Sources/ASFServices_Process/C/asfrecohandling.c:399
--
==12454==ERROR: AddressSanitizer: SEGV on unknown address 0x632000156500 (pc 0x7f1e67a38def bp 0x7fff2270e330 sp 0x7fff2270db50 T0)
    #0 0x7f1e67a38dee in ASFPotRecoHandling_Create_RecPaxSrvcComp ../Sources/ASFServices_Process/C/asfrecohandling.c:1431
    #1 0x7f1e67a2ff50 in ASFPotRecoHandling ../Sources/ASFServices_Process/C/asfrecohandling.c:399
    #2 0x7f1e67a0ba00 in ASFOutputMapping ../Sources/ASFServices_Process/C/asfoutputmapping.c:312
--
==9443==ERROR: AddressSanitizer: heap-use-after-free on address 0x62d000038452 at pc 0x7fd37561c5cf bp 0x7fffddd55ba0 sp 0x7fffddd55b98
READ of size 1 at 0x62d000038452 thread T0
    #0 0x7fd37561c5ce in ASFProcessSC_CheckSrvcComp ../Sources/ASFServices_Common/C/asfprocesssc.c:2119
    #1 0x7fd37560a062 in ASFProcessSPU_CheckAllSrvcComp ../Sources/ASFServices_Common/C/asfprocessspu.c:1621

Like so?

awk '/ERROR: AddressSanitizer/ {L = 1} L && /\.c/ {print "file:", $5; print "function:", $4; L = 0}' file
file: ../Sources/ASFServices_Process/C/asfrecohandling.c:1431
function: ASFPotRecoHandling_Create_RecPaxSrvcComp

Thanks Sir (y). i will check from here