-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
windows tcp bug? #38
Comments
Hello @tenkavideo and @peterkvt80 I believe the issue lies in the use of this function I believe this is the reason why Vbit2 is needing a restart after an error occurs because it's dead and unable to listen and establish a new TCP connection. A more graceful approach might be to handle the error without exiting the entire process, perhaps by issuing a command error dropping the connection. The Handler function is responsible for managing incoming client connections. It reads data from the client socket and processes it. If an the value is <= to zero during data reception (as indicated by Peter, What tenkavideo is alluding to is an issue with the P command which I can't help with sorry? The command handler loop in the Handler function may need extra checks against client disconnections and errors. Add additional error handling to manage different types of exceptions or unexpected behaviours from the client side which I haven't looked into? May need to handle malformed requests? Replace below:-
With:
|
thx so much! |
Hopefully, @peterkvt80 or @ZXGuesser could at least patch TCPclient not kill vbit2 process for the disconnect. However, I'd prefer all errors to be handled with a response. |
This code hasn't been significantly worked on for a very long time and there's been some fairly large changes to the pagelists since then to solve some hard crashes, which may have broken something this code was trying to do. |
Hello Z
Do I think will possible to make it working?
R and L command work but the bog issue is that I cannot select a page with
P command
Il sab 18 nov 2023, 00:13 ZXGuesser ***@***.***> ha scritto:
… This code hasn't been significantly worked on for a very long time and
there's been some fairly large changes to the pagelists since then to solve
some hard crashes, which may have broken something this code was trying to
do.
I would note though that the last commit message for selecting and
modifying pages in the command handler reads Not working correctly. so
maybe it's always been like this
—
Reply to this email directly, view it on GitHub
<#38 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZDH7WEAH3SUCMBAGKFTM7DYE7VQ7AVCNFSM6AAAAAA7IJCZA2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJXGIZTKNRTGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I believe the command interface is working fine and the call to pageList::Match is crashing |
I think so, somebody can fix this part?
I need it for send subtitles to a page for give accessibility to a Church
channel
Il sab 18 nov 2023, 00:30 ZXGuesser ***@***.***> ha scritto:
… I believe the command interface is working fine and the call to
pageList::Match is crashing
—
Reply to this email directly, view it on GitHub
<#38 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZDH7WGKLR3PLWBQ5O2S6Y3YE7XPZAVCNFSM6AAAAAA7IJCZA2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJXGI2DONRTGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hello again @tenkavidee. Until vbit2 remote 'P command' is working? Have you tried ffmpeg SRT (SubRip) and mux it directly from a file? https://www.bannerbear.com/blog/how-to-add-subtitles-to-a-video-file-using-ffmpeg/ Just a thought? Or are you injecting on the fly? |
Hello S
I need to do on live events so I need to do it on the fly,so teletext will
be perfect for that
Il sab 18 nov 2023, 00:47 Sonny Walkman ***@***.***> ha
scritto:
… Hello again @tenkavidee.
Until vbit2 remote 'P command' is working? Have you tried ffmpeg SRT
(SubRip) and mux it directly from a file?
https://www.bannerbear.com/blog/how-to-add-subtitles-to-a-video-file-using-ffmpeg/
Just a thought? Or are you injecting on the fly?
—
Reply to this email directly, view it on GitHub
<#38 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZDH7WGDLNTHGKY7ZUVN67TYE7ZSDAVCNFSM6AAAAAA7IJCZA2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJXGI3DCNRVGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hello @t,
Ok, yes direct injection as teletext is far easier for your needs.
Here in Australia subtitles are mandatory and injected as teletext on page
801. I know this by analysing the DVB transport stream in detail on the
private PES.
If both the TCPClient handling to stop killing the process and the what
ZXGuesser has found with page handler I believe vbit2 will do serve most
people’s needs.
Peter could look into sorting the page issues and refactoring the TCPClient
function?
I could do it myself however I haven’t set up a dev for C++
I very happy ZXGuesser as added the TS encapsulation!
A BIG Thankyou from me ZXGuesser!!
Sonny
…On Sat, 18 Nov 2023 at 10:50 am, Muxertester ***@***.***> wrote:
Hello S
I need to do on live events so I need to do it on the fly,so teletext will
be perfect for that
Il sab 18 nov 2023, 00:47 Sonny Walkman ***@***.***> ha
scritto:
> Hello again @tenkavidee.
>
> Until vbit2 remote 'P command' is working? Have you tried ffmpeg SRT
> (SubRip) and mux it directly from a file?
>
https://www.bannerbear.com/blog/how-to-add-subtitles-to-a-video-file-using-ffmpeg/
>
> Just a thought? Or are you injecting on the fly?
>
> —
> Reply to this email directly, view it on GitHub
> <#38 (comment)>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AZDH7WGDLNTHGKY7ZUVN67TYE7ZSDAVCNFSM6AAAAAA7IJCZA2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJXGI3DCNRVGA>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
—
Reply to this email directly, view it on GitHub
<#38 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AM4O2S4QVDXBDYKCY4GEH5DYE7Z25AVCNFSM6AAAAAA7IJCZA2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJXGI3DGMJYGA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Yes very happy for zx work! |
pageNumber passed in most likely needs to be checked for range? 100-899? Return error is out of range. @peterkvt80 maybe able to look at why the function crashes? |
Hello Rob
Thx for take care of this
On depends of number of pages also L and R crash for the same reason
Hope can be fix!
Il ven 24 nov 2023, 01:43 Sonny Walkman ***@***.***> ha
scritto:
… I believe the command interface is working fine and the call to
pageList::Match is crashing
`int PageList::Match(char* pageNumber)
{
int matchCount=0;
std::cerr << "[PageList::FindPage] Selecting " << pageNumber << std::endl;
int begin=0;
int end=7;
for (int mag=begin;mag<end+1;mag++)
{
// For each page
for (std::list<TTXPageStream>::iterator p=_pageList[mag].begin();p!=_pageList[mag].end();++p)
{
TTXPageStream* ptr;
char s[6];
char* ps=s;
bool match=true;
for (ptr=&(*p);ptr!=nullptr;ptr=(TTXPageStream*)ptr->Getm_SubPage()) // For all the subpages in a carousel
{
// Convert the page number into a string so we can compare it
std::stringstream ss;
ss << std::hex << std::uppercase << std::setw(5) << ptr->GetPageNumber();
strcpy(ps,ss.str().c_str());
// std::cerr << "[PageList::FindPage] matching " << ps << std::endl;
for (int i=0;i<5;i++)
{
if (pageNumber[i]!='*') // wildcard
{
if (pageNumber[i]!=ps[i])
{
match=false;
}
}
}
}
if (match)
{
matchCount++;
}
ptr->SetSelected(match);
}
}
// Set up the iterator for commands that use pages selected by the Page Identity
_iterMag=0;
_iter=_pageList[_iterMag].begin();
return matchCount; // final count
}`
*pageNumber* passed in most likely needs to be checked for range?
100-899? Return error is out of range. @peterkvt80
<https://github.com/peterkvt80> maybe able to look at why the function
crashes?
—
Reply to this email directly, view it on GitHub
<#38 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZDH7WDHZTXSNIGE73FHVADYF7UT7AVCNFSM6AAAAAA7IJCZA2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRVGAZDKOJZGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
0b8613d fixes the crash in FindPage::Match caused by it accessing a null pointer rather than the subpages it was (presumably) intending to. There's still a lot of dragons lurking in this code that will crash the process, caused by missing bounds checking and the like. |
Thanks for your work @ZXGuesser, |
I've been unable to replicate a broken socket and whenever I disconnect it goes back to |
Hello!
If u can provide the windows binary I can test for u
Da: ZXGuesser ***@***.***>
Inviato: mercoledì 13 dicembre 2023 12:18
A: peterkvt80/vbit2 ***@***.***>
Cc: Muxertester ***@***.***>; Mention ***@***.***>
Oggetto: Re: [peterkvt80/vbit2] windows tcp bug? (Issue #38)
I've been unable to replicate a broken socket and whenever I disconnect it goes back to Ready for a client to connect as expected. It would help to know what you actually do to cause the error.
—
Reply to this email directly, view it on GitHub <#38 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AZDH7WGRXUZM2RGNHEWAVJ3YJGFIHAVCNFSM6AAAAAA7IJCZA2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJTG4ZDSMBXGA> .
You are receiving this because you were mentioned. <https://github.com/notifications/beacon/AZDH7WBYAM22OGDJJ3E7MGDYJGFIHA5CNFSM6AAAAAA7IJCZA2WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTOPWUS4.gif> Message ID: ***@***.*** ***@***.***> >
|
Hello, I'm encountering an issue with Ncat on Windows. Whenever I send a "P310000" command or any other page command, the vbit2 application closes the connection, and it becomes impossible to reconnect until the process is restarted
tries on windows 11,telnet,ncat ,putty,windows firewall off
teefax demo pages
default vbit config, plus connection vars on port 5570
this vbit answer to P310000 command
[TCPClient::addChar] finished cmd='7
[PageList::FindPage] Selecting 31000
thx!
The text was updated successfully, but these errors were encountered: