Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: Arrays in Custom Objects Invalid??  (Read 7169 times)

0 Members and 1 Guest are viewing this topic.

creatorbri

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 61
  • I'm a llama!
    • View Profile
Arrays in Custom Objects Invalid??
« on: December 06, 2003, 09:09:12 PM »

I haven't gotten my last issue solved, and now I've run across another. :( I get an error on line 15 in the following code:

Code: [Select]
01 #include "scripts\base.inc"
02  // ==========================================
03  // Comment List Object
04  // ==========================================
05  
06  
07  // ==========================================
08  // Properties
09  
10  // Counter
11  self.Count = 0;
12  
13  
14  // Comment Array (last will always be NULL)
15  self.List[0] = null;
16  
17  // Should this comment set be looped? Default is False
18  self.ResetAfter = false;
19  // ============================================
20  
21 // [Methods begin here]
Whats wrong with line 15??
Logged

creatorbri

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 61
  • I'm a llama!
    • View Profile
Re:Arrays in Custom Objects Invalid??
« Reply #1 on: December 06, 2003, 09:28:04 PM »

Update: Just to see what would happen, I made the arrays in my Comment Object local. Here's what happened, according to wme_crash_log.txt:

Code: [Select]
---------------------------------------------------------
---------- WME crash report: 06-12-2003, 13:25 ----------
---------------------------------------------------------
wme.exe caused a EXCEPTION_ACCESS_VIOLATION in module wme.exe at 001B:00442658
EAX=00000007  EBX=77D46401  ECX=00000000  EDX=00B47130  ESI=00000000
EDI=00000000  EBP=00D26A00  ESP=0012F9FC  EIP=00442658  FLG=00010246
CS=001B   DS=0023  SS=0023  ES=0023   FS=0038  GS=0000
Stack trace:
001B:00442658 (0x00B40808 0x00D36380 0x00CF7D00 0x00000000) wme.exe
001B:00B46208 (0x00446310 0x00448020 0x00449950 0x00449D20) <UNKNOWN>
001B:004489C0 (0x8B184689 0xC13B0C4E 0x00D0840F 0x55530000) wme.exe
001B:008B0C46 (0x00000000 0x00000000 0x00000000 0x00000000) <UNKNOWN>
And the wme.log says:

Code: [Select]
13:25: ********** DEBUG LOG OPENED 06-12-2003 (Release Build) *****************
13:25: DEAD:CODE Games Framework ver 1.01 (Build 37), Compiled on Nov 16 2003, 19:17:15
13:25: Platform: Windows XP Service Pack 1 (Build 2600)
13:25: DirectX version: 9.0
13:25: BugslayerUtil.dll is bound
13:25:
13:25: Scanning packages...
13:25:   Registered 0 files in 0 package(s)
13:25: Initializing scripting engine...
13:25:   Script compiler 'dcscomp.dll' bound successfuly
13:25: Loading string table...
13:25:   0 strings loaded
13:25: First run / crash recovery
13:25: Enumerating Direct3D devices...
13:25: Enumerating DirectDraw devices...
13:25: Enumerating DirectSound devices...
13:25: Available video devices:
13:25:   NVIDIA GeForce DDR (accelerated)
13:25:   NVIDIA GeForce DDR (non accelerated)
13:25: Available audio devices:
13:25:   Primary Sound Driver
13:25:   SB Live! Audio [E000]
13:25:   Modem #6 Line Playback (emulated)
13:25:   [no sound]
13:25:
13:25: User selected:
13:25:   Video: NVIDIA GeForce DDR (non accelerated)
13:25:          Windowed:yes  Colors:16bit
13:25:   Audio: Primary Sound Driver
13:25: Supports wide surfaces: yes
13:25: Data initialized in 411 ms
13:25: Fatal: Stack underflow

This happens every time ... though already today I've had WME reboot my computer for now reason on me twice.

I think I need a break. :(
« Last Edit: December 06, 2003, 09:29:23 PM by irbrian »
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:Arrays in Custom Objects Invalid??
« Reply #2 on: December 06, 2003, 10:14:59 PM »

Whats wrong with line 15??

It's actually the same problem as before. object[something] is equivalent to object.something, just a different syntax.


Update: Just to see what would happen, I made the arrays in my Comment Object local. Here's what happened, according to wme_crash_log.txt:

Hm, nice :( Do you suspect what code might have caused that, I'd like to replicate it so that I could debug it.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

creatorbri

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 61
  • I'm a llama!
    • View Profile
Re:Arrays in Custom Objects Invalid??
« Reply #3 on: December 07, 2003, 12:33:08 AM »

So arrays act like objects. Is there any chance a future version of WME will support chained object syntax?

As for the crash, if you'd like I can send you my project.. but first I'll mess with it a bit and see if I can figure out what caused it to start crashing right away.

The problem where WME and/or Project Manager restarts the whole computer has been happening for some time I'm afraid, and with various projects -- seems like its been happening since the very beginning, but prior to today it seemed like it had something to do with version conflicts. Now I'm using 037, and today its restarted itself twice, so I don't know whats going on.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:Arrays in Custom Objects Invalid??
« Reply #4 on: December 07, 2003, 07:14:18 PM »

So arrays act like objects. Is there any chance a future version of WME will support chained object syntax?

Yes, definitely. I find it annoying as well, but so far never that much annoying to actually rework the script compiler.


As for the crash, if you'd like I can send you my project.. but first I'll mess with it a bit and see if I can figure out what caused it to start crashing right away.

Than you, that would be helpful.


The problem where WME and/or Project Manager restarts the whole computer has been happening for some time I'm afraid, and with various projects -- seems like its been happening since the very beginning, but prior to today it seemed like it had something to do with version conflicts. Now I'm using 037, and today its restarted itself twice, so I don't know whats going on.

You are using WinXP, so does it mean you are getting blue screens? That's usually a driver issue. Make sure you have the latest Detonator/ForceWare drivers installed with no "dangerous" oprions turned on. It's not possible easy for an application to trigger the blue screen of death...
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

creatorbri

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 61
  • I'm a llama!
    • View Profile
Re:Arrays in Custom Objects Invalid??
« Reply #5 on: December 07, 2003, 09:02:37 PM »

Yes, definitely. I find it annoying as well, but so far never that much annoying to actually rework the script compiler.

I would greatly appreciate it.

As for the crash, if you'd like I can send you my project.. but first I'll mess with it a bit and see if I can figure out what caused it to start crashing right away.
Than you, that would be helpful.
I found the code that was causing the engine to crash:
Code: [Select]
if (comment = null)
     comment = " ";
if (sound = null)
     sound = " ";
Let that be a lesson to you all: Always check your operators. ::)

Still seems strange that these lines would crash the whole program... seems to me the code inside the parantheses should set the variables (parameters in a method, in this case) to null and always return true, instead of crashing WME. I haven't attempted to duplicate this in another script yet... if you get a chance maybe you could try it, and if you aren't able to duplicate it I can send you my project.

You are using WinXP, so does it mean you are getting blue screens? That's usually a driver issue. Make sure you have the latest Detonator/ForceWare drivers installed with no "dangerous" oprions turned on. It's not possible easy for an application to trigger the blue screen of death...

Yes, I'm using WinXP, and sometimes a blue screen does flash on the screen for fraction of a second before the machine reboots. Its true this is usually a driver issue, but it only seems to happen with WM. I run dozens of other DirectX apps on a daily basis and have never had the machine just reboot itself like that. I have the latest Detonators, and I'm not using anything fancy (besides the DirectX SDK, but again, this problem started long before I installed the SDK).

To be fair, I have been seeing some other anomalies lately that are definitely not related to WM, including Explorer.exe crashes. This is bad, I know, and I will probably be formatting my system fairly soon. Perhaps you could just keep the situation in mind for now, and I'll let you know if things improve after the format.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:Arrays in Custom Objects Invalid??
« Reply #6 on: December 08, 2003, 08:07:35 AM »

I found the code that was causing the engine to crash:
Code: [Select]
if (comment = null)
     comment = " ";
if (sound = null)
     sound = " ";
Let that be a lesson to you all: Always check your operators. ::)

Still seems strange that these lines would crash the whole program... seems to me the code inside the parantheses should set the variables (parameters in a method, in this case) to null and always return true, instead of crashing WME. I haven't attempted to duplicate this in another script yet... if you get a chance maybe you could try it, and if you aren't able to duplicate it I can send you my project.

Eugh :( I'll look into it, thanks.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.021 seconds with 23 queries.