Coppelia crashes when calling sim.launchExecutable from an addon

Typically: "How do I... ", "How can I... " questions
Post Reply
Klish132
Posts: 3
Joined: 10 May 2022, 17:21

Coppelia crashes when calling sim.launchExecutable from an addon

Post by Klish132 »

I'm trying to make an addon that launches an exe file but it crashes when calling sim.launchExecutable. Weird thing is that if I directly copy and paste the addon code into a dummy customization script without making anychanges it works fine. I'm thinking the issue might have something to do with coroutines and threads, but I can't figure it out myself.
I tried using os.execute and it works but coppelia compeltely freezes while exe is working and I don't want that.
Would appreciate any help with this!

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: Coppelia crashes when calling sim.launchExecutable from an addon

Post by coppelia »

Hello,

indeed, there is a bug. Thanks for pointing this out.
You can use simSubprocess.exec or simSubprocess.execAsync as a workaround.

Cheers

Klish132
Posts: 3
Joined: 10 May 2022, 17:21

Re: Coppelia crashes when calling sim.launchExecutable from an addon

Post by Klish132 »

coppelia wrote: 11 May 2022, 09:05 Hello,

indeed, there is a bug. Thanks for pointing this out.
You can use simSubprocess.exec or simSubprocess.execAsync as a workaround.

Cheers
simSubprocess.execAsync worked like a charm, thank you so much!

Post Reply