OGRECave / ogre-procedural

procedural geometry for Ogre3D
https://ogrecave.github.io/ogre-procedural/
MIT License
40 stars 17 forks source link

OgreProceduralIllustrations tries to display visual but then segfaults. #162

Closed dirkmittler closed 2 years ago

dirkmittler commented 2 years ago

Hello.

I consider myself to be a power user, in that I have considerable experience in custom-compiling code which experts wrote, usually with the result that the programs work. I'm also mildly interested in using OGRE with C++, and have some minor programming experience of my own.

I recently custom-compiled v0.3.0 of ogre-procedural, and one of the results was, that the 4 Samples seem to run fine. However, as the subject line states, 'OgreProceduralIllustrations' tries to display a visual but then segfaults.

A bit of info: My system is a 64-bit, Debian 9 system, some of the libraries of which have gotten a bit stale, butt I was able to custom-compile OGRE 1.12.13, as long as I disabled Python and C# support. I do not think that my bug is a duplicate of another, because on my machine, OpenGL 2 and 3 are fully-available rendering engines, and all the OGRE Samples seem stable, with both rendering engines. My graphics card is an nVidia GeForce GTX460.

In case more information is required, here are the last few lines of text the command outputs:

Texture 'sdk_logo.png': Loading 1 faces(PF_A8B8G8R8,128x64x1) with 7 hardware generated mipmaps from Image. Internal format is PF_A8B8G8R8,128x64x1.
Texture 'sdk_shade.png': Loading 1 faces(PF_A8B8G8R8,64x48x1) with 6 hardware generated mipmaps from Image. Internal format is PF_A8B8G8R8,64x48x1.
Texture 'sdk_frame.png': Loading 1 faces(PF_A8B8G8R8,32x32x1) with 5 hardware generated mipmaps from Image. Internal format is PF_A8B8G8R8,32x32x1.
Texture 'sdk_mini_text_box_over.png': Loading 1 faces(PF_A8B8G8R8,32x32x1) with 5 hardware generated mipmaps from Image. Internal format is PF_A8B8G8R8,32x32x1.
Texture 'sdk_pulse.png': Loading 1 faces(PF_B8G8R8,8x1x1) with 3 hardware generated mipmaps from Image. Internal format is PF_B8G8R8,8x1x1.
Finished parsing scripts for resource group Essential
Creating resources for group Essential
All done
Parsing scripts for resource group General
Finished parsing scripts for resource group General
Creating resources for group General
All done
Parsing scripts for resource group OgreAutodetect
Finished parsing scripts for resource group OgreAutodetect
Creating resources for group OgreAutodetect
All done
Parsing scripts for resource group OgreInternal
Parsing script ShadowVolumeExtude.program
Parsing script DualQuaternionSkinning_Shadow.material
Parsing script HardwareSkinningShadow.material
Parsing script RTShaderSystem.material
Parsing script TriplanarTexturing.material
Finished parsing scripts for resource group OgreInternal
Creating resources for group OgreInternal
All done
Parsing scripts for resource group Scripts
Parsing script Examples.material
Finished parsing scripts for resource group Scripts
Creating resources for group Scripts
All done
Segmentation fault

AFAICT, the messages suggest that the program was running normally, just before the segfault. Also, I don't really know what this program was supposed to do.

Does anybody have any suggestions for me?

(Update:)

In a possibly related bug, when I try to run 'ScriptInterpreter' (which I obviously chose to compile), it also seems to end badly, with the message:

Creating resources for group OgreInternal
All done
An exception has occured: RuntimeAssertionException: There can be only one singleton in Singleton at /home/dirk/Programs/ogre-1.12.13/OgreMain/include/OgreSingleton.h (line 93)

Dirk

paroj commented 2 years ago

please provide the backtrace.

$ gdb OgreProceduralIllustrations
(gdb) r
# after it crashes
(gdb) bt
dirkmittler commented 2 years ago
Creating resources for group OgreInternal
All done
Parsing scripts for resource group Scripts
Parsing script Examples.material
Finished parsing scripts for resource group Scripts
Creating resources for group Scripts
All done

Thread 1 "OgreProceduralI" received signal SIGSEGV, Segmentation fault.
strlen () at ../sysdeps/x86_64/strlen.S:106
106     ../sysdeps/x86_64/strlen.S: No such file or directory.
(gdb) 

And...

(gdb) bt
#0  strlen () at ../sysdeps/x86_64/strlen.S:106
#1  0x00007ffff59e0a14 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*) ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#2  0x0000555555560855 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator= (__s=<optimized out>, this=0x7fffffffdda8)
    at /usr/include/c++/6/bits/basic_string.h:605
#3  main (argc=1, argv=0x7fffffffded8)
    at /home/dirk/Programs/ogre-procedural/docs/manual/illustrations/src/Illustrations.cpp:945
(gdb) 

Hope that helps. Dirk

dirkmittler commented 2 years ago

Actually, this no longer strikes me as an issue. When I run:

./OgreProceduralIllustrations -help

In other words, when I just run the program with an arbitrary command-line parameter, it peppers my CWD with illustrations and quits with no error. Further, I was able to install the documentation without too many problems. What that means is, that I have no further use for this program. Or am I wrong?

Dirk

paroj commented 2 years ago

yes, OgreProceduralIllustrations is only needed to generate the docs

the bug you found is fixed with https://github.com/OGRECave/ogre-procedural/commit/e3fe5b69a32faa3a66fed4a94bd1bce90e3ee7b9