KissXML icon indicating copy to clipboard operation
KissXML copied to clipboard

DDXMLNode XMLStringWithOptions crash.

Open ifgs1 opened this issue 6 years ago • 4 comments

Hello, i am creating this issue since there is a crash that is continuously growing and we already identified.

Screen Shot 2019-05-27 at 12 22 22 PM

The crash is due to a code that is using a function that is deprecated.

According to libxml2 library, we found that XMLNodeDump is deprecated based on: http://www.xmlsoft.org/html/libxml-tree.html#xmlNodeDump

"structures it is limited to 2GB and somehow deprecated, use xmlBufNodeDump() instead"

The issue is really hard to reproduce but we where able to track the root cause.

Captura de pantalla 2019-05-27 a la(s) 12 23 00 p  m

ifgs1 avatar May 27 '19 17:05 ifgs1

This is a dupe of #105

What is your proposed patch and have you confirmed it fixes the crashes you are experiencing in production?

chrisballinger avatar May 27 '19 18:05 chrisballinger

Hey @chrisballinger thanks for your quick response, so basically we are having these 2 crashes one in DDXMLNode.m - Line 1171 and the other on DDXMLNode.m line 1187. I am attaching screenshots for our crash logs:

Screen Shot 2019-05-27 at 3 02 43 PM Screen Shot 2019-05-27 at 3 02 52 PM

ifgs1 avatar May 27 '19 20:05 ifgs1

@chrisballinger According to libxml2 library you should be using xmlBufNodeDump() instead, but we have no certainty this will solve the issue, since right now we couldn't reproduce this issue. it seems to be related to #105.

We think it might be because of the way this functions try to convert the xml children, but tried with multiple XML stanzas and didn't succeed reproducing this.

diegosalazarCO avatar May 27 '19 20:05 diegosalazarCO

@ifgs1 @diegosalazarCO Have you tried running a patched version and seeing if it affects the crash rate? If it resolves the issue please submit a pull request.

Thank you!

chrisballinger avatar Jun 03 '19 01:06 chrisballinger