blender crashed when i open specific file
Closed, ArchivedPublic

Description

System Information
Operating system: Windows 10
graphics card: Intel(R) HD Graphics 4600

Blender Version
Broken: (example: 2.78c e92f35283)

Short description of error
i open specific file of intro i made and blender is immediately crashed without say anything.
link for the file and screenshots:

in MediaFire
Exact steps for others to reproduce the error
Based on a (as simple as possible) attached .blend file with minimum amount of steps

Details

Type
Bug

Confirmed.

C:\Blender\blender-2.78.0-git.edc6bec-windows64>blender -d > test9.txt
Error: EXCEPTION_STACK_OVERFLOW

File test9.txt is attached. No crash log.

Fable Fox (fablefox) added a comment.EditedAug 1 2017, 4:16 PM

Can't cause crash with VC2015 debug build. Still, I noticed this:

Exception thrown at 0x000007FEFD1BA06D in blender.exe: Microsoft C++ exception: AUD_Exception at memory location 0x000000000BACF940.
Exception thrown at 0x000007FEFD1BA06D in blender.exe: Microsoft C++ exception: AUD_Exception at memory location 0x000000000BACF7B0.
The thread 0x1d73c has exited with code 0 (0x0).
The thread 0x28bc has exited with code 0 (0x0).
Exception thrown at 0x000007FEFD1BA06D in blender.exe: Microsoft C++ exception: AUD_Exception at memory location 0x000000000B9FF280.
Exception thrown at 0x000007FEFD1BA06D in blender.exe: Microsoft C++ exception: AUD_Exception at memory location 0x000000000B9FF0F0.
Bastien Montagne (mont29) triaged this task as Normal priority.Aug 1 2017, 10:49 PM

Can’t get it to crash under linux either…

@Joerg Mueller (nexyon) Maybe you can try to check whether it is indeed an audaspace issue?

Me neither. @Fable Fox (fablefox) could you find out where the exception(s) are thrown?

Fable Fox (fablefox) added a comment.EditedAug 9 2017, 3:54 PM

Hope this help.

This is the exception thrown

Exception thrown at 0x000007FEFD53A06D in blender.exe: Microsoft C++ exception: AUD_Exception at memory location 0x000000000FC9F440.
If there is a handler for this exception, the program may be safely continued.

And this is the code where it break. Arrow is where next statement will execute.

