Process finished with exit code 139

Process finished with exit code 139

I get this error when I run this:

It happens when I call target_ds = None after RasterizeLayer . If I don’t run RasterizeLayer it does not fail. So what I am trying to do is create a mask of the polygons in mask.shp using the projection and geotransform information from raster.tif .

Note I am using gdal version 1.10.1 .

1 Answer 1

You cannot use ogr.Open(vector_layer).GetLayer() inside ‘RasterizeLayer’ gdal method as parameter. This produces ‘Segmentation fault’. So, I used following version of your script (with paths to my test layers) and it works perfectly.

Mask shapefile and raster layer look like as follow:

After running script at Python Console, rasterized shapefile is showed at following image:

Editing Note:

Based on your comment and Luke’s, for this case you can use following similar code:

My test layers now look like (vectorial layer has ‘value’ field; where burn values are):

After running code, resulting rasterized layer looks like at following image:

With Value Tool QGIS plugin, I corroborated that each feature had adequate burn value.

Я начал использовать студию Android на ubuntu 17.10. Я использовал приложение для создания стандартного андроидного проекта, и в это время программа загрузила все, что было или должно быть установлено. Когда я нажимаю «Run», я получаю следующую ошибку:

Некоторые из решений в Интернете показали следующие изменения в файле манифеста, но это не помогло:

Я сделал некоторые специальные корректировки, чтобы сделать его решением в AVD. Я пишу свойства:

  • Оперативная память: График 1 ГБ
  • График: ПО GLES 2.0
  • Многоядерный процессор (отмечен): 1

Я потратил часы, пытаясь его решить, но я не мог найти решение, поэтому я очень рад, если вы можете помочь. Я просто хочу запустить «простое приложение для Android».

Comments

Copy link Quote reply

ducminhkhoi commented Mar 30, 2018 •

When I try the sample code of Pytorch Dataset as follows:

I have the error: Process finished with exit code 139 (interrupted by signal 11: SIGSEGV) from the function in pytorch/nvvl/dataset.py, arround line 227:

Can you help me to fix it?

I use the suggested version of ffmpeg, libx264 and nasm.

This comment has been minimized.

Copy link Quote reply

senecaur commented Mar 30, 2018

@ducminhkhoi What GPU and driver are you using?

This comment has been minimized.

Copy link Quote reply

ducminhkhoi commented Mar 30, 2018

@jbarker-nvidia My GPU is 1080Ti and driver is CUDA 9.1, 390.48 (the newest version)

This comment has been minimized.

Copy link Quote reply

jaredcasper commented Mar 30, 2018

Is there any other output from the error? Can you post any output that doesn’t look like normal output from your code (or just the full output if it doesn’t have anything from your code you don’t want to post)?

How long does it run, does it crash immediately before loading any frames, or after running for a while and successfully loading some frames?

This comment has been minimized.

Copy link Quote reply

ducminhkhoi commented Mar 30, 2018

It does not produce any output. It crashes immediately before loading any frames

This comment has been minimized.

Copy link Quote reply

jaredcasper commented Mar 30, 2018

It must produce some output if you know "Process finished with exit code 139 (interrupted by signal 11: SIGSEGV) from the function in pytorch/nvvl/dataset.py, arround line 227" Is that the complete output? Can you post the complete output of running the program?

This comment has been minimized.

Copy link Quote reply

ducminhkhoi commented Mar 30, 2018

There is no output. I guess lib.nvvl_read_sequence call a C function, but this C function crashes that makes the whole Python process crash too.

This comment has been minimized.

Copy link Quote reply

jaredcasper commented Mar 30, 2018 •

If there is no output at all how do you know there is a segfault down in lib.nvvl_read_sequence? Sorry to keep pushing on this, just trying to get as much info as possible to try to figure out what is going on.

Читайте также:  Ue32f5300ak нет изображения а звук есть

This comment has been minimized.

Copy link Quote reply

jaredcasper commented Mar 30, 2018

Also can you tell me about your input files, how many files, what codec, container format, video size, etc.? Looking through the code and I’m not seeing an obvious place it’d segfault in that function.

This comment has been minimized.

Copy link Quote reply

jaredcasper commented Mar 30, 2018

One more thing, will you add the line:
dataset.set_log_level(nvvl.lib.LogLevel_Debug)
just after creating the dataset and post any output that results?

This comment has been minimized.

Copy link Quote reply

ducminhkhoi commented Mar 30, 2018 •

After adding new line as you suggested, I still cannot receive any output. My python file is dataset.py
so I just called it by python dataset.py , I get the following result:

