gwaldron / osgearth

3D Maps for OpenSceneGraph / C++14
https://www.pelicanmapping.com/home-1/opensource
Other
1.51k stars 780 forks source link

osgearth_video segfault , error 4 #2622

Closed telecom999 closed 3 weeks ago

telecom999 commented 1 month ago

osgEarth Version (required): https://github.com/gwaldron/osgearth master branch,
osgearth-3.6, 3.4

ubunut 22.04 x86_64 gcc 11.4

What is the problem? oe.rex.loadtile[41966]: segfault at 150 ip 00007618a487d64e sp 000076188b3fd8c0 error 4 in libosgEarth.so.3.7.0[7618a463f000+aa4000] likely on CPU 0 (core 0, socket 0) Code: 10 48 8b 45 f8 48 89 10 48 8b 45 f0 48 c7 00 00 00 00 00 48 8b 45 f8 c9 c3 90 f3 0f 1e fa 55 48 89 e5 48 89 7d f8 48 8b 45 f8 <48> 8b 00 5d c3 90 f3 0f 1e fa 55 48 89 e5 48 89 7d f8 48 8b 45 f8

How have you tried to resolve it? osgearth/src/osgEarthDrivers/engine_rex/RexTerrainEngineNode.cpp

// Load all the root key tiles. jobs::context context; context.group = jobs::jobgroup::create(); context.pool = jobs::get_pool(ARENA_LOAD_TILE); // this line , segfault

Help US help YOU: include a screenshot, code block, or data file that we can use to reproduce the issue! ffmpeg, avi video .

thanks!

telecom999 commented 1 month ago

gdb osgearth_video GNU gdb (Ubuntu 12.1-0ubuntu1~22.04.2) 12.1 Copyright (C) 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: https://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/.

For help, type "help". Type "apropos word" to search for commands related to "word"... Registered pretty printers for UE classes Registered pretty printers for UE classes Registered pretty printers for UE classes Reading symbols from osgearth_video... (No debugging symbols found in osgearth_video) (gdb) run pp.avi Starting program: /usr/local/bin/osgearth_video pp.avi [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". void StateSet::setGlobalDefaults() ShaderPipeline disabled. [New Thread 0x7fffe5a00640 (LWP 42405)] [Thread 0x7fffe5a00640 (LWP 42405) exited] [New Thread 0x7fffe5a00640 (LWP 42406)] [Thread 0x7fffe5a00640 (LWP 42406) exited] [osgEarth] Loading pp.avi [New Thread 0x7fffe5a00640 (LWP 42407)] [New Thread 0x7fffe5000640 (LWP 42408)] [New Thread 0x7fffdfe00640 (LWP 42409)] [New Thread 0x7fffdf400640 (LWP 42410)] void StateSet::setGlobalDefaults() ShaderPipeline disabled. [New Thread 0x7fffdea00640 (LWP 42411)] [New Thread 0x7fffde000640 (LWP 42412)] [New Thread 0x7fffdd600640 (LWP 42413)] [New Thread 0x7fffdcc00640 (LWP 42414)] [New Thread 0x7fffdc200640 (LWP 42415)] [New Thread 0x7fffdb800640 (LWP 42417)] [New Thread 0x7fffdae00640 (LWP 42418)] [Thread 0x7fffdae00640 (LWP 42418) exited] [Thread 0x7fffdb800640 (LWP 42417) exited] [New Thread 0x7fffdb800640 (LWP 42419)] [New Thread 0x7fffdae00640 (LWP 42420)] [Thread 0x7fffdae00640 (LWP 42420) exited] [Thread 0x7fffdb800640 (LWP 42419) exited]

Thread 10 "oe.rex.loadtile" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffdd600640 (LWP 42413)] 0x00007ffff6e7d64e in osg::ref_ptr::get() const () from /usr/local/lib64/libosgEarth.so.161 (gdb)

plevy commented 1 month ago

Can you reproduce it with one of the sample applications osgearth_viewer and sample data or data that is publically available so we can try to reproduce it.

telecom999 commented 1 month ago

1 obsvideo.mov, osgearth_video segfault. https://github.com/user-attachments/assets/263652c8-5940-4c29-b6a6-6d4b4234534a

  1. 00simple.earth , 10simple.earth osgearth_viewer does not segfault, but not display video layer.
    simple.earth.tar.gz

  2. osgmultiplemovies obsvideo.mov , it runs correctly.

telecom999 commented 1 month ago

osgmultiplemovies pp.avi

void StateSet::setGlobalDefaults() ShaderPipeline disabled. ffmpeg::open(pp.avi) size(2560, 1440) aspect ratio 1 void StateSet::setGlobalDefaults() ShaderPipeline disabled. Finished FFmpegImageStream::run() Calling avformat_close_input(0x572511df66d8)

osgearth_video pp.avi void StateSet::setGlobalDefaults() ShaderPipeline disabled. [osgEarth] Loading pp.avi void StateSet::setGlobalDefaults() ShaderPipeline disabled. segment fault

telecom999 commented 1 month ago

20240911-164425

telecom999 commented 1 month ago

20240911-165310

telecom999 commented 1 month ago

diff --git a/src/osgEarth/VideoLayer.cpp b/src/osgEarth/VideoLayer.cpp index dfb981c4b..21cdc611a 100644 --- a/src/osgEarth/VideoLayer.cpp +++ b/src/osgEarth/VideoLayer.cpp @@ -56,7 +56,7 @@ VideoLayer::init() Status VideoLayer::openImplementation() {

telecom999 commented 1 month ago

videolayer.cpp-diff.txt

gwaldron commented 3 weeks ago

Patched in 8b35685a2