Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: 1 [2]
  Print  
Author Topic: Init3DWindowed and Init3DFullscreen cause AccessViolationException  (Read 2084 times)
azherdev
Customers
Community Member
*****
Posts: 99


« Reply #20 on: May 18, 2008, 12:13:55 AM »

*cought* *cought*....
Logged
SylvainTV
Administrator
Community Member
*****
Posts: 4479


WWW
« Reply #21 on: May 18, 2008, 05:52:49 AM »

What?

A new version has been released on May15th.
You can download it from downloads page, make sure you don't use a mirror for now.
Logged

Regards

Sylvain Dupont
TrueVision3D Developer
sylvain@truevision3d.com

TV3D IRC at http://chat.truevision3d.com or on server irc.truevision3d.com #Truevision3D. Come talk with us !
azherdev
Customers
Community Member
*****
Posts: 99


« Reply #22 on: May 18, 2008, 01:40:01 PM »

Opps, I was looking at the date and the release thread, didn't see the announcement. But that is the only good news, the bad news is the problem is still there - memory address where it breaks is different now. Here is what I have:

Environment:

- Windows XP Pro SP3 x32
- Visual Studio 2008 Pro
- Intel Core 2 Q6600
- Logitech MX1000 and Logitec MX Air
- Logitech Cordless Desktop Pro
- ATi 3850 PCIe 256MB and ATi X1950Pro PCIe 256MB
- Dell 1x 2405FPW and 2x 2001FP (all have USB ports, 2405 has memory card reader - no memory cards inserted. 2405 has the MX Air USB receiver plugged in)

- I have no removable memory stick or hard drive plugged in
- Debug and Release version of the build
- I am using the CPP DLL version of the lib

Error Message:

   Unhandled exception at 0x0048e4a3 in Sandbox.exe: 0xC0000005: Access violation writing location 0x014b1000.

Stack Trace:

    TV3D65.dll!0048e4a3()    
    [Frames below may be incorrect and/or missing, no symbols loaded for TV3D65.dll]   
    TV3D65.dll!005263d5()    
    shell32.dll!7ca2ac11()    
    ntdll.dll!7c949564()    
    ntdll.dll!7c927553()    
    ntdll.dll!7c918f01()    
    ntdll.dll!7c9101bb()    
    user32.dll!7e42b372()    
    user32.dll!7e45661e()    
    user32.dll!7e42be3b()    
    user32.dll!7e42be4b()    
    ntdll.dll!7c90e453()    
    gdi32.dll!77f176ab()    
    uxtheme.dll!5ad77d8e()    
    uxtheme.dll!5ad77bd6()    
    user32.dll!7e4194be()    
    user32.dll!7e428e0d()    
    user32.dll!7e4188da()    
    ntdll.dll!7c9101bb()    
>   msvcr90d.dll!_heap_alloc_base(unsigned int size=255)  Line 105 + 0x28 bytes   C
    ffffff90()   

TV3D Log File:

   05-18-2008 11:20:23 | --------------------------------------------
   05-18-2008 11:20:23 | Truevision3D Debug/Log File
   05-18-2008 11:20:23 | --------------------------------------------
   05-18-2008 11:20:23 | Engine Version : 6.5
   05-18-2008 11:20:23 | ENGINE INFO : DLL Compilation time May 15 2008 21:29:57

Output:

