Game Development Community

Illegal Operation

by Jeff Trier · in Torque Game Engine · 03/14/2003 (4:49 pm) · 8 replies

Hi all,

I was playing around with datablocks in Script and I came across this error with "Torquedemo_debug".
//============================================
TORQUEDEMO_DEBUG caused an invalid page fault in
module TORQUEDEMO_DEBUG.EXE at 0167:004db8d2.
Registers:
EAX=01d82ff4 CS=0167 EIP=004db8d2 EFLGS=00010206
EBX=00dd0000 SS=016f ESP=00ede43c EBP=00ede48c
ECX=00000000 DS=016f ESI=00ede518 FS=35d7
EDX=009f7448 ES=016f EDI=00ede48c GS=0000
Bytes at CS:EIP:
8b 41 34 5f 5e 5b 8b e5 5d c3 cc cc cc cc cc cc
Stack dump:
00ede508 00ede518 00dd0000 cccccccc cccccccc cccccccc cccccccc cccccccc cccccccc cccccccc cccccccc cccccccc cccccccc cccccccc cccccccc cccccccc
//============================================

After I got this error a few times, I decided to revert all my changes to when they last worked and I still got it. Then I rebooted my system and am still getting it (which is why I put it into the bug section).

Can anyone tell me what this error means? Was it something most likely caused by me somehow?

I am using Stable version 1.1.2

Thanks,
-Jeff

About the author

Originally a Classical/Metal musician, I've always been attracted to anything involving computers, including: Networking, PC Building and Repair, software design and coding. I've been involved with game design and development for over 10 years.


#1
03/14/2003 (5:03 pm)
i get this error with Head and the release build and thought it was something i did but now i dont think so


