Jump to content

Recommended Posts

Posted

awesome - looks good.

ill test and let you know!

thank you VERY much - again sorry if i came off as rushing you

reeally really appreciate your help!!

Posted (edited)

quick question...

 

if @error = 0
better than?? 

if not @error
was looking at the documentation for tcprecv and didnt see an @error code of 0 but i think it works.. just thought id check with you to be sure =) Edited by gcue
Posted

if @error = 0
better than?? 

if not @error

No it's the same, personal preference :)

was looking at the documentation for tcprecv and didnt see an @error code of 0 but i think it works.. just thought id check with you to be sure =)

@error = 0 -> no error.

Br, FireFox.

Posted

i thiiiink it might be crashing only when there's 2 cameras at once. i'll have to test to be sure though.

Posted

it just crashed on me 50 minutes later

What do you mean by "crash"? Brutal script exit without any error?

If so, check the process memory size near 40mins.

Posted

looks like it still crashes even while displaying 1 camera too..

nope the memory usage peaks at 24MB and is usually around 22MB

crash = brutal crash w no error (even tried running in console mode to see if autoit caught an error - nope)

Posted

do you think its one of the variables reaching a high number or something?

im going to add this to the while loop...

_FileWriteLog($log_file, "$bRecvtmp_A: " & $bRecvtmp_A & ", " & "$sStream_A: " & $sStream_A & ", " & "$iContLenPos_A: " & $iContLenPos_A & ", " & "$iEOH_A: " & $iEOH_A & ", " & "$sTrim2ContLen_A: " & $sTrim2ContLen_A & ", " & "$iImgLen_A: " & $iImgLen_A & ", " & "$iStreamLen_A: " & $iStreamLen_A & ", " & "$hBMP_A: " & $hBMP_A & ", " & "$hHBITMAP2_A: " & $hHBITMAP2_A)
_FileWriteLog($log_file, "$bRecvtmp_B: " & $bRecvtmp_B & ", " & "$sStream_B: " & $sStream_B & ", " & "$iContLenPos_B: " & $iContLenPos_B & ", " & "$iEOH_B: " & $iEOH_B & ", " & "$sTrim2ContLen_B: " & $sTrim2ContLen_B & ", " & "$iImgLen_B: " & $iImgLen_B & ", " & "$iStreamLen_B: " & $iStreamLen_B & ", " & "$hBMP_B: " & $hBMP_B & ", " & "$hHBITMAP2_B: " & $hHBITMAP2_B & @CRLF)

have you been able to see the crash behavior?

thanks again for your help! =)

Posted (edited)

hmm maybe im logging too much this log file looks crazy!

logging these instead

 

_FileWriteLog($log_file, "$iContLenPos_A: " & $iContLenPos_A & ", " & "$iEOH_A: " & $iEOH_A & ", " & "$iImgLen_A: " & $iImgLen_A & ", " & "$iStreamLen_A: " & $iStreamLen_A & @CRLF)
Edited by gcue
Posted (edited)

other clues?

- i put in a >timer to see how long it takes when it crashes - the last two times it crashed at 01:49:16 and 01:49:23 (in both cases, 1 hour and 49 minutes later)

- could it be that the data pulls happen too frequently? i see some instances where ~300 requests occur in 1 second

im trying to set 2048 instead of 4096 to see how that plays out

 

TCPRecv($iSocket_B, 2048, 1)
Edited by gcue
Posted

Made in China, that's all I can say.

See that I don't disconnect the camera if there is a TCPRecv error because in reality the camera is not disconnected, so it may explains this amount of requests until the data is back.

It will take some time to solve the issue because as you know it does not crash fastly.

Posted (edited)

If the data is not a valid image the script will write it into a debug file and exit, I hope to find something interesting.

Attached the current script I have.

Edited by FireFox
Posted (edited)

what if we put a sleep(100) in there? i added this also...

 

If $iSocket_A <> "" Then
$bRecvtmp_B = TCPRecv($iSocket_B,...

I don't know, I'm not doing my tests on your script.

Edit: Putting a sleep won't fix the crash, it will only get down the fps.

Edited by FireFox
Posted

crashed again at 01:49:13 - doh!

hmm temporarily as a workaround i think i might have the script automatically restart after 1 hour so users stop complainin =)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...