Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Dev Space

Customize and extend the power of Alteryx with SDKs, APIs, custom tools, and more.

Python crashes Alteryx with uninitialized records

AshleyO
6 - Meteoroid

Python can cause Alteryx to crash if not all fields are set for every output record.

 

If a set_from_*/set_null is not called for every field on every output record, the underlying data structure is left uninitialized and String fields in particular can cause a crash.

For Integer/Double/Datetime fields whose contents are within the datastructure itself, downstream tools will read the uninitialized memory.
String fields are more dangerous as they appear to be stored as uninitialized pointers.

These pointers can point to anywhere in memory and depending on their contents dereferencing these pointers causes Alteryx to crash.

Sometimes Alteryx will report "You have found a bug. Replicate, then let us know. We shall fix it soon."

 

The following code snippet can cause this:
record_creator.reset()
out_record = record_creator.finalize_record()
output_anchor.push_record(out_record)

 

Alternatively see attached for a test case. Install the plugin and run the workflow. Run repeatedly, checking the browse tool each time. After a few runs Alteryx will crash. Increasing the number of String fields returned increases the likelihood of a crash. (Increasing the number of rows does not, as the same memory structure is reused each time.)

2 REPLIES 2
TashaA
Alteryx Alumni (Retired)

Thanks for sharing @AshleyO, I'm going to share this with our team to investigate!

 

-Tasha

TashaA
Alteryx Alumni (Retired)

@AshleyO

 

Quick follow up, we have this logged in our defect tracking system, and will post in this thread if we plan to release a change in the future.

 

Thanks!