My input is the Myanmar video downloaded from the suggested website from pytorch flownet2.0SD example.

This comment has been minimized.

Copy link Quote reply

jaredcasper commented Mar 30, 2018

hrm, I see. weird. Where does the line you initially quoted show up (i.e. "Process exited with error code. ") or what makes you believe that it is segfaulting in the read_sequence call? Are you familiar enough with gdb to get a back trace from gdb? You might need to build the lib with cmake directly and request a debug build (i.e. cmake .. -DCMAKE_BUILD_TYPE=Debug ).

I appreciate your help, it’s just hard to figure out whats going on without more information (since I can’t reproduce it in any environment I’ve tried).

This comment has been minimized.

Copy link Quote reply

ducminhkhoi commented Mar 30, 2018 •

I am using Pycharm debugger to jump to which line it crashes. More specifically, after calling read_sequence call, it jumps to the file ffi/init.py to the function

This comment has been minimized.

Copy link Quote reply

jaredcasper commented Mar 30, 2018

I see. yeah, I agree the segfault is in the c/c++ library. but without a backtrace to see where in the C code it segfaults it is very difficult to figure out what the problem is (There is a whole lot going on behind that line you point to). Is your full python script something you could share to try and help me reproduce the problem?

This comment has been minimized.

Copy link Quote reply

ducminhkhoi commented Mar 30, 2018

I just follow the Pytorch example with the Myanmar video and do nothing else. I just provide the list of filenames as input to the VideoDataset. All the information as I provided before.

This comment has been minimized.

Copy link Quote reply

jaredcasper commented Mar 30, 2018

Ok, sorry to be pedantic, I’m just trying to figure out what is different about your setup than mine. I’m asking if it is possible for you to post your full python source so I can try to run it here. For example, I have the script:

I run this trying to replicate your environment as you’ve described as much as I can and it runs fine for me, so there must be something different about your setup. Are you just doing exactly what is written above? Is it possible for you to get a backtrace of your segfault using gdb?

This comment has been minimized.

Copy link Quote reply

ducminhkhoi commented Mar 30, 2018

Here is my main.py file:

This comment has been minimized.

Copy link Quote reply

jaredcasper commented Mar 30, 2018

Awesome, thank you. Unfortunately that runs just fine for me. 🙁 Are you running on raw Myanmar video downloaded from the internet or did you do some processing on it (i.e. did you use the scripts in /examples/pytorch_superres/tools/ (i.e. split_scenes.py and downsample_scenes.py ))?

Читайте также:  Как узнать кто смотрел страницу в контакте

Do you know how to use gdb to get a backtrace? That would be very helpful.

This comment has been minimized.

Copy link Quote reply

ducminhkhoi commented Mar 30, 2018

I apply directly the raw video download from the internet without any processing. I am sorry, I don’t know how to use gdb but I can try, do you know how to use debug option with python setup.py install ?

This comment has been minimized.

Copy link Quote reply

jaredcasper commented Mar 30, 2018 •

Easiest way may be to do a quick edit of setup.py yourself. on line 49 you should find this:

Replace it with this:

then rerun python setup.py install . That should build with debug symbols and install the new debug version. Next, run your script from within gdb:

That should drop into a (gdb) prompt, you can then type run and hit enter which should run the code and it should come back into gdb when it segfaults, then run the command bt which should print out a backtrace for the current thread. It would also be helpful to run info threads in gdb and look at the other threads. Many of them will look the same, but any that look different you can get the backtrace there by seeing which thread number it is and running thread , like thread 3 for thread #3, then run bt again. If you could post the backtrace of the thread that it stops on, the output of info threads and the backtrace of any other threads that look interesting, that would be super helpful.

Hopefully all that makes sense. I really appreciate you helping track this down. I wish I could manage to reproduce it here!

This comment has been minimized.

Copy link Quote reply

ducminhkhoi commented Mar 30, 2018 •

Here is the result:

This comment has been minimized.

Copy link Quote reply

jaredcasper commented Mar 31, 2018

Very helpful, thank you! I think I see what the problem might be, let me get back to you after I’ve pushed some changes and a bit more logging and hopefully we’ll get this fixed soon. Thanks for your patience!

This comment has been minimized.

Copy link Quote reply

jaredcasper commented Mar 31, 2018

I just pushed some changes that might fix your segfault, but should at least give us some better information about what is going on. Please pull the latest changes, recompile/install, and give it a go.

