Crystal Space
Welcome, Guest. Please login or register.
April 25, 2014, 02:25:00 am

Login with username, password and session length
Search:     Advanced search
8990 Posts in 2037 Topics by 7629 Members
Latest Member: Mariabrown
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Support
| | |-+  Runtime error
« previous next »
Pages: [1] 2 Print
Author Topic: Runtime error  (Read 6090 times)
allpowerful32
Jr. Member
**
Posts: 62


View Profile
« on: December 07, 2005, 04:40:21 pm »

Hi,
I've compiled cs fine, and started a new project, almost coying the simple 1 code (with just a few name changes, etc.)  When I run it, the console comes up, but does nothing.  About 10 seconds later, windows comes up with its "send error report" dialog.  I've narrowed down the problem to somewhere in the csInitializer::RequestPlugins function call.  I haven't had time, so far to narrow it down further, because stepping through about a million lines of code is not something I fancy doing (so far I've simply held down the f11 key for 15 minuites straight, without reward)  Any suggestions on where this error might be occuring?  Here is the code for the GameManager::OnInitialize function:

Code:
bool GameManager::OnInitialize(int argc, char* argv[])
{
if (!csInitializer::RequestPlugins(GetObjectRegistry(),
CS_REQUEST_VFS,
CS_REQUEST_OPENGL3D,
CS_REQUEST_ENGINE,
CS_REQUEST_FONTSERVER,
CS_REQUEST_IMAGELOADER,
CS_REQUEST_LEVELLOADER,
//CS_REQUEST_REPORTER,
//CS_REQUEST_REPORTERLISTENER,
//CS_REQUEST_PLUGIN("crystalspace.collisiondetection.opcode", iCollideSystem),
CS_REQUEST_END))
return ReportError("Failed to initialize plugins!");

if (!RegisterQueue(GetObjectRegistry()))
return ReportError("Failed to set up event handler!");

return true;
}
« Last Edit: December 07, 2005, 04:42:55 pm by dingobloo » Logged
sunshine
Administrator
Sr. Member
*****
Posts: 294


View Profile
« Reply #1 on: December 07, 2005, 05:59:54 pm »

You didn't happen to mention the actual error message...
Logged
allpowerful32
Jr. Member
**
Posts: 62


View Profile
« Reply #2 on: December 08, 2005, 02:46:59 am »

Thats because there wan't any.  It simply crashed, so windows decided to display its generic application crash dialog.  It seems that the only thing that can be sermized from this is that the error was serious.
« Last Edit: December 08, 2005, 04:36:48 am by allpowerful32 » Logged
sunshine
Administrator
Sr. Member
*****
Posts: 294


View Profile
« Reply #3 on: December 08, 2005, 02:38:59 pm »

In such a case, you will probably want to post a call stack traceback from the debugger at the point where it originally crashes. You also may want to use the CS command-line options --verbose and --console (or, at the very least, --console) to see if you get any error messages.
Logged
allpowerful32
Jr. Member
**
Posts: 62


View Profile
« Reply #4 on: December 08, 2005, 11:36:38 pm »

I tried that, and it seems to crash while trying to load vfs.dll.  There is still no error message, even on the console.  I made sure the dll was there, with the right version, etc.  Why might the error be comming up, and how do I fix it?

Thanks
Logged
sunshine
Administrator
Sr. Member
*****
Posts: 294


View Profile
« Reply #5 on: December 09, 2005, 04:28:57 am »

A traceback from the debugger would help to pinpoint the actual failure. Without it, we're just guessing. Did you set your CRYSTAL environment variable correctly?
Logged
allpowerful32
Jr. Member
**
Posts: 62


View Profile
« Reply #6 on: December 09, 2005, 04:50:35 am »

How do you export a traceback from msvc 7.1?  Sorry for my ignorance, for just up to this point, I have done develpment on (and therefore debugging) on my machine and my machine only.  And where can I find how to set the CRYSTAL variable correctly?
Logged
sunshine
Administrator
Sr. Member
*****
Posts: 294


