weird experience

Hi, I installed panda3d yesterday and I keep getting weird behavior.

I created a very basic console C++ project in MSvc 2010…

int main(int argc, char *argv[]) {
  framework.open_framework(argc, argv);
  framework.set_window_title("Hello world!!!!");
  WindowFramework *window = framework.open_window();
  framework.main_loop();
  framework.close_framework();
  return (0);
}

In debug mode, it works as expected. A window is created with the title Hello World. Same code in ‘release’ mode, gives a different result.

Known pipe types:
  wglGraphicsPipe
(all display modules loaded.)
Non utf-8 byte in string: 0x8b, string is 'ï Uï∞ u¶ u► u♀ h²§┤ h↑@┤ Φ¢♥ '
Non utf-8 byte in string: 0xff, string is 'ï Uï∞ u¶ u► u♀ h²§┤ h↑@┤ Φ¢♥ '
Non utf-8 byte in string: 0x8b, string is 'ï Uï∞ u¶ u► u♀ h²§┤ h↑@┤ Φ¢♥ '
Non utf-8 byte in string: 0xff, string is 'ï Uï∞ u¶ u► u♀ h²§┤ h↑@┤ Φ¢♥ '
Non utf-8 byte in string: 0xff, string is 'ï Uï∞ u¶ u► u♀ h²§┤ h↑@┤ Φ¢♥ '
Non utf-8 byte in string: 0xff, string is 'ï Uï∞ u¶ u► u♀ h²§┤ h↑@┤ Φ¢♥ '
Non utf-8 byte in string: 0xfd, string is 'ï Uï∞ u¶ u► u♀ h²§┤ h↑@┤ Φ¢♥ '
Non utf-8 byte in string: 0xb4, string is 'ï Uï∞ u¶ u► u♀ h²§┤ h↑@┤ Φ¢♥ '
Non utf-8 byte in string: 0xb4, string is 'ï Uï∞ u¶ u► u♀ h²§┤ h↑@┤ Φ¢♥ '
Loading models/environment

the window appear with an empty title.

I added this line (from the tutorial)

  // Load the environment model.
 NodePath environ = qindow->load_model(framework.get_models(), "models/environment");

it works but MSVC report me this error when I run the program

Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call.  This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.

After seeing these problems, my motivation level dropped.

Character set nastiness is not really my specialty, but out of curiosity, go to Project Properties > Configuration Properties > General > Character Set. Are the settings there different between your release and debug configs?

edit: nevermind I thought that you didn’t compile panda using msvc2010 but you using debug mode suggests otherwise.

Sounds like you are building a Unicode project instead of an ASCII one. Don’t do that. :slight_smile:

Also note that you must use MSVC 2008, not MSVC 2010.

David

I meet the same problem today.

the debug version exe work OK.
the release version exe display error title.
Could you tell me how to fix the problem?

Are you building with MSVC 2010? If so, the way to fix the problem is to download and use MSVC 2008.

David