Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MarkChenYutian opened this issue Jul 16, 2023 · 4 comments
Open

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

MarkChenYutian opened this issue Jul 16, 2023 · 4 comments
Labels
bug Something isn't working dependencies Pull requests that update a dependency file React UI Change in UI Layer is needed

Comments

@MarkChenYutian
Copy link
Owner

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

@MarkChenYutian MarkChenYutian added bug Something isn't working dependencies Pull requests that update a dependency file React UI Change in UI Layer is needed labels Jul 16, 2023
@MarkChenYutian
Copy link
Owner Author

This is fixed temporarily by force to re-render the graphical debug console on every step.

@moklick
Copy link

moklick commented Aug 8, 2023

You are using an old version of React Flow. Please use the new package reactflow with v11. When that's done, I can check this issue again.

@MarkChenYutian
Copy link
Owner Author

Thanks for replying! I will ping you back when I finished the upgrade for ReactFlow.

@MarkChenYutian
Copy link
Owner Author

@moklick Hi, I have bumped the version of ReactFlow to v11, but the issue still persists. Currently, I have to add a "key" prop to the graphical debug component to force re-render on every step.

@MarkChenYutian MarkChenYutian added this to the Visualizer LTS milestone Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file React UI Change in UI Layer is needed
Projects
None yet
Development

No branches or pull requests

2 participants