trevorsandy / lpub3d

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

MULTI_STEP PLI PER_STEP FALSE causes crash #755

Open laurensvalk opened 2 weeks ago

laurensvalk commented 2 weeks ago

Showing a single PLI for a multi step leads to a segfault, as shown below.

https://github.com/trevorsandy/lpub3d/assets/12326241/9d56cf27-4792-4dc3-a2fd-8ebb7889773c

example.mpd.txt

0 FILE main.ldr
0 main
0 Name: main.ldr
0 Author: Laurens Valk
0 Unofficial Model
0 ROTATION CENTER 0 0 0 1 "Custom"
0 ROTATION CENTER 0 0 0 1 "Custom"
0 ROTATION CONFIG 0 0
1 0 0 0 200 1 0 0 0 1 0 0 0 1 rear.ldr
1 15 -180 0 0 0 1 0 -1 0 0 0 0 1 48267.dat
1 0 -160 0 0 0 0 -1 0 1 0 1 0 0 39367p01.dat
0 STEP
0
0 NOFILE
0
0 FILE rear.ldr
0 New Model
0 Name: rear.ldr
0 Author: Laurens Valk
0 Unofficial Model
0 ROTATION CENTER 0 0 0 1 "Custom"
0 ROTATION CONFIG 0 0
0 !LPUB MULTI_STEP BEGIN
1 322 0 0 0 0 0 -1 0 1 0 1 0 0 39370c01.dat
1 99 40 0 -10 0 0 1 0 -1 0 1 0 0 3673.dat
1 99 40 -20 -10 0 0 1 0 -1 0 1 0 0 3673.dat
1 99 0 0 -10 0 0 1 0 -1 0 1 0 0 3673.dat
1 99 -40 0 -10 0 0 1 0 -1 0 1 0 0 3673.dat
1 99 -40 -20 -10 0 0 1 0 -1 0 1 0 0 3673.dat
0 ROTSTEP 30 -45 0 ABS
1 26 0 0 -20 0 0 1 -1 0 0 0 -1 0 32525.dat
1 26 0 -20 -20 0 0 1 -1 0 0 0 -1 0 32525.dat
1 99 100 0 -30 0 0 1 0 -1 0 1 0 0 3673.dat
1 99 -100 0 -30 0 0 1 0 -1 0 1 0 0 3673.dat
0 STEP
0 !LPUB MULTI_STEP END
1 71 -100 0 -40 1 0 0 0 -1 0 0 0 -1 48989.dat
1 71 100 0 -40 1 0 0 0 -1 0 0 0 -1 48989.dat
0 STEP
1 99 -90 20 -40 -1 0 0 0 -1 0 0 0 1 3673.dat
1 99 -90 -20 -40 -1 0 0 0 -1 0 0 0 1 3673.dat
1 99 90 -20 -40 -1 0 0 0 -1 0 0 0 1 3673.dat
1 99 90 20 -40 -1 0 0 0 -1 0 0 0 1 3673.dat
0 STEP
1 0 80 -60 -40 0 1 0 0 0 1 1 0 0 40490.dat
1 0 -80 -60 -40 0 1 0 0 0 1 1 0 0 40490.dat
0 STEP
0
0
0 NOFILE
0

I'll go back to verify on previous builds.


Unrelated: this project does not appear to have GitHub sponsors enabled. If you do, I think some people would be happy to chip in :)