View Profile
« Reply #7 on: December 09, 2005, 02:50:28 pm »

I'm not an MSVC7 users, so I can't say about the traceback. For the CRYSTAL environment variable, set it to point at the root of the CS tree (such as c:\CS, or wherever it resides on your computer). To actually set the variable, either do it from Control Panel > System > Advanced > Environment Variables, or go to a DOS prompt and set it for that DOS session (and run the program from the DOS window).
Logged
NicholasFox
Newbie
*
Posts: 8


View Profile
« Reply #8 on: December 10, 2005, 12:35:17 pm »

When running your application in Debug mode, in the right bottom there is a window saying "Callstack", "Breakpoints", "Command Window". Just select the contents of the Callstack tab and use Ctrl+C to copy it
Logged
allpowerful32
Jr. Member
**
Posts: 62


View Profile
« Reply #9 on: December 10, 2005, 05:28:15 pm »

I know that much, But it doesn't help when I haven't been able to get far enough in the debugger to get to the actual error.  I set the CRYSTAL environment variable, and recompiled cs just in case, but the problem still eludes me. 
Logged
Newton64
Newbie
*
Posts: 21


View Profile Email
« Reply #10 on: December 01, 2008, 05:21:15 am »

Epic bump.

Vista, CS 1.2.1.

I'm getting much the same problem as mentioned above. I start my app with "--verbose --console," and it seems the program just stalls after this:

"SCF_NOTIFY: loading plugin C:\crystalspace-src-1.2.1\vfs.dll to satisfy request for csVFS"

There's no error message popping up, no Windows crash report...the program just sits there waiting after that message, doing nothing.

It's almost 3 years on since the previous post...any possible solutions during that time?
Logged
Newton64
Newbie
*
Posts: 21


View Profile Email
« Reply #11 on: December 04, 2008, 03:45:11 am »

I should mention the problem occurs around the same place as allpowerful mentioned, in the csInitializer::RequestPlugins() call.

The weird thing is that I get a full printout of all these other plugins that are being loaded (just a random example: bugplug.dll gets loaded successfully), and they're all in the same place as vfs.dll, with the same permissions. The program only hangs when it tries to load vfs.dll.
Logged
res
Develazyoper
CS Developer
Full Member
*****
Posts: 206


View Profile Email
« Reply #12 on: December 04, 2008, 04:55:52 am »

Start the program from inside a debugger/attach a debugger after start, break execution, look at and tell us where it hangs.
Logged
Newton64
Newbie
*
Posts: 21


View Profile Email
« Reply #13 on: December 04, 2008, 06:11:35 am »

I'm running in Eclipse (with Cygwin), and when I hit the debugger, it'll run for a while until the "Pause" and "Stop" buttons are highlighted---i.e., the program is just running and doing nothing, which is where I have my hang.

Unfortunately, when I attempt to pause execution to see where I'm at, nothing happens, and I get the following popup:

"Target request failed: Failed to interrupt"

At that point, even if I try to have Eclipse stop the program, it'll stop the debugger, but if I check my Process Explorer, the app is still running, and I have to shut it down manually there.

Sorry I don't have much more info than that...right now I think the above means I'll have to run step by step through mountains of code; there's a ton of it, and I don't know of any "best guess" for where to start, so it's somewhat intimidating. I may do more tomorrow.
Logged
Newton64
Newbie
*
Posts: 21


View Profile Email
« Reply #14 on: December 06, 2008, 04:38:09 am »

Well, I've just been stepping through the code line by line for a good 20 minutes straight, and the program crashes with the following trace:

Code:
Cygwin gdb Debugger (05/12/08 10:03 PM)
Thread [1] (Stepping)
3 snwprintf()  0x77c6f72d
2 <symbol is not available> 0x77b303eb
1 <symbol is not available> 0x00000000
gdb (05/12/08 10:03 PM)

Not at all that informative, but the snwprintf() is where it crashes, apparently. Maybe this can narrow down the problem?
Logged
Pages: [1] 2 Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 7.493 seconds with 16 queries.