tmr232/Sark

Error showing NXGraph

Closed this issue · 8 comments

import sark
graph = sark.get_nx_graph(sark.Function().ea)
viewer = sark.ui.NXGraph(graph, title="My Graph", handler=sark.ui.AddressNodeHandler())
viewer.Show()
creates the following error message:
image

I've seen this error in the past, but had no luck yet solving it.
Can you give some information on what triggered it?
OS, IDA version, architecture of IDB, anything that might be useful.

Windows 7, IDA 64bit 6.8.150423, x64 elf binary.
The Show() method trigged it

Any chance you can share an elf or IDB that reproduces it?

I can tell for sure that the problem is in the _OnNodeInfo function in NXGraph class.
The error occurs when calling self.SetNodeInfo(node_id, node_info, flags).
I can confirm all is working with commenting out the SetNodeInfo line.
BTW I don't think it's problem with my IDB, it happens with all the idbs I try with.
Perhaps it's a problem with the specific IDA version I have.

@oded-el Does this reproduce in IDA 7?

Finally got around to it...
From my testing, it seems to be an issue with IDA itself. I contacted support and am waiting for their reply.

Confirmed with Hex-Rays that this is a bug in IDA. I'll update as soon as I have anything more to say.

Got the response from Hex Rays.
The bug was in the following line - https://github.com/idapython/src/blob/master/pywraps.cpp#L1513 - an ea not a ulong.
The attached file is a fix for IDA7.3. If you need a fix for another version, contact support.

idapython.zip