'Sandbox.exe': Loaded 'F:\My Documents\Alex\Soft\Projects\TV3D65X\Solution\Sandbox\Debug\Sandbox.exe', Symbols loaded.
'Sandbox.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll'
'Sandbox.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll'
'Sandbox.exe': Loaded 'C:\WINDOWS\system32\user32.dll'
'Sandbox.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll'
'Sandbox.exe': Loaded 'F:\My Documents\Alex\Soft\Projects\TV3D65X\Solution\Sandbox\Debug\TV3D65Xd.dll', Symbols loaded.
'Sandbox.exe': Loaded 'F:\My Documents\Alex\Soft\Projects\TV3D65X\Solution\Sandbox\Debug\TV3D65.dll'
'Sandbox.exe': Loaded 'C:\WINDOWS\system32\d3d9.dll'
'Sandbox.exe': Loaded 'C:\WINDOWS\system32\d3d8thk.dll'
'Sandbox.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll'
'Sandbox.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll'
'Sandbox.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll'
'Sandbox.exe': Loaded 'C:\WINDOWS\system32\secur32.dll'
'Sandbox.exe': Loaded 'C:\WINDOWS\system32\version.dll'
'Sandbox.exe': Loaded 'C:\WINDOWS\system32\winmm.dll'
'Sandbox.exe': Loaded 'C:\WINDOWS\system32\d3dx9_36.dll'
'Sandbox.exe': Loaded 'C:\WINDOWS\system32\dinput8.dll'
'Sandbox.exe': Loaded 'C:\WINDOWS\system32\shell32.dll'
'Sandbox.exe': Loaded 'C:\WINDOWS\system32\shlwapi.dll'
'Sandbox.exe': Loaded 'C:\WINDOWS\system32\ole32.dll'
'Sandbox.exe': Loaded 'C:\WINDOWS\system32\oleaut32.dll'
'Sandbox.exe': Loaded 'C:\WINDOWS\system32\iphlpapi.dll'
'Sandbox.exe': Loaded 'C:\WINDOWS\system32\ws2_32.dll'
'Sandbox.exe': Loaded 'C:\WINDOWS\system32\ws2help.dll'
'Sandbox.exe': Loaded 'F:\My Documents\Alex\Soft\Projects\TV3D65X\Solution\Sandbox\Debug\sigc-2.0d.dll'
'Sandbox.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_597c3456\msvcr90d.dll', Symbols loaded.
'Sandbox.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_597c3456\msvcp90d.dll', Symbols loaded.
'Sandbox.exe': Loaded 'F:\My Documents\Alex\Soft\Projects\TV3D65X\Solution\Sandbox\Debug\libxml2.dll', Binary was not built with debug information.
'Sandbox.exe': Loaded 'C:\WINDOWS\system32\wsock32.dll'
'Sandbox.exe': Loaded 'C:\WINDOWS\system32\imm32.dll'
'Sandbox.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.5512_x-ww_35d4ce83\comctl32.dll'
'Sandbox.exe': Loaded 'C:\WINDOWS\system32\comctl32.dll'
'Sandbox.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll'
'Sandbox.exe': Loaded 'C:\WINDOWS\system32\msctf.dll'
'Sandbox.exe': Loaded 'C:\Program Files\Logitech\SetPoint\lgscroll.dll', Binary was not built with debug information.
'Sandbox.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.1433_x-ww_5cf844d2\msvcr80.dll'
'Sandbox.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.1433_x-ww_5cf844d2\msvcp80.dll'
'Sandbox.exe': Loaded 'C:\WINDOWS\system32\ntmarta.dll'
'Sandbox.exe': Loaded 'C:\WINDOWS\system32\samlib.dll'
'Sandbox.exe': Loaded 'C:\WINDOWS\system32\wldap32.dll'
'Sandbox.exe': Loaded 'C:\Program Files\DeskSpace\deskspace154.dll', Binary was not built with debug information.
'Sandbox.exe': Loaded 'C:\WINDOWS\system32\msctfime.ime'
Heap corruption detected at 01245AC0
First-chance exception at 0x7c9276dc in Sandbox.exe: 0xC0000005: Access violation writing location 0x97ce16fd.
First-chance exception at 0x7c919064 in Sandbox.exe: 0xC0000005: Access violation reading location 0x97ce16fd.
First-chance exception at 0x0048e4a3 in Sandbox.exe: 0xC0000005: Access violation writing location 0x014b1000.
Unhandled exception at 0x0048e4a3 in Sandbox.exe: 0xC0000005: Access violation writing location 0x014b1000.

malloc.c (debugger breaks at the 18th line - "return HeapAlloc(_crtheap, 0, size ? size : 1);")

Code:
__forceinline void * __cdecl _heap_alloc (size_t size)

{
#ifndef _WIN64
    void *pvReturn;
#endif  /* _WIN64 */

    if (_crtheap == 0) {
        _FF_MSGBANNER();    /* write run-time error banner */
        _NMSG_WRITE(_RT_CRT_NOTINIT);  /* write message */
        __crtExitProcess(255);  /* normally _exit(255) */
    }

#ifdef _WIN64
    return HeapAlloc(_crtheap, 0, size ? size : 1);
#else  /* _WIN64 */
    if (__active_heap == __SYSTEM_HEAP) {
        return HeapAlloc(_crtheap, 0, size ? size : 1);
    } else
    if ( __active_heap == __V6_HEAP ) {
        if (pvReturn = V6_HeapAlloc(size)) {
            return pvReturn;
        }
    }
#ifdef CRTDLL
    else if ( __active_heap == __V5_HEAP )
    {
        if (pvReturn = V5_HeapAlloc(size)) {
            return pvReturn;
        }
    }
#endif  /* CRTDLL */

    if (size == 0)
        size = 1;

    size = (size + BYTES_PER_PARA - 1) & ~(BYTES_PER_PARA - 1);

    return HeapAlloc(_crtheap, 0, size);

#endif  /* _WIN64 */
}
Logged
darqSHADOW
Administrator
Community Member
*****
Posts: 2737