You can now set the log level in the VideoDataset using a string, so if things still don’t work, please run it passing log_level="debug" to the VideoDataset constructor (and ditch the call to dataset.set_log_level() ) and post the results.

This comment has been minimized.

Copy link Quote reply

ducminhkhoi commented Apr 1, 2018

After following your guide to pull and recompile, I still have problem with it, here is my bt:

(gdb) run dataset_temp.py
Starting program: /home/khoinguyen/miniconda3/envs/VidVRD/bin/python dataset_temp.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
loading dataset.

[New Thread 0x7fff90e77700 (LWP 9871)]
Opening file data/VidVRD-dataset/prepared.mp4
Opened the first file, creating a video decoder
[New Thread 0x7fff8a676700 (LWP 9874)]
[New Thread 0x7fff89e75700 (LWP 9875)]
[New Thread 0x7fff891ff700 (LWP 9876)]
Using device: GeForce GTX 1080 Ti
Kernel module version 390.48, so using our own stream.

Thread 1 "python" received signal SIGSEGV, Segmentation fault.
__memcpy_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:114
114 ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S: No such file or directory.
(gdb) info threads
Id Target Id Frame

  • 1 Thread 0x7ffff7fc9700 (LWP 9864) "python" __memcpy_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:114
    2 Thread 0x7fff90e77700 (LWP 9871) "python" pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
    3 Thread 0x7fff8a676700 (LWP 9874) "python" 0x00007ffff78f88c8 in accept4 (fd=14, addr=. addr_len=0x7fff8a675e68, flags=524288) at ../sysdeps/unix/sysv/linux/accept4.c:40
    4 Thread 0x7fff89e75700 (LWP 9875) "python" 0x00007ffff78eb74d in poll () at ../sysdeps/unix/syscall-template.S:84
    5 Thread 0x7fff891ff700 (LWP 9876) "python" pthread_cond_timedwait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:225
    (gdb) thread 1
    [Switching to thread 1 (Thread 0x7ffff7fc9700 (LWP 9864))]
    #0 __memcpy_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:114
    114 in ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S
    (gdb) bt
    #0 __memcpy_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:114
    #1 0x00007fffb22a6587 in NVVL::detail::CUVideoParser::init_paramsNVVL::detail::NvDecoder (this=0x7fffffffbee0, codec=NVVL::detail::Codec::H264, decoder=0x555556a9ef90, decode_surfaces=20,
    extradata=0x10000002a , extradata_size=60) at /home/khoinguyen/PycharmProjects/VidVRD/libs/nvvl/src/detail/CUVideoParser.h:67
    #2 0x00007fffb22a5853 in NVVL::detail::CUVideoParser::CUVideoParserNVVL::detail::NvDecoder (this=0x7fffffffbee0, codec=NVVL::detail::Codec::H264, decoder=0x555556a9ef90, decode_surfaces=20,
    extradata=0x10000002a , extradata_size=60) at /home/khoinguyen/PycharmProjects/VidVRD/libs/nvvl/src/detail/CUVideoParser.h:30
    #3 0x00007fffb22a20a0 in NVVL::detail::NvDecoder::NvDecoder (this=0x555556a9ef90, device_id=0, logger=. codecpar=0x555556a9d440, time_base=. )
    at /home/khoinguyen/PycharmProjects/VidVRD/libs/nvvl/src/detail/NvDecoder.cpp:119
    #4 0x00007fffb2272d8a in NVVL::VideoLoader::impl::get_or_open_file (this=0x555556a8c5d0, filename=. ) at /home/khoinguyen/PycharmProjects/VidVRD/libs/nvvl/src/VideoLoader.cpp:248
    #5 0x00007fffb2272544 in NVVL::VideoLoader::impl::frame_count (this=0x555556a8c5d0, filename=. ) at /home/khoinguyen/PycharmProjects/VidVRD/libs/nvvl/src/VideoLoader.cpp:179
    #6 0x00007fffb22724b7 in NVVL::VideoLoader::frame_count (this=0x5555567f4420, filename=. ) at /home/khoinguyen/PycharmProjects/VidVRD/libs/nvvl/src/VideoLoader.cpp:175
    #7 0x00007fffb22750e2 in nvvl_frame_count (loader=0x5555567f4420, filename=0x7fff90ee15a8 "data/VidVRD-dataset/prepared.mp4")
    at /home/khoinguyen/PycharmProjects/VidVRD/libs/nvvl/src/VideoLoader.cpp:637
    #8 0x00007fffb24fb4ec in _cffi_f_nvvl_frame_count (self=, args=) at build/temp.linux-x86_64-3.6/nvvl.lib._lib.c:1048
    #9 0x0000555555665871 in PyCFunction_Call ()
    #10 0x00005555556625ce in PyObject_Call ()
    #11 0x00007fffe638bffc in THPModule_safeCall (_unused=, args=0x7fff90ee1558, kwargs=0x7fff90e7fca8) at torch/csrc/Module.cpp:441
    #12 0x0000555555665806 in PyCFunction_Call ()
    #13 0x000055555571961c in _PyEval_EvalFrameDefault ()
    —Type to continue, or q to quit—
    #14 0x00005555556e94ce in _PyEval_EvalCodeWithName ()
    #15 0x00005555556ea0e1 in fast_function ()
    #16 0x00005555556f01e5 in call_function ()
    #17 0x000055555571441a in _PyEval_EvalFrameDefault ()
    #18 0x00005555556e90a6 in _PyEval_EvalCodeWithName ()
    #19 0x00005555556ea7db in _PyFunction_FastCallDict ()
    #20 0x0000555555662b8f in _PyObject_FastCallDict ()
    #21 0x0000555555667773 in _PyObject_Call_Prepend ()
    #22 0x00005555556625ce in PyObject_Call ()
    #23 0x00005555556bd96b in slot_tp_init ()
    #24 0x00005555556f0447 in type_call ()
    #25 0x00005555556629ab in _PyObject_FastCallDict ()
    #26 0x00005555556ea3ca in _PyObject_FastCallKeywords ()
    #27 0x00005555556f025e in call_function ()
    #28 0x00005555557151cb in _PyEval_EvalFrameDefault ()
    #29 0x00005555556eabf9 in PyEval_EvalCodeEx ()
    #30 0x00005555556eb99c in PyEval_EvalCode ()
    #31 0x0000555555767e44 in run_mod ()
    —Type to continue, or q to quit—
    #32 0x0000555555768241 in PyRun_FileExFlags ()
    #33 0x0000555555768444 in PyRun_SimpleFileExFlags ()
    #34 0x000055555576bf78 in Py_Main ()
    #35 0x0000555555633efe in main ()
    (gdb)
