Page MenuHome

Blenloader/CTest Crash on cycles Lights-Portal test.
Closed, ResolvedPublic

Description

System Information
Operating system: found on Win64, but should trigger on linux with an asan build as well.
Graphics card: N/A

Blender Version
Broken: Latest master
Worked: rBadea6146f626 (Issue introduced by rB3b9813fe5049)

Short description of error

During the test of cycles_lights - Portal blender crashes.

Exact steps for others to reproduce the error

You need the debug heap (asan on linux should also catch it) to trigger this one.

During the load of lib\tests\render\light\portal.blend the versioning code reads beyond the end of a buffer.

https://developer.blender.org/diffusion/B/browse/master/source/blender/blenloader/intern/versioning_280.c$3385

for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) {
            ListBase *regionbase = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase;

            ARegion *ar = NULL;
            if (sa->spacetype == SPACE_CLIP) {
              if (((SpaceClip *)sl)->view == SC_VIEW_GRAPH) { <-------    sl->View goes beyond the allocated buffer
                ar = do_versions_find_region(regionbase, RGN_TYPE_PREVIEW);
              }
            }
            else {
              ar = do_versions_find_region(regionbase, RGN_TYPE_WINDOW);
            }

Stackdump

>	blender.exe!blo_do_versions_280(FileData * fd=0x0000000075047aa8, Library * UNUSED_lib=0x0000000000000000, Main * bmain=0x0000000072750958) Line 3385	C
 	blender.exe!do_versions(FileData * fd=0x0000000075047aa8, Library * lib=0x0000000000000000, Main * main=0x0000000072750958) Line 9438	C
 	blender.exe!blo_read_file_internal(FileData * fd=0x0000000075047aa8, const unsigned char * filepath=0x00000000002aef40) Line 9725	C
 	blender.exe!BLO_read_from_file(const unsigned char * filepath=0x00000000002aef40, eBLOReadSkip skip_flags=BLO_READ_SKIP_NONE, ReportList * reports=0x0000000058f84fc8) Line 320	C
 	blender.exe!BKE_blendfile_read(bContext * C=0x0000000013b24f78, const unsigned char * filepath=0x00000000002aef40, const BlendFileReadParams * params=0x00000000002aee74, ReportList * reports=0x0000000058f84fc8) Line 405	C
 	blender.exe!WM_file_read(bContext * C=0x0000000013b24f78, const unsigned char * filepath=0x00000000002aef40, ReportList * reports=0x0000000058f84fc8) Line 612	C
 	blender.exe!wm_file_read_opwrap(bContext * C=0x0000000013b24f78, const unsigned char * filepath=0x00000000002aef40, ReportList * reports=0x0000000058f84fc8, const bool autoexec_init=true) Line 2016	C
 	blender.exe!wm_open_mainfile__open(bContext * C=0x0000000013b24f78, wmOperator * op=0x0000000042676f48) Line 2150	C
 	blender.exe!wm_open_mainfile_exec(bContext * C=0x0000000013b24f78, wmOperator * op=0x0000000042676f48) Line 2183	C
 	blender.exe!wm_handler_fileselect_do(bContext * C=0x0000000013b24f78, ListBase * handlers=0x00000000200c3fb8, wmEventHandler_Op * handler=0x00000000559e7fa8, int val=2) Line 2372	C
 	blender.exe!wm_handler_fileselect_call(bContext * C=0x0000000013b24f78, ListBase * handlers=0x00000000200c3fb8, wmEventHandler_Op * handler=0x00000000559e7fa8, const wmEvent * event=0x000000002180af78) Line 2471	C
 	blender.exe!wm_handlers_do_intern(bContext * C=0x0000000013b24f78, wmEvent * event=0x000000002180af78, ListBase * handlers=0x00000000200c3fb8) Line 2752	C
 	blender.exe!wm_handlers_do(bContext * C=0x0000000013b24f78, wmEvent * event=0x000000002180af78, ListBase * handlers=0x00000000200c3fb8) Line 2804	C
 	blender.exe!wm_event_do_handlers(bContext * C=0x0000000013b24f78) Line 3172	C
 	blender.exe!WM_main(bContext * C=0x0000000013b24f78) Line 421	C
 	blender.exe!main(int argc=1, const unsigned char * * UNUSED_argv_c=0x0000000008c3dfa0) Line 502	C
 	[External Code]

Event Timeline

LazyDodo (LazyDodo) updated the task description. (Show Details)

Hi,
I am having the same problem, I have been making a large test file in 2.8. The last change I made was to make a master collection containing a window frame and portal. I instanced this collection to the scene a dozen times. Everything was loading fine on the Mac OS build for 13th may but the build for the 14th may build crashes when opening the file. I have an archive scene without portals and that opens just fine in the 14th may build. I cannot seem to reproduce the error on a smaller test file. The file that crashes as around 10M faces and takes 6GB ram.

My system is Operating system: Mac Pro (Mid 2010) macOs 10.13.3
Graphics card: Radeon RX 580

I haven't generated a bug report because I cannot reproduce the error as yet, I have no idea if the size of the file is related. The file works fine on all older Beta versions. Just the 14 May is causing problems.

Hope this helps.
Eric

@Eric Leo (DivingIntoBlender), I think you replied to the wrong bug.

There was a crash for macOS in recent builds with display of images in the 3D viewport, that should be fixed in the latest build.

rB3b9813fe5049 introduced the misbehaving code, mind taking a look?

Please check if this is fixed now, I didn't get ASAN to work right now..

can confirm it's fixed.