Skip to content

Instantly share code, notes, and snippets.

@lu-zero
Created June 5, 2019 21:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lu-zero/83238259a45e9d96bc2184a95afeda0c to your computer and use it in GitHub Desktop.
Save lu-zero/83238259a45e9d96bc2184a95afeda0c to your computer and use it in GitHub Desktop.
Process 60490 stopped
* thread #2, stop reason = EXC_BAD_ACCESS (code=1, address=0x118000160)
frame #0: 0x00000001000e9b62 rav1e`_$LT$core..iter..adapters..chain..Chain$LT$A$C$B$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$::fold::hffc8c2d5f58aa75e [inlined] rav1e::encoder::FrameState$LT$T$GT$::compute_activity_mask::_$u7b$$u7b$closure$u7d$$u7d$::hbe5264fd4fdf3ac6((null)=<unavailable>, (null)=&0x118000160) at encoder.rs:404:62 [opt]
401
402 let block = luma.subregion(block_rect);
403
-> 404 let mut mean: i32 = block.rows_iter().flatten().map(|&val| {let int: i32 = CastFromPrimitive::cast_from(val); int}).sum();
405 mean = mean >> (xdec + ydec);
406 let deviation: Vec<i16> = block.rows_iter().flatten().map(|&pix| {let pix_int: i16 = CastFromPrimitive::cast_from(pix); pix_int - mean as i16}).collect();
407
Target 0: (rav1e) stopped.
@shreevari
Copy link

I don't understand how there's a segfault here. Is there something wrong with the Areas?

@lu-zero
Copy link
Author

lu-zero commented Jun 5, 2019

I assume block_rect is wrong and that means that subregion is not doing the boundary checks.

@lu-zero
Copy link
Author

lu-zero commented Jun 5, 2019

rows_iter() seems the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment