trevorsandy / lpub3d

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

LPub3D 2.4 very unstable, might have something to do with switching pages #476

Closed Landcross closed 3 years ago

Landcross commented 3 years ago

So, I've been using the latest LPub3D 2.4.0 release and so far it has been very unstable for me and it crashes a lot. On average I can't go through more than 5 to 10 pages before it crashes again.

I have no idea why it crashes exactly. I believe earlier on, it quickly show a popup with a .dmp file location, but I don't know what location it had listed and I can't seem to reproduce the crash so that it shows the popup again. The application just crashes without popup now.

Which brings me to the point of reproduction: I have no idea how to reproduce the crashes, other than that I can just open a file and go through the pages and sooner or later it'll close itself. One thing that I noticed though: just before the crashes; it always starts messing up pages (mind you, not in the file itself, just the display of them): it creates a mashup of items from different pages e.g. stepnumber from the previous page, an assembly image from the current page and a PLI from the next page, or other combinations like that. And then it quits.

I do have suspicions though, of what might cause this crash: switching pages too quickly. If I open a file and click on the next page for a few times (and not even super fast, just a few clicks per second at most) it goes through a few pages and then crashes as described above (creating a mash-up of different pages and then quiting). It doesn't necessarily seem to be limited to manual page switching or fast page-switching though. I've also had the crash happening when I generated a call-out (and the application switched pages itself) or just when going to the next page manually (not quickly switching pages, just.... the next page).

If there's any specific settings or logs you'd like to see, let me know.

trevorsandy commented 3 years ago

Thank you for reporting this behaviour.

Indeed, v2.4.0 has some major updates and, unofrtunately, not all of them are playing nice at the moment.

I'm on the verge of releasing v2.4.1 which includes over 120 revisions including a fix for the mysterious Callout crash when highlight/fade steps is enabled and a major rewrite of Build Modifications #411.

You can visit the LPub3D-ci repository and download the mentainance development build if you care to take an advance look.

Cheers,

Landcross commented 3 years ago

Not really related to this issue, but the pre-release builds you linked to, don't seem to contain any Windows builds? Or am I just incredibly blind?

trevorsandy commented 3 years ago

Check now. The Windows builds did not initially run to completion due to heavy internet traffic.

Cheers,

Landcross commented 3 years ago

Well, I downloaded the most recent build from the above link; and it's still as unstable as before. I installed it, opened it up, loaded up my model and it already crashed after the 2nd page...

trevorsandy commented 3 years ago

Ok - can you prepare and share a sample model that reproduces the crash - it's ok even if the crash is intermittent?

On every compile, I automatically run a very large model (over 2700 parts with 3800 lines in the top model - see #404) with deliberate parse errors and complex layouts and I don't see any abnormal end. Additionally, all cloud builds go through 7 build checks with various configurations and input file sizes and all checks are passing.

Cheers,

Landcross commented 3 years ago

There isn't any specific model that crashes I'm afraid; it's just the application in general. Even if I load up a simple stack of 2x4 bricks, it crashes when moving between pages.

Though, I can do some more extended testing later on.

Landcross commented 3 years ago

Hm, sorry for the double comment, but I had some unexpected free 5 minutes and just did some more testing now. I used the car.ldr example from LDraw or LPub. Some loose points I found out:

trevorsandy commented 3 years ago

Ok - this is helpful.

I did change the page load framework to optimise the number of editor load and display page calls performed when loading and transitioning pages. The aim is to improve the overall paging performance.

I have also added an automatic update layer between the display page, editor and 3d viewer modules. It looks like the unexpected transition behaviour may be associated with this new addition.

I’ll take a look.

Cheers,

jacovandermolen commented 3 years ago

Hi,

I recognize a lot that Landcross says and cannot put a finger on it either. Crash seems random.

Browsing through pages indeed sometimes messes up the display of pages. For me not only with LDView but also the native renderer.

Also, the code in the LDraw Editor gets weird. Repeated lines, etc. Those do not end up written in the file, only on display in the editor.

trevorsandy commented 3 years ago

Hi Jaco - Very well.

I believe I have treated the source of the random crashes and confused page display initially described by Landcross.

I think I have also treated the 'repeated lines' LDraw Editor behaviour in the, yet to be committed, latest revisions. If I have correctly identified the source, this behaviour should only be occuring on mentainance development builds.

Are you reporting the 'repeated lines' editor behaviour for v2.4.0 ? If yes, then I'll have to take another look at what I thought was the source of this behaviour before commiting the latest revisions.

Cheers,

jacovandermolen commented 3 years ago

Repeated lines occur in 2.4.0 on my laptop at home. On my PC at work now and I cannot reproduce it. It was with a very large model that I had been working on in LPub3D 2.3.12. If I see this behavior again, I'll screenshot it. Since the lines were not messed up in the file but only on screen, I did not report it earlier.

I will test the Maintainance development build 2.4.0.123.2343_20201031 for page behavior.

trevorsandy commented 3 years ago

Very well. From my testing, the 'repeated lines' in the editor are those of the loaded submodel being appended to the existing submodel already loaded in the editor.

Let me know if the behaviour you are seeing is different or the same ?

Cheers,

jacovandermolen commented 3 years ago

Here is a little video screencapture of what happens in 2.4.0 It is just browsing through pages until crash. https://drive.google.com/file/d/10u03M60JAt3nujdpKoj3Umt94Hm31h_m/view?usp=sharing

2.4.0.123 does the same thing.

trevorsandy commented 3 years ago

Thank you for the video. That's the same behaviour I saw in the maintenance build also.

I thought I introduced that with my update to the editor highlight line functionality added to the maintenance build because I did not see this behaviour before.

I'll take another look at the editor loading calls going back to 2.4.0.

Cheers,

trevorsandy commented 3 years ago

Fixed.

Cheers,