AUD_SndFileReader::AUD_SndFileReader(boost::shared_ptr<AUD_Buffer> buffer) :
	m_position(0),
	m_membuffer(buffer),
	m_memoffset(0)
{
	m_vio.get_filelen = vio_get_filelen;
	m_vio.read = vio_read;
	m_vio.seek = vio_seek;
	m_vio.tell = vio_tell;
	m_vio.write = NULL;

	SF_INFO sfinfo;

	sfinfo.format = 0;
	m_sndfile = sf_open_virtual(&m_vio, SFM_READ, &sfinfo, this);

	if(!m_sndfile)
		AUD_THROW(AUD_ERROR_FILE, fileopen_error);

	m_specs.channels = (AUD_Channels) sfinfo.channels;  <----- next statement to execute
	m_specs.rate = (AUD_SampleRate) sfinfo.samplerate;

The value to m_sndfile is NULL 0x0000000

But that exception is caught in AUD_FileFactory::createReader(). Wait, you can see that the exception happened somehow, even though it's caught and the program continues to run? This is expected behaviour in this case, as libsndfile can't read the sound file packed in the blender file. FFMPEG then is able to read it in my case. Does the file open properly, showing the waveform on the audio strip? If so, everything is working fine for you @Fable Fox (fablefox) and this debug information has nothing to do with the bug.

Therefore probably not audaspace related and we still know nothing about the crash/bug.

Can't repro either , could be a problem in 2.78c that has since been fixed, can you try the recently released 2.79-rc1 and see if it is still a problem?

LazyDodo (LazyDodo) closed this task as Resolved.Aug 9 2017, 8:08 PM
LazyDodo (LazyDodo) claimed this task.

update: tested with both 2.78c and 2.79rc1, , 2.78c and it does crash instantly there, while 2.79rc1 has no issues. so guess we can mark this one as resolved.

Hi. Last night I tested with latest 2.79rc and it still crashed. Will check again later tonight.

@Joerg Mueller (nexyon), in case of running the VC 2015 debug version via debugger, yeah - that's the execption I cought.

But if I run normal blender version, this happened and it just crash without crash log:

Error: EXCEPTION_STACK_OVERFLOW

I'll let it stay Resolved for now, but I will double check with latest 2.79 RC1 - because if I remember correctly last night it still crash. I was thinking if I should updated my source code.

@Amit Goren (AmitG) also should test if it happens with 2.79 RC1 on his PC.

Fable Fox (fablefox) reopened this task as Open.Aug 10 2017, 2:13 PM

I have to change the status back to open because it still happens in RC1. I tried 3 times and it happens in all three. I'm not sure if this is OS/driver related because the OP is using Win 10/Intel HD while I'm using Win 7 / NVidia GTX 750.

C:\Blender\blender-2.79-rc1-windows64>blender -d > crash.txt
AL lib: (EE) UpdateDeviceParams: Failed to set 44100hz, got 48000hz instead
Error: EXCEPTION_STACK_OVERFLOW

C:\Blender\blender-2.79-rc1-windows64>blender -d > crash.txt
AL lib: (EE) UpdateDeviceParams: Failed to set 44100hz, got 48000hz instead
Error: EXCEPTION_STACK_OVERFLOW

C:\Blender\blender-2.79-rc1-windows64>blender -d > crash.txt
AL lib: (EE) UpdateDeviceParams: Failed to set 44100hz, got 48000hz instead
Error: EXCEPTION_STACK_OVERFLOW

I noticed that it was EXCEPTION_STACK_OVERFLOW and that AUD_Exception was a red herring. The mystery is that even though System.StackOverflowExeption was enabled in the debugger, it can't catch this or this didn't happen when building with debug.

I think there was another recent bug that shows this nature (didn't happen in debug build) if I remember correctly. I'm willing to help if someone can give any tips or help. Can ASAN or special build can detect such error? I'm willing to download and test if someone willing to make it available.

Can you try to place this dll next to your blender.exe (software OGL, will be slow, but will show whether this is a driver issue or not)?

(Afaik there is no such thing as ASAN on windows, not freely available at least… I did try on linux with ASAN debug build, could not reproduce the issue).

@Bastien Montagne (mont29) I'm still getting the Error: EXCEPTION_STACK_OVERFLOW.

I've tried building Release with Debug Info, still getting some error and I'm learning debugging. But it seems I can catch the error there. Hope some of the info here helps.

Unhandled exception at 0x000000007046530B (libsndfile-1.dll) in blender.exe: 0xC00000FD: Stack overflow (parameters: 0x0000000000000001, 0x000000000B6F3FF8).

If there is a handler for this exception, the program may be safely continued.


Exception thrown at 0x000000014113E12C in blender.exe: 0xC0000005: Access violation writing location 0x000000000B6F0FF8.

If there is a handler for this exception, the program may be safely continued.

(Disassembly)
AUD_SndFileReader::vio_read(void *, __int64, void *)


		count	4	__int64
		ptr	0x00000000003e1720	void *
		user_data	0x000000000c3906f0	void *


	AUD_SndFileReader* reader = (AUD_SndFileReader*)user_data;

	if(reader->m_memoffset + count > reader->m_membuffer->getSize())
000000014113E125  mov         rcx,qword ptr [r8+58h]  
000000014113E129  mov         rdi,rdx  
000000014113E12C  call        AUD_Buffer::getSize (013FD2600Dh)    <------- VC2015 break here
000000014113E131  movsxd      r9,eax  
000000014113E134  movsxd      rax,dword ptr [rbx+68h]  
000000014113E138  add         rax,rdi  
000000014113E13B  cmp         rax,r9  
000000014113E13E  jle         AUD_SndFileReader::vio_read+3Fh (014113E14Fh)

every time you see 'If there is a handler for this exception, the program may be safely continued.' just continue debugging, and pass the exception to the app. until it gets stuck at the same spot over and over.

Can this be the clue? It was unhandled.

how do i repro this? just opening template.blend didn't do it for me......

I have no idea - opening the file is all it need to make it happen for me.

These var values might help.

@LazyDodo (LazyDodo) make sure you use release build.

Can you put a breakpoint in all four methods that start with "vio_" and tell me how often they get called until the crash happens?

When the file loads properly I get the following calls:

  • vio_get_filelen
  • vio_read (count = 12)
  • vio_read (count = 12276)
  • vio_read (count = 12)
  • vio_get_filelen
  • vio_read (count = 12)
  • vio_read (count = 12276)
  • vio_read (count = 12)

Cheers

@Joerg Mueller (nexyon) I'm not sure if you write your post correct?

Anyway I'm using Community so the breakpoint always break.

So I create 4 variables as a counter to count the number each method were being called before the unhandled exception happen.

vio_get_filelen = 1
vio_read = 25,976
vio_seek = 25,973
vio_tell = 0

This is wrong, the sound file in the blender file is an mp3 and libsndfile can't read mp3s. Therefore, those functions shouldn't be called as often. Maybe there is something wrong with the library.

LazyDodo (LazyDodo) lowered the priority of this task from Normal to Incomplete.Jun 15 2018, 11:07 PM

is this still an issue with the latest buildbot versions?

Bastien Montagne (mont29) closed this task as Archived.Jul 12 2018, 4:20 PM

More than a week without reply or activity. Due to the policy of the tracker archiving for until required info/data are provided.