Читайте также:  Nokia lumia 830 обзор

This comment has been minimized.

Copy link Quote reply

jaredcasper commented Apr 1, 2018

Well, at least it moved. 🙂 Based on this backtrace it seems something funny is going on with the ffmpeg libraries since they are providing bad pointers. Can you confirm that you are using ffmpeg version 3.4.2? How did you install it? Also, are there multiple version of the ffmpeg libraries installed on your system? Maybe one from apt and one you built from source? I’ve seen weird bugs like this happen when a program gets linked against one version at runtime, then a different version of the library gets loaded at runtime (even though the library versioning is supposed to prevent that, it doesn’t always work). If you do have two version installed, can you completely remove/uninstall the older and give it a go? One thing you can do to check is find the libnvvl.so in your python install directories and run ldd on it. Something like this:

That should show you what ffmpeg libraries are getting loaded at runtime, which should match what you expect given how you install ffmpeg 3.4.2 in the first place. For me I get:

Can you check those things out and confirm that you only have one version of ffmpeg installed and what version it is?

This comment has been minimized.

Copy link Quote reply

ducminhkhoi commented Apr 3, 2018

Thank you so much @jaredcasper, I followed your suggestion and removed other ffmpeg installations and it worked!

This comment has been minimized.

Copy link Quote reply

jaredcasper commented Apr 3, 2018

Whew! That was a sneaky one! Thanks for letting me know it works now.

Ссылка на основную публикацию
Macrium reflect инструкция на русском
Windows Linux Mac OS Windows Phone Android Меню сайта Партнеры Статьи » Практикум Macrium Reflect инструкция пользователя Macrium Reflect —...
Gigabyte gtx 470 характеристики
Описание NVIDIA начала продажи GeForce GTX 470 12 апреля 2010 по рекомендованной цене 349$. Это десктопная видеокарта на архитектуре Fermi...
Gigabyte h81m s2pv обзор
Большинство людей (клиентов интернет-магазинов) стараются перед покупкой собрать всю информацию о GIGABYTE GA-H81M-S2PV (rev. 1.0). В этот набор входят и...
Mad moxxi borderlands 2
Неигровой персонаж в "Borderlands", "Borderlands 2" и "Borderlands: The Pre-Sequel", а также в "Poker Night 2" и "Tales from the...
Adblock detector