TORQUEDEMO caused an invalid page fault in
module WINMM.DLL at 0167:bfdf3531.
Registers:
EAX=00000003 CS=0167 EIP=bfdf3531 EFLGS=00010246
EBX=82c7deb0 SS=016f ESP=03e8ff20 EBP=03e8ff6c
ECX=03c80c4c DS=016f ESI=bfdf3522 FS=3f97
EDX=82b7c0e0 ES=016f EDI=da1238b0 GS=0000
Bytes at CS:EIP:
89 41 10 ff 72 0c 68 bd 03 00 00 ff 72 58 e8 42
Stack dump:
00000000 bff850cf 82b7c0e0 da1238b0 000000c0 82c7deb0 00000001 00000000 00000000 00000001 8195c1fc 00000001 c16292c4 bff741f7 03e8fd50 03e8ffbc
#2
03/14/2003 (5:08 pm)
by the way i didnt edit any thing yet,,, here is my console log (would it have somthing to do with the missing textures?



//-------------------------- 3/14/2003 -- 17:37:11 -----
Processor Init:
Intel Pentium 4, ~1.70 Ghz
(timed at roughly 1.70 Ghz)
FPU detected
MMX detected
SSE detected

Math Init:
Installing Standard C extensions
Installing Assembly extensions
Installing FPU extensions
Installing MMX extensions
Installing SSE extensions

Input Init:
keyboard0 input device created.
mouse0 input device created.
DirectInput enabled.

--------- Loading MODS ---------
Loading compiled script common/main.cs.
Missing file: common/defaults.cs!
Loading compiled script fps/main.cs.
Loading compiled script fps/client/defaults.cs.
Loading compiled script fps/server/defaults.cs.
Compiling fps/client/prefs.cs...
Loading compiled script fps/client/prefs.cs.
Compiling fps/server/prefs.cs...
Loading compiled script fps/server/prefs.cs.

--------- Parsing Arguments ---------

--------- Initializing MOD: Common ---------
Loading compiled script common/client/canvas.cs.
Loading compiled script common/client/audio.cs.

--------- Initializing MOD: FPS ---------
Loading compiled script fps/client/init.cs.
Loading compiled script fps/server/init.cs.
Loading compiled script fps/data/init.cs.
Loading compiled script fps/data/terrains/grassland/propertyMap.cs.
Loading compiled script fps/data/terrains/scorched/propertyMap.cs.

--------- Initializing FPS: Server ---------
Loading compiled script common/server/audio.cs.
Loading compiled script common/server/server.cs.
Loading compiled script common/server/message.cs.
Loading compiled script common/server/commands.cs.
Loading compiled script common/server/missionInfo.cs.
Loading compiled script common/server/missionLoad.cs.
Loading compiled script common/server/missionDownload.cs.
Loading compiled script common/server/clientConnection.cs.
Loading compiled script common/server/kickban.cs.
Loading compiled script common/server/game.cs.
Loading compiled script fps/server/scripts/commands.cs.
Loading compiled script fps/server/scripts/centerPrint.cs.
Loading compiled script fps/server/scripts/game.cs.

--------- Initializing FPS: Client ---------
Loading compiled script common/client/message.cs.
Loading compiled script common/client/mission.cs.
Loading compiled script common/client/missionDownload.cs.
Loading compiled script common/client/actionMap.cs.
Loading compiled script common/editor/editor.cs.
Video Init:
Accelerated OpenGL display device detected.
Accelerated D3D device detected.
Voodoo 2 display device not detected.

Activating the OpenGL display device...
Activating the OpenGL display device...
Setting screen mode to 800x600x16 (w)...
Creating a new window...
Acquiring a new device context...
Pixel format set:
16 color bits, 24 depth bits, 8 stencil bits
Creating a new rendering context...
Making the new rendering context current...
OpenGL driver information:
Vendor: NVIDIA Corporation
Renderer: GeForce3/AGP/SSE2
Version: 1.3.1
OpenGL Init: Enabled Extensions
ARB_multitexture (Max Texture Units: 4)
EXT_paletted_texture
EXT_compiled_vertex_array
NV_vertex_array_range
EXT_texture_env_combine
EXT_packed_pixels
EXT_fog_coord
ARB_texture_compression
EXT_texture_compression_s3tc
(ARB|EXT)_texture_env_add
EXT_texture_filter_anisotropic (Max anisotropy: 8.000000)
WGL_EXT_swap_control
OpenGL Init: Disabled Extensions
3DFX_texture_compression_FXT1
NPatch tessellation

Loading compiled script common/ui/defaultProfiles.cs.
Loading compiled script common/ui/GuiEditorGui.gui.
Loading compiled script common/ui/ConsoleDlg.gui.
Loading compiled script common/ui/InspectDlg.gui.
Loading compiled script common/ui/InspectAddFieldDlg.gui.
Loading compiled script common/ui/LoadFileDlg.gui.
Loading compiled script common/ui/SaveFileDlg.gui.
Loading compiled script common/ui/MessageBoxOkDlg.gui.
Loading compiled script common/ui/MessageBoxYesNoDlg.gui.
Loading compiled script common/ui/MessageBoxOKCancelDlg.gui.
Loading compiled script common/ui/MessagePopupDlg.gui.
Loading compiled script common/ui/HelpDlg.gui.
Loading compiled script common/ui/RecordingsDlg.gui.
Loading compiled script common/client/metrics.cs.
Loading compiled script common/ui/FrameOverlayGui.gui.
Loading compiled script common/client/messageBox.cs.
Loading compiled script common/client/screenshot.cs.
Loading compiled script common/client/cursor.cs.
Loading compiled script common/client/help.cs.
Loading compiled script common/client/recordings.cs.

OpenAL Driver Init:
OpenAL
Vendor: Creative Labs Inc.
Version: OpenAL 1.0
Renderer: Software
Extensions: IASIG

Loading compiled script fps/client/scripts/audioProfiles.cs.
Loading compiled script fps/client/ui/defaultGameProfiles.cs.
Loading compiled script fps/client/ui/PlayGui.gui.
Loading compiled script fps/client/ui/ChatHud.gui.
Loading compiled script fps/client/ui/playerList.gui.
Loading compiled script fps/client/ui/mainMenuGui.gui.
Loading compiled script fps/client/ui/aboutDlg.gui.
Loading compiled script fps/client/ui/startMissionGui.gui.
Loading compiled script fps/client/ui/joinServerGui.gui.
Loading compiled script fps/client/ui/endGameGui.gui.
Loading compiled script fps/client/ui/loadingGui.gui.
Loading compiled script fps/client/ui/optionsDlg.gui.
Loading compiled script fps/client/ui/remapDlg.gui.
Loading compiled script fps/client/scripts/client.cs.
Loading compiled script fps/client/scripts/missionDownload.cs.
Loading compiled script fps/client/scripts/serverConnection.cs.
Loading compiled script fps/client/scripts/playerList.cs.
Loading compiled script fps/client/scripts/loadingGui.cs.
Loading compiled script fps/client/scripts/optionsDlg.cs.
Loading compiled script fps/client/scripts/chatHud.cs.
Loading compiled script fps/client/scripts/messageHud.cs.
Loading compiled script fps/client/scripts/playGui.cs.
Loading compiled script fps/client/scripts/centerPrint.cs.
Loading compiled script fps/client/scripts/game.cs.
Loading compiled script fps/client/scripts/default.bind.cs.
Missing file: fps/client/config.cs!
Binding server port to default IP
UDP initialized on port 0
Engine initialized...
Exporting server prefs...
Loading compiled script fps/server/scripts/audioProfiles.cs.
Loading compiled script fps/server/scripts/camera.cs.
Loading compiled script fps/server/scripts/markers.cs.
... Shape with old version.
Loading compiled script fps/server/scripts/triggers.cs.
Loading compiled script fps/server/scripts/inventory.cs.
Loading compiled script fps/server/scripts/shapeBase.cs.
Loading compiled script fps/server/scripts/item.cs.
Loading compiled script fps/server/scripts/staticShape.cs.
Loading compiled script fps/server/scripts/health.cs.
Loading compiled script fps/server/scripts/weapon.cs.
Loading compiled script fps/server/scripts/radiusDamage.cs.
Loading compiled script fps/server/scripts/rifle.cs.
Loading compiled script fps/server/scripts/crossbow.cs.
Loading compiled script fps/server/scripts/player.cs.
Loading compiled script fps/data/shapes/player/player.cs.
Validation required for shape: fps/data/shapes/player/player.dts
Loading compiled script fps/server/scripts/aiPlayer.cs.
*** LOADING MISSION: fps/data/missions/scorchedPlanet.mis
*** Stage 1 load
*** Stage 2 load
Executing fps/data/missions/scorchedPlanet.mis.
*** Mission loaded
Connect request from: IPX:2E303535:31202D323131:14126
Connection established 1391
CADD: 1392 local
*** Sending mission load to client: fps/data/missions/scorchedPlanet.mis
Mapping string: ServerMessage to index: 0
Mapping string: MsgConnectionError to index: 1
Mapping string: MsgLoadInfo to index: 2
Mapping string: MsgLoadDescripition to index: 3
Mapping string: MsgLoadInfoDone to index: 4
Mapping string: MsgClientJoin to index: 5
Mapping string: Welcome to the Torque demo app %1. to index: 6
Mapping string: Test Guy to index: 7
Mapping string: MissionStartPhase1 to index: 8
*** New Mission: fps/data/missions/scorchedPlanet.mis
*** Phase 1: Download Datablocks & Targets
Mapping string: MissionStartPhase1Ack to index: 0
Could not locate texture: ~/data/shapes/player/splash
Could not locate texture: fps/data/shapes/player/base.lmale
Could not locate texture: fps/data/shapes/player/base.lmale
Validation required for shape: fps/data/shapes/player/player.dts
Mapping string: MissionStartPhase2 to index: 9
*** Phase 2: Download Ghost Objects
Mapping string: MissionStartPhase2Ack to index: 1
Could not locate texture: fps/data/interiors/evil1/fairfax/ORIGIN
Could not locate texture: fps/data/interiors/evil1/fairfax/TRIGGER
Could not locate texture: fps/data/interiors/evil1/fairfax/FORCEFIELD
Could not locate texture: fps/data/interiors/evil1/fairfax/ORIGIN
Could not locate texture: fps/data/interiors/evil1/fairfax/TRIGGER
Could not locate texture: fps/data/interiors/evil1/fairfax/FORCEFIELD
Could not locate texture: fps/data/interiors/evil1/fairfax/ORIGIN
Could not locate texture: fps/data/interiors/evil1/fairfax/TRIGGER
Could not locate texture: fps/data/interiors/evil1/fairfax/FORCEFIELD
Could not locate texture: fps/data/interiors/evil1/example/ORIGIN
Could not locate texture: fps/data/interiors/evil1/example/TRIGGER
Could not locate texture: fps/data/interiors/evil1/example/FORCEFIELD
Could not locate texture: special/cloakTexture
Ghost Always objects received.
Mapping string: MissionStartPhase3 to index: 10
Client Replication Startup has Happened!
fxFoliageReplicator - Client Foliage Replication Startup is complete.
*** Phase 3: Mission Lighting
Successfully loaded mission lighting file: 'fps/data/missions/scorchedPlanet_4ad209f2.ml'
Mission lighting done
Mapping string: MissionStartPhase3Ack to index: 2
Mapping string: MissionStart to index: 11
Mapping string: SyncClock to index: 12
Could not locate texture: special/cloakTexture
Could not locate texture: special/cloakTexture
*** Initial Control Object
Activating DirectInput...
keyboard0 input device acquired.
*** ENDING MISSION
CDROP: 1392 IPX:2E303535:31202D323131:14126
Exporting server prefs...
Exporting client prefs
Exporting server prefs
Exporting client prefs
Exporting server prefs
Shutting down the OpenGL display device...
Making the GL rendering context not current...
Deleting the GL rendering context...
Releasing the device context...
keyboard0 input device unacquired.
#3
03/14/2003 (5:29 pm)
hmmm well I commented out
//ace dont like// Con::warnf("Could not locate texture: %s", textureName);
return NULL;
}

