Scilab 2024 & 2025 crashes when running XCOS simulation, while 2023 works fine

I have an HP ZBook running Windows 11. I installed Scilab 2025.1.0 on it after successfully running Scilab 2023.1.0 on it for the last two years. (I wanted to upgrade Scilab) When I open XCOS and try simulating a simple diagram, it immediately crashes and closes Scilab & XCOS. I’ve even tried opening the Xcos Demonstrations (?>Scilab Demonstrations>Xcos>Control Systems>Water Tank) simulations and get the same response. Afterward, I installed Scilab 2024.1.0 and get the same result of crashing Scilab/XCOS. My Scilab 2023.1.0 still works fine. I don’t know how to begin troubleshooting this problem. I am not able to find any log files. By the way, I installed Scilab 2025.1.0 on my linux machine (Linux Mint 22.1), and it works fine … as expected. Has anyone else experienced this issue or anyone able provide guidance for how to identify and/or fix this issue. Thank you, Philip

P.S. I’ve reviewed the two other postings (App close when I want to simulate the demo of XCOS) and (Xcos diagram crashes Scilab) which seem related. I might be too much of a newbie, but I had difficulty understanding the progression of troubleshooting, or the solution.

I added a Debug: xcos_debug_gui(flag,block) to a simple graphic, just to see if it would catch an error and stop before closing the program. Here is the result:

I am using the default parameters in each of the blocks. I am not sure why it is giving this error. By the way, this is Scilab 2024. The 2025 version was giving the same error, but when I went to capture it and re-ran the program, it just completely crashed and the Debug block would not work again for Scilab 2025.

Hello,

Can you delete all your previous user settings (remove the whole folder AppData/Roaming/Scilab) and test again ?

S.

Hello,

I have experienced the same behavior with Scilab 2025.1: Several XCOS demo just crash after started. (some others run well)

I am running Scilab 2025.1 on Win 10 - 64 bits.

Regards

Cedric

Yes I can. For which versions, 2024 and 2025? Or should I also delete 2023?

remove all of them, please

I am not finding the Scilab folders under ProgramData/AppData … there is no Roaming folder. The AppData folder is faded. I think my organization limits my ability to access it. I can find the Scilab in the Settings/Installed apps … and I can uninstall them from there. But I am assuming you want me to find the folders and delete them, rather than “Uninstall”?

that’s the AppData folder in your home user folder.

I found the folder and deleted it. Should I reinstall Scilab 2025? I have downloaded the compiled .exe file from the Scilab website for Windows.

Yes. And please, install latest Scilab version 2025.1

I am installing Scilab 2025. And I am choosing the default components.

That was a much longer install than when I first installed 2025. But I launched it after the install and built a simple XCOS simulation consisting of step function, transfer function, scope and clock. And it crashed and closed all Scilab and XCOS windows. I restarted Scilab/XCOS and ran the first XCOS demonstration Demonstrations>Xcos>Standard demos>Simple Demo … and it ran. I then closed that demo and opened the next one, the Bouncing Balls and tried to run it. It crashed and closed all Scilab and XCOS windows. I’ve restarted Scilab/XCOS and tried the Bouncing Balls demo again, and it worked. I stopped the simulation and tried to re-run it, and Scilab/XCOS crashed/closed again. I restarted Scilab/XCOS and re-ran the Bouncing Balls demo, and it worked. I stopped it, closed it, and tried to run the Simple Demo again … and it crashed/closed. I restarted Scilab/XCOS and tried the Simple Demo again, and it crashed/closed. I tried again, same result.

It seems like at best, it’ll run one XCOS simulation, but then crash if I try to run it a second time, or another simulation.

OK. What you can test next is to create a new user on your machine and run Scilab from there.

S.

Unfortunately, I have no ability to create a new user on my machine. But I do have a spare home computer that has Windows. It has never had Scilab on it, I could download it and try it on that machine.

But first, I think I am going to remove Scilab 2025 from my work computer and reinstall Scilab 2023 and see if it works.

I deleted the Scilab folder and reinstalled 2023. I was able to open, run, close, and re-open/re-run the demos without any crashing/closing. It is going to take me awhile before I can try Scilab 2025 on my home Windows computer. I’ll report back when I do.

