LB Open file crashes if used with a button

I am having problems with LB Open File component.

I’m producing a HTML file with another component, which runs fine. It outputs a path to the html file.

If I pass the path to the HTML from a panel, or use a tru/false bool on my it seems to work fine.

If I use a button, it does the job, opens the file, but the grasshopper canvas sometimes becomes unresponsive, i.e., I can zoom in and out, but not select or do anything.

So for now the workaround is no buttons, but I’ve used to much time on this to give up.

I would therefore appreciate some guidance in how to problemshoot this.

Regards,
LittleBuddha

I’m not sure that the LB Open File component is the issue here. Do you have a minimal sample file that recreates what you are talking about? (the file path can be a placeholder)

Hi.

I understand that you are sceptical :slight_smile:

This is a minimal file:
lb-Filepath_check.gh (8.8 KB)

I connected it to a minimal HTML, along these lines::

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Bad HTML</title>
</head>
<body>
  <p>I am a bad html, that crashes programs.</p>
</body>
</html>

If I repeatedly, i.e., many times, click the button sometimes the canvas becomes unresponsive. I can still click the button, but I cant move things or pan.

This is probably something that you, or the collective we, can ignore, but in my case I had a component that gave out repeated HTML files, that were connected to the LB Open filepath. And it ruined my session, the only cure being a restart of rhino.

And I then used a lot of time finding what crashed, before finding out this was the fault.

Might never happen again, to anyone else.

Thanks, @LittleBuddha ,

I just tried your sample file and I was able to click the button 20 times as fast as I could and I could not get any freezing behavior. If I just need to do it more, let me know.

I have a sense that maybe this is an issue with settings in your operating system. Or perhaps even some type of antivirus software setting that tries to limit the opening of many files at once (I can imagine this being a strategy used by certain malicious software).

Hi @chris thanks for having a look.

I guess we will just mark this down as one of the oddities of life, and hope it doesn’t happen again.

Thanks again.

Yours,
LittleBuddha