joaorobertoct2 / x-superobject

Automatically exported from code.google.com/p/x-superobject
0 stars 0 forks source link

TSerielizeParse can lead to stack overflow #52

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try to serialize an visual component on a form

What is the expected output? What do you see instead?

Expect full JSON. See instead a stack overflow as the TSerializeParse tries to 
recurse through all fields and properties not just published. This means that 
when it gets to the Owner and Parent properties of the Visual component, it 
serializes the Form which has the original component in its components list (as 
well as maybe its ActiveControl property). Either route leads to a recursion 
loop which ultimately overflows memory.

What version of the product are you using? On what operating system?

Latest source

Please provide any additional information below.

Would be good to allow user determination of visibility of properties and 
fields that get serialized (attached is a file showing slight modifications to 
that class)

Original issue reported on code.google.com by baylis.a...@gmail.com on 18 Oct 2014 at 11:12

Attachments:

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r85.

Original comment by onryld...@gmail.com on 5 Nov 2014 at 9:06

GoogleCodeExporter commented 9 years ago
Simple usage:
TSerializeParseOptions.Visibilities := [mvPrivate, mvProtected, mvPublic, 
mvPublished];

Original comment by onryld...@gmail.com on 5 Nov 2014 at 9:07