I installed Scilab 2025 on my home Windows computer, and it worked … no crashing/closing when I ran XCOS demo simulations. Same is true for Scilab 2024. I noticed the installation on my home Windows computer (versus my work Windows computer) is that both Scilab versions were installed in C:\Program Files\Scilab-2025.1.0 and C:\Program Files\Scilab-2024.1.0 folders … not in C:\User\\AppData\Roaming\Scilab folder as it is on my work computer.

It seems like there is something (program or other) that Scilab 2024 & Scilab 2025 has inconsistent access to, that Scilab 2023 does not use, on my work computer (a managed computer).

Thanks for your analysis. There have been some issues (that were fixed) with managed computers, but they were rather of access rights type, not random crashes like the ones you report. If you could describe the kind of restrictions you have on your computer at work (besides the installation of Scilab done in the user account) it may help us to investigate further.

S.

On my work computer, my company gives us a way to elevate our accounts to have administrator privileges on our computers for 10 minutes at a time. I deleted all my Scilab versions (removing them from AppData>Roaming>), then elevated my privileges, and then reinstalled Scilab 2025. It installed into Program Files directory. While my account was elevated, I ran the Scilab Xcos demos. It ran the first time, but then crashed/closed when I would try running them again.

My IT guy had me open the Event Viewer and look under Windows Logs>Applications. It was capturing the following Application Error:

Faulting application name: WScilex.exe, version: 2025.1.0.0, time stamp: 0x682efb21
Faulting module name: ucrtbase.dll, version: 10.0.22621.3593, time stamp: 0x10c46e71
Exception code: 0xc0000409
Fault offset: 0x000000000007e008
Faulting process id: 0x0x4090
Faulting application start time: 0x0x1DC21C82EC23D33
Faulting application path: C:\Program Files\scilab-2025.1.0\bin\WScilex.exe
Faulting module path: C:\WINDOWS\System32\ucrtbase.dll
Report Id: ac38f84e-9d26-42a1-a74b-8b1217eaa5a0
Faulting package full name:
Faulting package-relative application ID:

He suggested that I try changing & running the WScilex.exe in compatibility mode (Properties>Compatibility). So I changed it to Windows 8, which was the latest Windows version available):

This significantly improved being able to open and run XCOS and run the demos, but did not completely eliminate the crashing/closing of Scilab/XCOS. I was able to open XCOS and build a simple diagram and run it. I was able to add to the diagram and change parameters, and it continued to run without crashing. I could change the transfer function parameters, add different sources, etc., and it would continue to work.

Then I tried running the demos. I was able to open and run about 5 or 6 of them before it would crash. Sometimes I would change the a parameter value in the demos and re-run it before opening the next demo to run. But eventually, Scilab/Xcos would crash. One particular demo that I could get it to crash regularly was the Xcos>Control Systems>Water Tank demo. I would open and run it, change the controller tuning, and run it. Change the controller setpoint and run it. I would keep doing this, but eventually after 8 to 12 runs, Scilabl/Xcos would crash.

So from the event log above, there are two lines of interest:

Faulting application path: C:\Program Files\scilab-2025.1.0\bin\WScilex.exe
Faulting module path: C:\WINDOWS\System32\ucrtbase.dll

When I did not change the compatibility mode for WScilex.exe to Windows 8, Scilab/Xcos would crash immediately, every time I tried running it. And it would generate the same error in the event log. When I changed the compatibility mode for WScilex.exe to Windows 8, it would run multiple times, but when it did crash, it would generate the same error in the event log.

So there seems to be a compatibility issue with WScilex.exe and ucrtbase.dll for Windows 11, at least for my work computer. I am flattening my home Windows machine and reinstalling Windows on it … it is currently in its 12th hour of installing. When it is done, I am going to reinstall Scilab 2025 and try running all the demos multiple times, changing parameters, seeing if I can get it to crash.

ucrtbase.dll seems to be part of the Visual C++ Redistributable Package. Can you uninstall and reinstall the latest version of this package ? You could even try to run Scilab before reinstalling it.

S.

I do not think I have the ability to uninstall/reinstall urctbase.dll. I’ll ask my IT guy if there is a way to get the latest version of it. Do you know of a way to see its '“version”? Its ‘Date modified’ is 8/6/2024.

I clicked on Properties on the file and might have answered my own question.

File version 10.0.22621.3593