getResourceProvider() caused Segmentation fault

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

manh
Just popping in
Just popping in
Posts: 4
Joined: Mon Mar 31, 2014 08:15

getResourceProvider() caused Segmentation fault

Postby manh » Wed Apr 02, 2014 04:35

Hello Everyone. This is my first time with CEGUI and I've experienced a really annoying problem
I'm sorry for not having found any CEGUI.log in the folder.

GDB output:

Code: Select all

Program received signal SIGSEGV, Segmentation fault.
0xb742ef54 in CEGUI::System::getResourceProvider() const ()
   from /usr/local/lib/libCEGUIBase-0.so.2


On
- OS: Debian 7.3 (32-bit)
- Compiler: gcc 4.7
- Irrlicht 1.8.1 (sharedlib)
- CEGUI 0.8.3 (dynamic link version, expat as default XMLParser)

Can someone tell me some ways to fix this? Thank you in advance.
Last edited by manh on Sun Apr 06, 2014 07:23, edited 3 times in total.

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: [Segmentation fault] On Irrlicht + CEGUI dynamic link

Postby Ident » Wed Apr 02, 2014 19:09

You posted into the forum "Advanced Help" but this topic is not fitting there. I had to mov it to General Help. We want to improve the forum experience and make it easier to help, so in order to prevent this from happening with other new users in the future again: Can you tell me why you thought this was a topic for the forum "advanced help"? Can we change anything to make this clearer? Or was the problem not on our side and you simply overlooked the description of the forums?

You mentioned there is no log - CEGUI.log will be created when you run your program, it should be placed in the directory of program execution or the project/working directory. If you did not run your program successfully, it will not exist.

Can you tell us what to fix? You said there is a problem bit I see none being described in your post. Although there have been some rumours about CrazyEddie possessing slight magic powers, we in general do not possess the ability to read minds or see what you did or do, therefore we need very detailed information about your issue.

Read this
CrazyEddie: "I don't like GUIs"

manh
Just popping in
Just popping in
Posts: 4
Joined: Mon Mar 31, 2014 08:15

Re: [Segmentation fault] On Irrlicht + CEGUI dynamic link

Postby manh » Thu Apr 03, 2014 07:28

I'm sorry Indent, my native language is not English, so I misunderstood when seeing the forum description:

Advanced Help
For help with problems that go beyond normal usage:
- Implementation of new features or widgets or modifications thereof.
- Writing custom Windows, Widgets or WindowRenderer classes.
- Integration of CEGUI in new engines or frameworks.
- Writing custom plugins or modules (including scripting or rendering modules) for CEGUI.


I missed the line "For help with problems that go beyond normal usage:" and I thought my problem was belong to the section.

I'm sorry for not being careful. And maybe you are too tough with me because I'm not an university student, and there's no courses in my city.
I'm still at a secondary school, but I love programming and I teach myself everyday.
I'm no more than a 10-year old kid if compared to one in a modern country like yours.

I couldn't figure out any thing else but the Segmentation Fault error message. And the log file doesn't exist in the folder.
But Indent, I appreciate you as you've been helping me, telling me what to do, none of adults around me bother that.
So I think you can tell me what can I do more to make it more detailed, give me some methods' name so I can start learning to use.
I'm trying to be professional like a developer but it needs time and a good environment.

I have read the guidelines but actually I don't know how to find more about the problem.

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: [Segmentation fault] On Irrlicht + CEGUI dynamic link

Postby Ident » Thu Apr 03, 2014 11:30

Do you know how to use the Debugger in your IDE?
Also it looks to me as if you are in Release configuration, I m not sure about that though.
Also you could show us how you initialise Irrlicht (use the CODE tags to paste code).
Lastly it would help us most to know WHERE the segmentation fault occurs. This might only be possible to find out in Debug config.
CrazyEddie: "I don't like GUIs"

manh
Just popping in
Just popping in
Posts: 4
Joined: Mon Mar 31, 2014 08:15

Re: [Segmentation fault] On Irrlicht + CEGUI dynamic link

Postby manh » Fri Apr 04, 2014 06:38

At first, it worked with:

Code: Select all

CEGUI::IrrlichtRenderer& renderer = CEGUI::IrrlichtRenderer::bootstrapSystem(*device);

and this line in the while loop

Code: Select all

CEGUI::System::getSingleton().renderAllGUIContexts();


But manual creation keeps failing with me. I don't use IDE so I will post more as soon as GDB finds something useful.

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: [Segmentation fault] On Irrlicht + CEGUI dynamic link

Postby Ident » Fri Apr 04, 2014 07:07

You really need some sort of debugger. No way to help you otherwise...
CrazyEddie: "I don't like GUIs"

manh
Just popping in
Just popping in
Posts: 4
Joined: Mon Mar 31, 2014 08:15

Re: [Segmentation fault] On Irrlicht + CEGUI dynamic link

Postby manh » Fri Apr 04, 2014 08:09

Yeah. I will find which line caused segfault and see if it works without boostStrap or not
I'm discovering Valgrind too. Thanks for your suggestions.
It is the first time I knew what is debugging.

GDB:

Code: Select all

Program received signal SIGSEGV, Segmentation fault.
0xb742ef54 in CEGUI::System::getResourceProvider() const ()
   from /usr/local/lib/libCEGUIBase-0.so.2

User avatar
thomas
Quite a regular
Quite a regular
Posts: 64
Joined: Thu Aug 22, 2013 22:11

Re: getResourceProvider() caused Segmentation fault

Postby thomas » Sat Apr 12, 2014 01:18

When GDB stops from the segfault try the following commands:

"print renderer"
"print CEGUI::System::getSingleton()"
"print CEGUI::System::getResourceProvider()"

See if you see 0x0 anywhere, if you do then you are getting a bad pointer and there's something you are missing.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 27 guests