in dgl/gTexManager.cc on line 1259 and got rid of the missing texture errors but still get the error on ocasion so i dont know
#4
03/14/2003 (5:55 pm)
WINMM.dll is windows multi media dll, fyi...
#5
03/14/2003 (6:23 pm)
Try running Torque in the debugger and see what your call stack looks like when the crash happens.
#6
03/14/2003 (6:52 pm)
I should mention that this error happens after I execute the program then Click "Start Mission -> Launch Mission (doesn't matter which mission I choose)".

It happens directly after I launch the mission. I figured that it might have been because of a model I edited, I removed it from that mission, but still no luck.

EDIT:

Ok, I pressed debug and I entered VC6 to see where the error was.

It's in torque\engine\core\resManager.h

The error occurs in this Function:

//===============================
template <class T> class Resource
{
private:
   ResourceObject *obj;
   // ***WARNING***
   // Using a faster lock that bypasses the resource manger.
   // void _lock() { if (obj) obj->rm->lockResource( obj ); }
   void _lock();
   void _unlock();

public:
   // If assigned a ResourceObject, it's assumed to already have
   // been locked, lock count is incremented only for copies or
   // assignment from another Resource.
   Resource() : obj(NULL) { ; }
   Resource(ResourceObject *p) : obj(p) { ; }
   Resource(const Resource &res) : obj(res.obj) { _lock(); }
   ~Resource() { unlock(); }
   
   const char *getFilePath() const { return (obj ? obj->path : NULL); }
   const char *getFileName() const { return (obj ? obj->name : NULL); }

   Resource& operator= (ResourceObject *p) { _unlock(); obj = p; return *this; }
   Resource& operator= (const Resource &r) { _unlock(); obj = r.obj; _lock(); return *this; }

   U32 getCRC() { return (obj ? obj->crc : 0); }
   bool isNull()   const { return ((obj == NULL) || (obj->mInstance == NULL)); }
   operator bool() const { return ((obj != NULL) && (obj->mInstance != NULL)); }
   T* operator->()   { return (T*)obj->mInstance; }
   T& operator*()    { return *((T*)obj->mInstance); }
   operator T*() const    { return (obj) ? (T*)obj->mInstance : (T*)NULL; }
   const T* operator->() const  { return (const T*)obj->mInstance; }
   const T& operator*() const   { return *((const T*)obj->mInstance); }
   operator const T*() const    { return (obj) ? (const T*)obj->mInstance :  (const T*)NULL; }
   void unlock();
   void purge();
};

