LDraw.org Discussion Forums
Lpub3d crashes when trying to open mpd - Printable Version

+- LDraw.org Discussion Forums (https://forums.ldraw.org)
+-- Forum: LDraw Programs (https://forums.ldraw.org/forum-7.html)
+--- Forum: LDraw File Processing and Conversion (https://forums.ldraw.org/forum-22.html)
+--- Thread: Lpub3d crashes when trying to open mpd (/thread-21880.html)



Lpub3d crashes when trying to open mpd - Balazs Kiss - 2016-10-28

Hi all, I hope someone can help me with the issue below. Raised the question already on the Eurobricks forum but maybe someone could help here as well.

I'm building a C model of the 42029 pickup using Ldcad 1.5 and I was planning to create instructions with Lpub3D. I made the mistake of not testing my .mpd during the building process with Lpub3D, so I've realised towards the end that the file cannot be opened, Lpub3D crashes when I try to open the file (Lpub3d***.exe has stopped working). As I did not have any other troubleshooting ideas I started to remove submodels and steps in my mpd going backwards to see if I can find the problematic part.
As it turned out the problem is not that simple - different versions of Lpub3D on different operating systems can open different versions of my file.

E.g. version with 8 submodels - opens with Win10/Lpub3d 2.0.14 / opens with Win7/Lpub3d 2.0.14 / opens with Win10/Lpub3d 2.0.14
version with 11 submodels - crashes with Win10/Lpub3d 2.0.14 / opens with Win7/Lpub3d 2.0.14 / opens with Win10/Lpub3d 1.3.4
version with 21 submodels - crashes with all versions (nearly complete model has 60 submodels)

Due to this inconsistency I could not find a single part or submodel causing the issue - above a certain complexity all versions of Lpub3D crashes.

I'm sure Lpub3d supposed to handle a model with ~1000 pieces, so I don't know at this point how to change my file to make it work. Any advise or suggestion would be greatly appreciated. I've linked the different versions of the files if someone would be kind enough to have a look.


RE: Lpub3d crashes when trying to open mpd - Philippe Hurbain - 2016-10-28

Hi Balasz,
Welcome here!
I hope that Trevor will be able to cast some light here, but it seems that the problem is related to the minimal header of each submodel in your file.
I tried with your biggest model and lpub3d 1.3.5. It trundles a bit (several seconds, flashing image on screen) then crashes. Since I couldn't find anything wrong with your file except the (too) simple headers, I added you as author, using LDCad 1.6 alpha 4 cleanup function. After that, the file loaded fine and I could browse the (whooping) 152 pages of generated instructions. Attached the modified file. Tell us if it works for you too!

(edit): definitely related to headers. I tried your 11 submodel file, crashed too. I added a name line to each submodel (using LDCad cleanup, sync name option). Problem solved...


RE: Lpub3d crashes when trying to open mpd - Balazs Kiss - 2016-10-28

(2016-10-28, 12:38)Philippe Hurbain Wrote: Hi Balasz,
Welcome here!
I hope that Trevor will be able to cast some light here, but it seems that the problem is related to the minimal header of each submodel in your file.
I tried with your biggest model and lpub3d 1.3.5. It trundles a bit (several seconds, flashing image on screen) then crashes. Since I couldn't find anything wrong with your file except the (too) simple headers, I added you as author, using LDCad 1.6 alpha 4 cleanup function. After that, the file loaded fine and I could browse the (whooping) 152 pages of generated instructions. Attached the modified file. Tell us if it works for you too!

(edit): definitely related to headers. I tried your 11 submodel file, crashed too. I added a name line to each submodel (using LDCad cleanup, sync name option). Problem solved...

Amazing, thank you very much for your help! I never thought that the missing author could cause the issue... I quickly replaced the headers in the full file as well (60 subfiles) and it opened flawlessly! Smile The instructions by default are pretty long now (445 pages), but I'll consolidate steps to a single page and there're a lot of steps to convert to callouts as well.

As this is my very first model and instructions I see there's still a lot to learn, but thank to this great community hopefully all challenges will be solved  Smile Now I'll try to wrap my head around the buffer exchange topic, there're some steps that will definitely require exploded view and arrows.


RE: Lpub3d crashes when trying to open mpd - Trevor Sandy - 2016-10-29

(2016-10-28, 12:38)Philippe Hurbain Wrote: I hope that Trevor will be able to cast some light here, but it seems that the problem is related to the minimal header of each submodel in your file.
...
Problem solved...

Good to see that this behaviour is resolved. I took a look at the LPub3D code but could not specifically find the source of this behaviour. 

I tested the file with 21 submodels and noticed the segfault is thrown when LPub3D encounters subModel-13_subsub.ldr during the routine that count the model file's pages. SubModel-13_subsub.ldr is a sub model of subModel-12.ldr which in turn is a sub model of main.ldr. Even with only the FILE header, this configuration should work but I am also reproducing this crash so there is a problem.

While I believe the root cause is likely coming from an LPub3D routine, the segfault (crash) is actually thrown from deep in the Qt stack starting at my Qt progress bar call. So basically we have an issue with Qt here. At this moment, I don't know what I can do to fix because I don't see any problem with my progress bar call.

Cheers,