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


WWW
« on: March 02, 2008, 05:40:43 PM »

Hi everybody,

I just started setting up TV3D 6.5 in my new project. I had some issues getting anything Truevision to work - I'm running Windows XP x64. But, after switching my compiler to compile in x86 mode, I've gotten the first wave of issues resolved.

But now I'm hitting something really weird. Whenever I try to run my application I get the following error:

"AccessViolationException was unhandled

Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

I've never seen this error before. The line that's throwing this error is TV.Init3DWindowed (Or Init3DFullscreen - they throw the same error).

Now, at this point, all I've done is literally copied and pasted code from the C# tutorial project to my own project.

The code looks like this:

Code:
public partial class GameForm : Form {
        private Settings settings;
        private TVEngine TV;
        private TVScene Scene;
        private TVInputEngine Input;
        private TVGlobals Globals;
        private bool bDoLoop;

        public GameForm() {
            InitializeComponent();
            setUpGameForm();
        }

        public void setUpGameForm() {
            settings = new Settings();
            settings.loadSettings();

            TV = new TVEngine();

            TV.SetDebugMode(true, true);
            TV.SetDebugFile(System.IO.Path.GetDirectoryName(Application.ExecutablePath) + "\\debugfile.txt");

            TV.Init3DWindowed(this.Handle, true);

            ...

(I trimmed out the stuff after the line that throws the error, because it is exactly the same as what's in the C# tutorial.

So, any ideas on what may be causing this or a solution? Again, I'm wondering if this might have something to do with me running a 64-bit OS.

Thanks in advance!
Logged
SylvainTV
Administrator
Community Member
*****
Posts: 4479


WWW
« Reply #1 on: March 03, 2008, 07:30:20 AM »

Did you generate a dev license ?
Usually a crash in Init means that license check failed Smiley

Please post the debug file also.
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 !
Dekzar
Customers
Community Member
*****
Posts: 13


WWW
« Reply #2 on: March 30, 2008, 06:56:03 PM »

Hey Sylvain,

Thanks for the response. Well, I had generated a license file. I deleted it and generated a new one, and that seemed to solve it.

It worked reliably for this whole month, and then today I tried to run my app, and I'm getting weird errors out of it.

Code:
System.BadImageFormatException was unhandled
  Message=" is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)"
  Source="Client"
  StackTrace:
       at ZA.Client.Game.setUpGameForm()
       at ZA.Client.Game.Initialize() in E:\Documents and Settings\Eric\My Documents\Omnik Games\ZA-2\Client\Game.cs:line 49
       at ZA.Client.MainMenuForm.btnSinglePlayer_Click(Object sender, EventArgs e) in E:\Documents and Settings\Eric\My Documents\Omnik Games\ZA-2\Client\MainMenuForm.cs:line 48
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.Label.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at ZA.Client.Program.Main() in E:\Documents and Settings\Eric\My Documents\Omnik Games\ZA-2\Client\Program.cs:line 24
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:

I'm pretty much certain this is a TV3D issue as nothing in my code has changed since I last ran it and it worked fine. This occurs everywhere that TV3D it used.

So, I tried deleting and regenerating my license again, but to no avail.

Do you have any suggestions?
Logged
sybixsus
Customers
Community Member
*****
Posts: 1094


WWW
« Reply #3 on: March 30, 2008, 07:13:01 PM »

Try deleting it and not regenerating it. See if it works without a license. At least that way  you know exactly where the problem lies ( if it works, anyway. )
Logged
Dekzar
Customers
Community Member
*****
Posts: 13


WWW
« Reply #4 on: March 31, 2008, 12:41:06 AM »

Indeed, it did work without the license.

So, that begs the question, what exactly is wrong with the license that prevents it from running?
Logged
Raine
Customers
Community Member
*****
Posts: 1190


« Reply #5 on: March 31, 2008, 12:58:04 AM »

It might have been invalidated by a removable device which you may or may not have plugged into your machine. It's a known problem and it seems to be bound to be solved shortly.
Logged

Dekzar
Customers
Community Member
*****
Posts: 13


WWW
« Reply #6 on: April 01, 2008, 10:23:26 PM »

Has there been any indication as to when this may get fixed? It's quite an irritation, and has basically put a complete halt on my development.
Logged
SylvainTV
Administrator
Community Member
*****
Posts: 4479


WWW
« Reply #7 on: April 03, 2008, 06:44:12 AM »

Yes this is already fixed (except for 1% cases if I remember well). It has just to be released now, but we have some issues with SVN server for the moment, we will try to get around it.
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 #8 on: April 17, 2008, 03:26:55 AM »

I'm still having problems with developer license.

When I delete it, everything works fine. When I generate a developer license, I get Access Violation error.

[edit]
ahem... this is one of those concerns some of us had regarding the new licensing. I have UI elements bottom right corner that I can't see now because of this minor glitch.
« Last Edit: April 19, 2008, 02:35:27 AM by azherdev » Logged
Dekzar
Customers
Community Member
*****
Posts: 13


WWW
« Reply #9 on: April 18, 2008, 12:44:56 PM »

Me too.

Any word on when the fix for this will be released? It's completely stopped development on my project.
Logged
ZaPPZion
Community Member
*
Posts: 341


« Reply #10 on: April 19, 2008, 07:39:35 AM »

Well, not to be annoying or to be a smartass, but you can work without the developer license can't you? I mean, you can still develop your project, and when the fix is released you put in the license Smiley
Logged
Dekzar
Customers
Community Member
*****
Posts: 13


WWW
« Reply #11 on: April 23, 2008, 04:59:56 PM »

Partially. However, I'm curious if other issues I'm experiencing are tied into this license.

There are certain portions of my project which DO work without the developer license - however, for some reason, portions of my project which worked before no longer do. I haven't changed anything in those areas directly (Though I admit it's possible something else is affecting them), but since all of these issues happened when my license stopped working, I feel they may be tied together and I don't want to spend time debugging them when it may not even be something I did.

That's not to say I haven't done some debugging to see if it's something in my code - but I haven't been able to find anything.

As such, I'm holding out for the new release with the expectation that this issues are somehow tied into the licensing.
Logged
azherdev
Customers
Community Member
*****
Posts: 99


« Reply #12 on: May 02, 2008, 06:17:13 AM »

What is the status of this bug? I have a demo that I need to present to a client and can not have the logo displayed.
Logged
darqSHADOW
Administrator
Community Member
*****
Posts: 2737


« Reply #13 on: May 03, 2008, 01:16:00 PM »

If you need this now then please PM me and I will send you the new DLL you need along with the new LicenseSign file.  Please let me know which language you are using, as well.  If you can wait a week, then please do, as we are adding one small addition to the setups and then we will be releasing them.

John
Logged

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


« Reply #14 on: May 03, 2008, 02:46:36 PM »

My presentation is scheduled for the 20th of May so I can wait for a week. I am using C++ DLL in Visual Studio 2008. Thank you DS.
Logged
darqSHADOW
Administrator
Community Member
*****
Posts: 2737


« Reply #15 on: May 03, 2008, 05:57:01 PM »

No problem, if anything does happen to delay the release I can send you the new files to ensure you make your deadline.  So far we're looking good though.

John
Logged

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


« Reply #16 on: May 13, 2008, 04:19:13 PM »

Any update DS?
Logged
darqSHADOW
Administrator
Community Member
*****
Posts: 2737


« Reply #17 on: May 14, 2008, 08:58:03 AM »

Sylvain just finished fixing the Actor CPU bug, which was a pain due to the number of affected shaders.  (Took a bit longer then we had anticipated.)  Sylvain is now reversing some changes for the particle shaders so that I can get the build out tonight.  It will be a late night release, due to me being at the office all day today, but I expect to have it completed by 11pm EST.

John
Logged

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


« Reply #18 on: May 14, 2008, 07:32:03 PM »

Thank you DS.

I can wait until this weekend if you feel you can finish up the particle shaders by then to avoid reverting changes. I need full day Sunday and Monday to make sure everything works before the presentation.
Logged
darqSHADOW
Administrator
Community Member
*****
Posts: 2737


« Reply #19 on: May 14, 2008, 08:20:13 PM »

Sylvain managed to fix the particle rotations tonight before I arrived home, so I am going to take an extra day here to ensure this is all working properly.  This change added a few new methods so I want to also get this into PE for the customers that request this change.

We'll be good tomorrow unless I find a MAJOR flaw tonight in my testing.  Thanks!

John
Logged

TrueVision3D Project Manager
The fast and simple way of 3D development.
Pages: [1] 2
  Print  
 
Jump to:  

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