trevorsandy / lpub3d

An LDraw™ editor for LEGO® style digital building instructions.
https://trevorsandy.github.io/lpub3d/
136 stars 19 forks source link

LPub3D crashes unexpectedly and sporadically #788

Closed technicbasics closed 6 days ago

technicbasics commented 1 week ago

The problem occurs either during or at the end of the export process. (I have only exported to .png so far.) But the problem has also occurred when quickly scrolling through the instructions. Renderer used: Native Stud style: 6 - High Contrast Stud Cylinder Color disabled

grafik

LPub3D Version

Runtime Environment

Error file after exporting: LPub3D_2024_11_12a.zip

Error file after scrolling LPub3D_2024_11_13.zip

trevorsandy commented 1 week ago

Thank you for reporting this behaviour. I'll take a look.

Cheers,

trevorsandy commented 1 week ago

Can you post a zipped copy of LPub3D.exe for r105 - this revision no longer exists and I need it to debug the .dmp file - Thanks.

Cheers,

technicbasics commented 1 week ago

LPub3D_1.zip

Unfortunately, the latest version r110 is only available for Mac, otherwise I would have tested it too.

trevorsandy commented 1 week ago

I was able to reproduce this behaviour with a fresh release build.

The cause is several performance enhancements I put in place to enable the UI to be more responsive when handling large files (over 200K lines) like your shared example. Unfortunately, as the native renderer engine also doubles as the visual editor engine, it does not take well to being clobbered by process events signals.

Anyway, I've removed the enhancements that were implicated - which was most of them, so the UI responsiveness will be a bit sluggish on large file processing - particularly if you elect to load the entire model at cover page display. There are still some enhacements in place, so you can evaluate this change in the latest DevOps build and let me know if you continue to experience this behavoiur. The enhancements that remain in place target file Load, BuildMod, Fade and Highlight routines so, except for Load, it would be good to test in these areas.

Unfortunately, the latest version r110 is only available for Mac

The DevOps build I triggered this morning is a full build except for the arm/qemu stuff.

Cheers,

technicbasics commented 1 week ago

The funny thing is that the program doesn't always crash at the same point or during the same process, but rather sporadically. Is the change in r110 from this morning already included?

technicbasics commented 1 week ago

I forgot to mention that the file used only has approx. 8200 lines. (It is a new MOC) I can also make it available to you.

trevorsandy commented 1 week ago

Is the change in r110 from this morning already included?

Yes.

Cheers,

technicbasics commented 1 week ago

Many thanks, I will try it asap. And of course I meant r141.

technicbasics commented 1 week ago

I have just exported my new model with version r157 1st attempt crashed after page 67 (end model 1) 2nd attempt crashed at the end of the complete model 3rd attempt ran without problems

If you need the model file, let me know.

LPub3D.zip LPub3D_exe.zip

trevorsandy commented 1 week ago

Many thanks. I'll take a look.

Cheers,

trevorsandy commented 1 week ago

While the source of the AbEnd is the same as the other AbEnds, the trigger is different. This is to say the 'concurrent processing enhancements' I referred to above are not the cause of the AbEnd according to the stack captured in the dmp file.

I ran a 225-step LDraw example on 'Continuous next page processing' and no AbEnd was triggered.

I'll produce a build without the enhancements that run during page processing. This way we can rule out up-or-down that this behaviour is caused by the enhancements.

UPDATE: I ran your Pistenbully file and got the app to AbEnd at page 409 - the good news is the crash was indeed triggered by the concurrent enhancement all-be-it by one that is quite indirect to page processing - perhaps that's why it took 400+ pages to finally trigger. Anyway, as I said above, I'll check in a build without the enhancements.

Cheers,

technicbasics commented 1 week ago

Many thanks for your work. I will send you my latest file via Wetransfer, then you have two different files.

Regards Johann

trevorsandy commented 6 days ago

I've reversed the last of the performance enhancements that were causing this behaviour.

You can evaluate this and other corrections in the latest DevOps build.

Cheers,