//=======================================================

And it is pointing to this line:
T* operator->() { return (T*)obj->mInstance; }

//=======================================================
And in the auto Tab in the vc6 debugger window it says:

obj 0x00000000
prev CXX0030: Error: expression cannot be evaluated
next CXX0030: Error: expression cannot be evaluated
nextEntry CXX0030: Error: expression cannot be evaluated
nextResource CXX0030: Error: expression cannot be evaluated
prevResource CXX0030: Error: expression cannot be evaluated
flags CXX0030: Error: expression cannot be evaluated
path CXX0030: Error: expression cannot be evaluated
name CXX0030: Error: expression cannot be evaluated
zipPath CXX0030: Error: expression cannot be evaluated
zipName CXX0030: Error: expression cannot be evaluated
fileOffset CXX0030: Error: expression cannot be evaluated
fileSize CXX0030: Error: expression cannot be evaluated
compressedFileSize CXX0030: Error: expression cannot be evaluated
mInstance CXX0030: Error: expression cannot be evaluated
lockCount CXX0030: Error: expression cannot be evaluated
crc CXX0030: Error: expression cannot be evaluated
- this 0x01d997d4
+ obj 0x00000000

//=======================================================

I have never used this debugger before and I am new to C++, but what the heck... it may help.

-Jeff
#7
03/14/2003 (7:08 pm)
EUREKA!

I guess you aren't supposed to put an "echo" in a datablock.

lol!

All's well. :)

-Jeff
#8
03/15/2003 (7:16 am)
thanks for the heads up, ( i should of caught that) stupid win98, i think i'm going to switch to xp.