# MolFlow crashes when I try to import simple STL file

**URL:** <https://molflow-forum.web.cern.ch/t/molflow-crashes-when-i-try-to-import-simple-stl-file/471>\
**Category:** Bugs & Issues\
**Created:** [June 10, 2022, 11:41am UTC](https://molflow-forum.web.cern.ch/t/molflow-crashes-when-i-try-to-import-simple-stl-file/471 "2022-06-10T11:41:21Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![guest\_chris.walker](https://molflow-forum.web.cern.ch/letter_avatar_proxy/v4/letter/g/d26b3c/32.png) [@guest\_chris.walker](https://molflow-forum.web.cern.ch/u/guest_chris.walker)\
**Post date:** [June 10, 2022, 11:41am UTC](https://molflow-forum.web.cern.ch/t/molflow-crashes-when-i-try-to-import-simple-stl-file/471/1 "2022-06-10T11:41:21Z")

</div>

I created an STL file (as a test) from a simple online cube STL file. I have copy and pasted the contents of the file below. I find that MolFlow crashes when it tries to read this file. Are there any ideas what might be happening ?  
Thanks  
Chris

solid AssimpScene  
facet normal 0 0 1  
outer loop  
vertex -35 60 20  
vertex -55 60 20  
vertex -35 40 20  
endloop  
endfacet

facet normal 0 0 1  
outer loop  
vertex -35 40 20  
vertex -55 60 20  
vertex -55 40 20  
endloop  
endfacet

facet normal 0 0 -1  
outer loop  
vertex -35 40 0  
vertex -55 40 0  
vertex -35 60 0  
endloop  
endfacet

facet normal 0 0 -1  
outer loop  
vertex -35 60 0  
vertex -55 40 0  
vertex -55 60 0  
endloop  
endfacet

facet normal 0 -1 0  
outer loop  
vertex -55 40 20  
vertex -55 40 0  
vertex -35 40 20  
endloop  
endfacet

facet normal 0 -1 0  
outer loop  
vertex -35 40 20  
vertex -55 40 0  
vertex -35 40 0  
endloop  
endfacet

facet normal -1 0 0  
outer loop  
vertex -55 60 20  
vertex -55 60 0  
vertex -55 40 20  
endloop  
endfacet

facet normal -1 0 0  
outer loop  
vertex -55 40 20  
vertex -55 60 0  
vertex -55 40 0  
endloop  
endfacet

facet normal 0 1 0  
outer loop  
vertex -35 60 20  
vertex -35 60 0  
vertex -55 60 20  
endloop  
endfacet

facet normal 0 1 0  
outer loop  
vertex -55 60 20  
vertex -35 60 0  
vertex -55 60 0  
endloop  
endfacet

facet normal 1 0 0  
outer loop  
vertex -35 40 20  
vertex -35 40 0  
vertex -35 60 20  
endloop  
endfacet

facet normal 1 0 0  
outer loop  
vertex -35 60 20  
vertex -35 40 0  
vertex -35 60 0  
endloop  
endfacet

endsolid AssimpScene

---

<div class="post-metadata">

**Author:** ![pbahr](https://molflow-forum.web.cern.ch/user_avatar/molflow-forum.web.cern.ch/pbahr/32/14_2.png) [@pbahr](https://molflow-forum.web.cern.ch/u/pbahr)\
**Post date:** [June 10, 2022, 3:26pm UTC](https://molflow-forum.web.cern.ch/t/molflow-crashes-when-i-try-to-import-simple-stl-file/471/2 "2022-06-10T15:26:58Z")

</div>

Hi Christopher,

could you clarify whether you are trying to `load` or `insert` the STL file? For the latter there has been a bug, for which I have a fix scheduled that I could release today for the development version and that would be part of a new release that can hopefully follow in the upcoming weeks.

Best regards,  
Pascal

---

<div class="post-metadata">

**Author:** ![guest\_chris.walker](https://molflow-forum.web.cern.ch/letter_avatar_proxy/v4/letter/g/d26b3c/32.png) [@guest\_chris.walker](https://molflow-forum.web.cern.ch/u/guest_chris.walker)\
**Post date:** [June 10, 2022, 3:32pm UTC](https://molflow-forum.web.cern.ch/t/molflow-crashes-when-i-try-to-import-simple-stl-file/471/3 "2022-06-10T15:32:57Z")

</div>

Hi Pascal,  
Thanks for your response. I was trying to insert the file. However, I was using the latest beta release of Molflow. I just tried with an earlier version and the problem goes away.  
Best wishes  
Chris

---

<div class="post-metadata">

**Author:** ![pbahr](https://molflow-forum.web.cern.ch/user_avatar/molflow-forum.web.cern.ch/pbahr/32/14_2.png) [@pbahr](https://molflow-forum.web.cern.ch/u/pbahr)\
**Post date:** [June 10, 2022, 3:45pm UTC](https://molflow-forum.web.cern.ch/t/molflow-crashes-when-i-try-to-import-simple-stl-file/471/4 "2022-06-10T15:45:52Z")

</div>

Great!  
In case you want to work with a more recent version, you can take a look at the current development build that contains a fix to the problem.  
For Windows you can download it here: [https://gitlab.cern.ch/molflow\_synrad/molflow/-/jobs/22446685/artifacts/download?file\_type=archive](https://gitlab.cern.ch/molflow_synrad/molflow/-/jobs/22446685/artifacts/download?file_type=archive)

Best regards,  
Pascal

---

<div class="post-metadata">

**Author:** ![rparise](https://molflow-forum.web.cern.ch/letter_avatar_proxy/v4/letter/r/d78d45/32.png) [@rparise](https://molflow-forum.web.cern.ch/u/rparise)\
**Post date:** [June 27, 2022, 9:30am UTC](https://molflow-forum.web.cern.ch/t/molflow-crashes-when-i-try-to-import-simple-stl-file/471/5 "2022-06-27T09:30:09Z")

</div>

Hi Pascal,

I’ve generate a STL file from NX12, in both .stl and .txt formats.  
I’ve tried to open (Insert geometry \> To current structure) with 2.8.6 (Mar 29) and 2.9.5 (Jun 10).  
Anyway, it didn’t work out.

Am I doing something wrong?

Thanks

![Molflow error](https://molflow-forum.web.cern.ch/uploads/default/original/1X/d6005864b45ffc77401aeb1cf31dcddeb7873af2.jpeg)

---

<div class="post-metadata">

**Author:** ![maarton](https://molflow-forum.web.cern.ch/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@maarton](https://molflow-forum.web.cern.ch/u/maarton)\
**Post date:** [June 27, 2022, 10:32am UTC](https://molflow-forum.web.cern.ch/t/molflow-crashes-when-i-try-to-import-simple-stl-file/471/6 "2022-06-27T10:32:15Z")

</div>

Hello Chris,

Pascal has left Cern, I’m taking this issue over.

1. What is NX12?
2. How did you generate the TXT file?
3. Is the STL in Ascii format?
4. If yes, could you share (DM or attaching here) the txt and stl files?

Thabk you, Marton

---

<div class="post-metadata">

**Author:** ![rparise](https://molflow-forum.web.cern.ch/letter_avatar_proxy/v4/letter/r/d78d45/32.png) [@rparise](https://molflow-forum.web.cern.ch/u/rparise)\
**Post date:** [June 27, 2022, 10:41am UTC](https://molflow-forum.web.cern.ch/t/molflow-crashes-when-i-try-to-import-simple-stl-file/471/7 "2022-06-27T10:41:41Z")

</div>

Hello Marton,

1. NX is a Siemens CAD software similar to Inventor, Spaceclaim…
2. I have generated the txt file by exporting the original file from NX.
3. In NX there are two options: “Binary” and “Text”. Binary gives a STL file and Text, a txt file. I don’t know if they are in ASCII format.
4. It says that new users can’t share files here.

Thanks,

Ricardo

---

<div class="post-metadata">

**Author:** ![maarton](https://molflow-forum.web.cern.ch/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@maarton](https://molflow-forum.web.cern.ch/u/maarton)\
**Post date:** [June 27, 2022, 11:33am UTC](https://molflow-forum.web.cern.ch/t/molflow-crashes-when-i-try-to-import-simple-stl-file/471/8 "2022-06-27T11:33:31Z")

</div>

1. Thank you
2. NX uses a proprietary format for TXT export. Only (old, legacy) Molflow-generated TXT insert is supported by Molflow.
3. Please export the STL file with “text” option, which is in other words ASCII. It should have STL extension, and should be importable by Molflow. Let me know if still not.
4. Please help us solve this, other users reported the same, and I couldn’t reproduce it with test accounts. Please post screenshots of the exact error message you get, and I’ll contact Discourse admins to fix the permission issue. Thank you!

---

<div class="post-metadata">

**Author:** ![rparise](https://molflow-forum.web.cern.ch/letter_avatar_proxy/v4/letter/r/d78d45/32.png) [@rparise](https://molflow-forum.web.cern.ch/u/rparise)\
**Post date:** [June 27, 2022, 1:13pm UTC](https://molflow-forum.web.cern.ch/t/molflow-crashes-when-i-try-to-import-simple-stl-file/471/9 "2022-06-27T13:13:43Z")

</div>

1. So what I’ve done was: exported the STL file with “text” format. It was a .txt file.  
Then I manually changed to .stl . And now it works for MolFlow 2.9.5 (Jun 10). =D  
But still gives the same error for MolFlow 2.8.6 (Mar 29).

2. The error messages from the previous tests are below: (please notice the Molflow version and the file extension.)  
 ![Molflow error](https://molflow-forum.web.cern.ch/uploads/default/original/1X/d6005864b45ffc77401aeb1cf31dcddeb7873af2.jpeg)

Thanks

---

<div class="post-metadata">

**Author:** ![maarton](https://molflow-forum.web.cern.ch/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@maarton](https://molflow-forum.web.cern.ch/u/maarton)\
**Post date:** [June 27, 2022, 2:21pm UTC](https://molflow-forum.web.cern.ch/t/molflow-crashes-when-i-try-to-import-simple-stl-file/471/10 "2022-06-27T14:21:32Z")

</div>

Dear Ricardo,

1. I meant the error where you can’t share files on Discourse (this forum).
2. So you confirm that with a text-based STL file Molflow 2.8.6 gives unknown exception error?

---

<div class="post-metadata">

**Author:** ![rparise](https://molflow-forum.web.cern.ch/letter_avatar_proxy/v4/letter/r/d78d45/32.png) [@rparise](https://molflow-forum.web.cern.ch/u/rparise)\
**Post date:** [June 27, 2022, 2:38pm UTC](https://molflow-forum.web.cern.ch/t/molflow-crashes-when-i-try-to-import-simple-stl-file/471/11 "2022-06-27T14:38:36Z")

</div>

1. Sorry for the misunderstanding.  
The first error it’s for when I try to upload a .stl file.  
The second, is for the .txt file.  
 ![Forum errors](https://molflow-forum.web.cern.ch/uploads/default/original/1X/bd47b6b814ba63ad903523042429e15508a14c12.jpeg)

2. Yeap, with a text-based STL file Molflow 2.8.6 gives unknown exception error.  
The same file opens perfectly with Molflow 2.9.5.  
Notice that I did this way: exported the STL file with “text” format. It was a .txt file.  
Then I manually changed to .stl.

Many thanks

---

<div class="post-metadata">

**Author:** ![maarton](https://molflow-forum.web.cern.ch/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@maarton](https://molflow-forum.web.cern.ch/u/maarton)\
**Post date:** [June 27, 2022, 2:53pm UTC](https://molflow-forum.web.cern.ch/t/molflow-crashes-when-i-try-to-import-simple-stl-file/471/12 "2022-06-27T14:53:23Z")

</div>

Many thanks.  
I’ll add STL to the allowed extensions right now, for the other two (new users not allowed to upload and STL in 2.8.6, I’ll check right now).

---

<div class="post-metadata">

**Author:** ![maarton](https://molflow-forum.web.cern.ch/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@maarton](https://molflow-forum.web.cern.ch/u/maarton)\
**Post date:** [June 27, 2022, 2:58pm UTC](https://molflow-forum.web.cern.ch/t/molflow-crashes-when-i-try-to-import-simple-stl-file/471/13 "2022-06-27T14:58:37Z")

</div>

You should now be able to upload the STL file in this thread, can you please check? I’ll then try to insert it in 2.8.6 and check what’s wrong. I also found and disabled the new user attachment limit.

---

<div class="post-metadata">

**Author:** ![rparise](https://molflow-forum.web.cern.ch/letter_avatar_proxy/v4/letter/r/d78d45/32.png) [@rparise](https://molflow-forum.web.cern.ch/u/rparise)\
**Post date:** [June 27, 2022, 3:25pm UTC](https://molflow-forum.web.cern.ch/t/molflow-crashes-when-i-try-to-import-simple-stl-file/471/14 "2022-06-27T15:25:50Z")

</div>

That’s nice.

The file named “TXT” was manually made into a .stl file. The Molflow 2.9.5 opens this one.  
The other one is the original one. This gives Moflow 2.8.6 and 2.9.5 a error (different errors).

[cilinder for molflow - TXT.stl](https://molflow-forum.web.cern.ch/uploads/short-url/qfjVCCy4IDs13NvSPuPRT7D6fAn.stl) (31.8 KB)  
[cilinder for molflow.stl](https://molflow-forum.web.cern.ch/uploads/short-url/kxJgEziF6USU3SQr403BJo0HnwV.stl) (5.6 KB)

---

<div class="post-metadata">

**Author:** ![rparise](https://molflow-forum.web.cern.ch/letter_avatar_proxy/v4/letter/r/d78d45/32.png) [@rparise](https://molflow-forum.web.cern.ch/u/rparise)\
**Post date:** [June 28, 2022, 8:14am UTC](https://molflow-forum.web.cern.ch/t/molflow-crashes-when-i-try-to-import-simple-stl-file/471/15 "2022-06-28T08:14:09Z")

</div>

Hi Marton,

Just to add a tip that I learned yesterday from a coworker.  
It’s possible to use MeshLab to “fix” the stl file.  
It’s just open the stl file from NX with Meshlab and save again.  
Now it opens in Molflow 2.8.6.

---

<div class="post-metadata">

**Author:** ![maarton](https://molflow-forum.web.cern.ch/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@maarton](https://molflow-forum.web.cern.ch/u/maarton)\
**Post date:** [June 28, 2022, 8:27am UTC](https://molflow-forum.web.cern.ch/t/molflow-crashes-when-i-try-to-import-simple-stl-file/471/16 "2022-06-28T08:27:18Z")

</div>

Thanks Ricardo.

Just to add an explanation: STL files come in text-based (ASCII) format, and compressed (binary) format. Normally both should have the extension STL, NX12’s choice to save as TXT is strange.

It is normal that compressed (binary) files are not opened in Molflow, we never implemented that format.

It should, however, open and insert ASCII STL files. I confirm that trying to _insert_ the file in Molflow 2.8.6 throws an error, opening it instead of inserting worked fine.

I’ll try to find the root cause, and fix it for 2.8.7.

---

<div class="post-metadata">

**Author:** ![maarton](https://molflow-forum.web.cern.ch/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@maarton](https://molflow-forum.web.cern.ch/u/maarton)\
**Post date:** [June 28, 2022, 1:55pm UTC](https://molflow-forum.web.cern.ch/t/molflow-crashes-when-i-try-to-import-simple-stl-file/471/17 "2022-06-28T13:55:34Z")

</div>

Fixed the bug, will be added to 2.8.7 release.

> **[Fix insert STL (fbbb7bb2) · Commits · molflow\_synrad / shared\_code](https://gitlab.cern.ch/molflow_synrad/shared_code/-/commit/fbbb7bb2fbcc4c983febb4ee4fd5fc6d9db734dc)**
>
> Source files shared between MolFlow+ and SynRad+
