Skip to content

[Bug Report] Memory Diagram not showing edges properly #41

@MarkChenYutian

Description

@MarkChenYutian

Describe the bug

Occasionally, the memory diagram view of Debug Console does not render the edges in memory diagram. The nodes and handles on node are rendered correctly but the edge disappear.

⚠️ Notes

  1. This bug might be related with third-party library ReactFlow we used for rendering flow graph
  2. This bug might be related with browser compatibility, there are reports showing that this bug does not exist on FireFox.

To Reproduce
Steps to reproduce the behavior:

  1. Compile the following code
#use <conio>
#use <util>
#use <string>

struct mess{
    char* u;
    int*  w;
    int**  x;
    int** y;
    int[] z;
};
typedef struct mess* mess_t;

int main() {
    int n = 4;
    int *a = alloc(int);
    int *b = alloc(int);
    int *c = alloc(int);
    int[] d = alloc_array(int, n);
    int **e = alloc(int*);
    mess_t m = alloc(struct mess);
    *a = 4;
    *b = n * (*c);
    *c = n + d[0];
    d[0] = n;
    d[1] = *b;
    m->x = e;
    *m->x = b;
    m->y = e;
    *(*m->y) = *a;
    m->w = a;
    m->z = d;
    return 1;
}
  1. Switch the debug view to graphical view
  2. Execute to the line m -> x = e;
  3. The pointer between struct m and e does not show on the graphical debug console.

Expected behavior

An edge should exist between m.x and e.

Screenshots

image

Code being executed

As shown above

Additional context

This problem might be related with xyflow/xyflow#3171

Metadata

Metadata

Assignees

No one assigned

    Labels

    React UIChange in UI Layer is neededbugSomething isn't workingdependenciesPull requests that update a dependency file

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions