![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
PostJobFree crawler found web page that causes fatal crash in AngleSharp parser:
We cannot catch that exception and it simply restarts the whole process (PostJobFreeService Windows service).
That is very frustrating.
In development environment that crash is not always reproducible.
When we run code above in test - it just works.
But if we run the same code under Visual Studio debugger - it crashes with 'System.StackOverflowException'.
Update:
https://github.com/AngleSharp/AngleSharp/issues/523
AngleSharp library maintainers noticed that problematic page contains a lot of "<content /><content /><content /><content />" attributes.
view-source:http://onestop.fiu.edu/financial-aid/loans/
Obviously it is not an excuse to fail. Hopefully their latest build would fix the problem.
using AngleSharp.Parser.Html; ..... string pageHtml = LoadUrlContent("http://onestop.fiu.edu/financial-aid/loans/") var parser = new HtmlParser(); var document = parser.Parse(pageHtml); document.QuerySelectorAll("a"); // Fatal crash: "An unhandled exception of type 'System.StackOverflowException' occurred in AngleSharp.dll".
We cannot catch that exception and it simply restarts the whole process (PostJobFreeService Windows service).
That is very frustrating.
In development environment that crash is not always reproducible.
When we run code above in test - it just works.
But if we run the same code under Visual Studio debugger - it crashes with 'System.StackOverflowException'.
Update:
https://github.com/AngleSharp/AngleSharp/issues/523
AngleSharp library maintainers noticed that problematic page contains a lot of "<content /><content /><content /><content />" attributes.
view-source:http://onestop.fiu.edu/financial-aid/loans/
Obviously it is not an excuse to fail. Hopefully their latest build would fix the problem.
no subject
Date: 2017-01-28 01:42 am (UTC)no subject
Date: 2017-01-28 01:31 pm (UTC)"У них" - это у кого?
У "программистов" вообще?
У тех, кто пишет под C#.NET?
> Я бы поэкспериментировал.
В каком направлении?
Минимизировать размер тестируемой распарсиваемой страницы, которая приводит к StackOverflowException?
> селениум
А Селениум надёжно работает и не повисает ни на чём?
И как у него с производительностью?
no subject
Date: 2017-01-28 04:11 pm (UTC)Экспериментировать, например, с селениумом. Надежность у него не 100%, конечно. Производительность тоже не супер.
Но есть одно важное свойство - страница у него живая, а не как у тебя, когда просто по url считывается страница. Нынче же хитро, single-page app с джаваскриптом кругом.
no subject
Date: 2017-01-28 05:55 pm (UTC)AngleSharp is a third-party library.
Does Java platform have reliable parsers (that do not crash their process with any input)?
> Надежность у него не 100%, конечно.
Sigh...
> Нынче же хитро, single-page app с джаваскриптом кругом.
We do not care much about javascript-generated data.
At least yet.
There are plenty of data available in pure HTML.
We should make that basic HTML crawling/parsing process stable first.
AngleSharp library maintainers hint that recent build may solve the failure problem... will see.
no subject
Date: 2017-01-28 06:46 pm (UTC)no subject
Date: 2017-01-29 12:18 am (UTC)Есть ли заветное место, где программисты есть, но проблем с программистами нет?
no subject
Date: 2017-01-29 02:12 am (UTC)no subject
Date: 2017-01-29 03:21 am (UTC)А если серьёзно - в НАСА они пишут программы очень, очень долго.
В постоянно меняющемся мире это очень большая проблема.