« Reply #23 on: May 20, 2008, 09:09:34 AM »

You need to download the new LicenseSign and recreate your licenses -- make sure you've done that as well.

John
Logged

TrueVision3D Project Manager
The fast and simple way of 3D development.
azherdev
Customers
Community Member
*****
Posts: 99


« Reply #24 on: May 20, 2008, 06:53:11 PM »

Yes, I have uninstalled and reinstalled the sdk and license sign (all new versions from the site - not the mirrors). Here is a small program that work without the license and cause "Unhandled exception at 0x100f4d70 in SampleTV3D.exe: 0xC0000005: Access violation reading location 0x00000054." with the license file. It crashes on the "gvEngine->Init3DWindowed(gWin, true);" line.

Please let me know if I am not initializing something properly.

Code:
#define _WIN32_WINNT 0x0500
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include "CTVEngine.h"
#pragma comment(lib, "TV3D65.lib")

CTVEngine *gvEngine = NULL;
HWND gWin;
bool bRunning = false;
MSG msg;

LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_DESTROY:
bRunning = false;
PostQuitMessage(0);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
return 0;
}

int WINAPI WinMain(HINSTANCE hInstance,
   HINSTANCE hPrevInstance,
   LPSTR lpCmdLine,
   int nShowCmd)
{
msg.message = NULL;

WNDCLASSEX wc = { sizeof(WNDCLASSEX), CS_CLASSDC, WndProc, 0L, 0L,
  GetModuleHandle(NULL), NULL, NULL, NULL, NULL,
  "TV3D65 Sandbox", NULL};
wc.hbrBackground = (HBRUSH)(COLOR_WINDOW);
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
RegisterClassEx(&wc);

gWin = CreateWindow(
"TV3D65 Sandbox",
"TV3D65 Sandbox",
WS_CAPTION | WS_SYSMENU,
100, 100,
640,
480,
NULL,
NULL,
wc.hInstance,
NULL);

if (gWin == NULL)
{
MessageBox(
NULL,
"Engine unable to create main window.",
"Engine Fatal Error", MB_OK | MB_ICONERROR);
return -1;
}

ShowWindow(gWin, 1);
UpdateWindow(gWin);
SetFocus(gWin);
ShowCursor(TRUE);

gvEngine = new CTVEngine();
gvEngine->Init3DWindowed(gWin, true);

bRunning = true;
while (bRunning)
{
gvEngine->Clear(false);
gvEngine->RenderToScreen();

if (PeekMessage( &msg, NULL, 0, 0, TRUE ))
{
TranslateMessage( &msg );
DispatchMessage( &msg );
}

Sleep(0);
}

gvEngine->ReleaseAll();

return 0;
}

PS. While the presentation went well, there were questions as to "What is TV3D?" and "Is that part of your company logo that will always be there?". Please, find a solution to this, I beg you.

My work PC (Pentium D, Dell, GeForce 7900) also crashes when the license is generated.
Logged
SylvainTV
Administrator
Community Member
*****
Posts: 4479


WWW
« Reply #25 on: May 20, 2008, 07:09:58 PM »

You're not lucky then. This system works for other 99% people Smiley
Your code is fine. Yes we will find a solution !
I'm going to send a debug dll tomorrow to help seeing what could be wrong

(Glad that your presentation went well, you could have generated a signed .exe, not developer license for it, to not have the logo Wink)
Logged

Regards

Sylvain Dupont
TrueVision3D Developer
sylvain@truevision3d.com

TV3D IRC at http://chat.truevision3d.com or on server irc.truevision3d.com #Truevision3D. Come talk with us !
azherdev
Customers
Community Member
*****
Posts: 99


« Reply #26 on: May 20, 2008, 07:20:25 PM »

I tried creating the application license, and it does nothing. Watermark is still there.  Huh

I am possibly the unluckiest guy.
Logged
Pages: 1 [2]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks