Error handling

edited May 2012 in Help request
I'm working on getting some animations to work (specifically the same little.. uh... thing I've got in my avatar) - but it's not working yet.

The main problem is that the error is very vague.
[2012-05-27 11:34:55] <DISPLAY> (orxTexture_CreateFromFile() - f:workspaceorxcodesrcdisplayorxtexture.c:428) Failed to load bitmap and link it to texture.

I'm sure there's a perfectly valid reason for this error. The problem is, apart for the fact that 'something is wrong with the loading of the texture' - it's not telling me much.
[Player]
ChildList	= PlayerGraphics

[PlayerPivot]
Pivot		= (16.0, 16.0, 0.0)

[PlayerGraphics@PlayerPivot]
AnimationSet	= PlayerAnimSet

[PlayerFullGraphics@PlayerPivot]
Texture		= ../data/Player/Playerstrip.png
TextureSize	= (32, 32, 0)


[PlayerAnimSet]
AnimationList	= Walk
LinkList	= WalkLoop

[WalkLoop]
Source		= Walk
Destination	= Walk

[Walk]
DefaultKeyDuration   = 0.1
KeyData1             = Walk1
KeyData2             = Walk2
KeyData3             = Walk3
KeyData4             = Walk4

[Walk1@PlayerFullGraphics]
TextureCorner        = (0, 0, 0)

[Walk2@PlayerFullGraphics]
TextureCorner        = (32, 0, 0)

[Walk3@PlayerFullGraphics]
TextureCorner        = (64, 0, 0)

[Walk4@PlayerFullGraphics]
TextureCorner        = (96, 0, 0)

	orxViewport_CreateFromConfig( "Viewport" );
 
	// Our new static scene is loaded from the following file.
	orxConfig_Load( "Player.ini" );
 
        // We create the 'root' object of our scene, which in turn creates it's children, and their children etc.
	orxObject_CreateFromConfig( "Player" );
Using this image:
Playerstrip.png

So please, could you have a look at this specific error message and see if it can't give some more information, such as which element it's faulting on and which file it's trying to load?

Comments

  • edited May 2012
    G'day mate, writing this on my phone so please excuse any typos etc.

    As for your error; if you're comfortable doing so, please use the svn version of orx, one of the recent patches made that specific error a little more detailed if my memory serves me correctly.

    Only other thing I'd suggest checking your file path and capitalization etc. Good luck! :)
  • edited May 2012
    No worries, as long as you use enters ;)

    Anyway, I've tried compiling [Static Debug] the SVN version (downloaded yesterday, updated just now) and when rebuilding all I'm getting 2 linker problems:
    Error	1	error LNK2019: unresolved external symbol __imp__timeBeginPeriod@4 referenced in function @orxSystem_Init@0	orxd.lib
    
    Error	3	error LNK2019: unresolved external symbol __imp__timeEndPeriod@4 referenced in function @orxSystem_Exit@0	orxd.lib
    

    This may not be a problem, as I do get a orxd.lib as expected. However, using the SVN version also gives me linker errors in my project:
    1>Main.obj : error LNK2019: unresolved external symbol __imp_@_orxDebug_Exit@0 referenced in function _orx_Execute
    1>Main.obj : error LNK2019: unresolved external symbol __imp_@orxModule_ExitAll@0 referenced in function _orx_Execute
    1>Main.obj : error LNK2019: unresolved external symbol __imp_@orxModule_Exit@4 referenced in function _orx_Execute
    1>Main.obj : error LNK2019: unresolved external symbol __imp_@orxEvent_RemoveHandler@8 referenced in function _orx_Execute
    1>Main.obj : error LNK2019: unresolved external symbol __imp_@orxClock_Update@0 referenced in function _orx_Execute
    1>Main.obj : error LNK2019: unresolved external symbol __imp_@orxEvent_Send@4 referenced in function _orx_Execute
    1>Main.obj : error LNK2019: unresolved external symbol __imp_@orxMemory_Zero@8 referenced in function _orx_Execute
    1>Main.obj : error LNK2019: unresolved external symbol __imp_@orxParam_DisplayHelp@0 referenced in function _orx_Execute
    1>Main.obj : error LNK2019: unresolved external symbol __imp_@orxEvent_AddHandler@8 referenced in function _orx_Execute
    1>StandAlone.obj : error LNK2001: unresolved external symbol __imp_@orxEvent_AddHandler@8
    1>Main.obj : error LNK2019: unresolved external symbol __imp_@orxModule_Init@4 referenced in function _orx_Execute
    1>Main.obj : error LNK2019: unresolved external symbol __imp_@orxParam_SetArgs@8 referenced in function _orx_Execute
    1>Main.obj : error LNK2019: unresolved external symbol __imp_@orxModule_SetupAll@0 referenced in function _orx_Execute
    1>Main.obj : error LNK2019: unresolved external symbol __imp_@orxModule_RegisterAll@0 referenced in function _orx_Execute
    1>Main.obj : error LNK2019: unresolved external symbol __imp_@orxModule_Register@16 referenced in function _orx_Execute
    1>Main.obj : error LNK2019: unresolved external symbol __imp_@_orxDebug_Break@0 referenced in function _orx_Execute
    1>Main.obj : error LNK2019: unresolved external symbol __imp___orxDebug_Log referenced in function _orx_Execute
    1>StandAlone.obj : error LNK2001: unresolved external symbol __imp___orxDebug_Log
    1>Main.obj : error LNK2019: unresolved external symbol __imp_@_orxDebug_Init@0 referenced in function _orx_Execute
    1>Main.obj : error LNK2019: unresolved external symbol __imp_@orxModule_AddOptionalDependency@8 referenced in function @orx_MainSetup@0
    1>Main.obj : error LNK2019: unresolved external symbol __imp_@orxModule_AddDependency@8 referenced in function @orx_MainSetup@0
    1>StandAlone.obj : error LNK2019: unresolved external symbol __imp_@orxObject_SetTargetAnim@8 referenced in function "public: static enum __orxSTATUS_t __fastcall StandAlone::Init(void)" (?Init@StandAlone@@SI?AW4__orxSTATUS_t@@XZ)
    1>StandAlone.obj : error LNK2019: unresolved external symbol __imp_@orxClock_Register@20 referenced in function "public: static enum __orxSTATUS_t __fastcall StandAlone::Init(void)" (?Init@StandAlone@@SI?AW4__orxSTATUS_t@@XZ)
    1>StandAlone.obj : error LNK2019: unresolved external symbol __imp_@orxClock_Create@8 referenced in function "public: static enum __orxSTATUS_t __fastcall StandAlone::Init(void)" (?Init@StandAlone@@SI?AW4__orxSTATUS_t@@XZ)
    1>StandAlone.obj : error LNK2019: unresolved external symbol __imp_@orxObject_CreateFromConfig@4 referenced in function "public: static enum __orxSTATUS_t __fastcall StandAlone::Init(void)" (?Init@StandAlone@@SI?AW4__orxSTATUS_t@@XZ)
    1>StandAlone.obj : error LNK2019: unresolved external symbol __imp_@orxConfig_Load@4 referenced in function "public: static enum __orxSTATUS_t __fastcall StandAlone::Init(void)" (?Init@StandAlone@@SI?AW4__orxSTATUS_t@@XZ)
    1>StandAlone.obj : error LNK2019: unresolved external symbol __imp_@orxViewport_CreateFromConfig@4 referenced in function "public: static enum __orxSTATUS_t __fastcall StandAlone::Init(void)" (?Init@StandAlone@@SI?AW4__orxSTATUS_t@@XZ)
    1>StandAlone.obj : error LNK2019: unresolved external symbol __imp_@orxObject_GetName@4 referenced in function "public: static struct __orxOBJECT_t * __fastcall StandAlone::GetObjectByName(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?GetObjectByName@StandAlone@@SIPAU__orxOBJECT_t@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
    1>StandAlone.obj : error LNK2019: unresolved external symbol __imp_@orxStructure_GetNext@4 referenced in function "public: static struct __orxOBJECT_t * __fastcall StandAlone::GetObjectByName(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?GetObjectByName@StandAlone@@SIPAU__orxOBJECT_t@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
    1>StandAlone.obj : error LNK2019: unresolved external symbol __imp_@orxStructure_GetFirst@4 referenced in function "public: static struct __orxOBJECT_t * __fastcall StandAlone::GetObjectByName(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?GetObjectByName@StandAlone@@SIPAU__orxOBJECT_t@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
    1>StandAlone.obj : error LNK2019: unresolved external symbol __imp_@orxObject_Delete@4 referenced in function "public: static enum __orxSTATUS_t __fastcall StandAlone::EventHandler(struct __orxEVENT_t const *)" (?EventHandler@StandAlone@@SI?AW4__orxSTATUS_t@@PBU__orxEVENT_t@@@Z)
    1>StandAlone.obj : error LNK2019: unresolved external symbol __imp_@orxObject_Pick@4 referenced in function "public: static enum __orxSTATUS_t __fastcall StandAlone::EventHandler(struct __orxEVENT_t const *)" (?EventHandler@StandAlone@@SI?AW4__orxSTATUS_t@@PBU__orxEVENT_t@@@Z)
    1>StandAlone.obj : error LNK2019: unresolved external symbol __imp_@orxObject_SetPosition@8 referenced in function "public: static enum __orxSTATUS_t __fastcall StandAlone::EventHandler(struct __orxEVENT_t const *)" (?EventHandler@StandAlone@@SI?AW4__orxSTATUS_t@@PBU__orxEVENT_t@@@Z)
    1>StandAlone.obj : error LNK2019: unresolved external symbol __imp_@orxInput_IsActive@4 referenced in function "public: static enum __orxSTATUS_t __fastcall StandAlone::EventHandler(struct __orxEVENT_t const *)" (?EventHandler@StandAlone@@SI?AW4__orxSTATUS_t@@PBU__orxEVENT_t@@@Z)
    1>StandAlone.obj : error LNK2019: unresolved external symbol __imp_@orxRender_GetWorldPosition@8 referenced in function "public: static struct __orxVECTOR_t __fastcall StandAlone::GetMouseWorldPosition(void)" (?GetMouseWorldPosition@StandAlone@@SI?AU__orxVECTOR_t@@XZ)
    1>StandAlone.obj : error LNK2019: unresolved external symbol __imp_@orxMouse_GetPosition@4 referenced in function "public: static struct __orxVECTOR_t __fastcall StandAlone::GetMouseWorldPosition(void)" (?GetMouseWorldPosition@StandAlone@@SI?AU__orxVECTOR_t@@XZ)
    1>F:VS2008ProjectsB0UNCEORXVC08Solution..inB0UNCEORX_d.exe : fatal error LNK1120: 34 unresolved externals
    

    In summary, this is what I've done:
    Compiled SVN version [Static Debug]
    Changed the include map and library map from orkinclude/bin to F:SVNmapetcinclude/bin

    Building works fine with the new includes, he can find the .lib file (or it'd crash on 'can't find orxd.lib'), but linking gives above errors.








    EDIT: Oh, i think I may know what I've done wrong. Still, I'm confused. What thing am I supposed to use..
  • edited May 2012
    Try the 'dynamic embedded debug' build, should give you a DLL as well as the lib etc.

    Fingers crossed :D
  • edited May 2012
    Yeah, I was somewhat confused which build config did what. Sec :)
    EDIT: Yeah, right, okay. I now have the wrong DLL in my dir, but that's solvable XD

    EDIT2: it's definetly grabbing the right IMG file. Could it be that it doesn't support interlaced pngs? or something?

    EDIT3: yup, switched the PNG with a non-interlaced version and it gives no errors. I still don't SEE anything, but that's a different problem :)

    EDIT4: Yay, I see my little tank-mushroom thingy, and it's animated too.
  • edited May 2012
    I see that I'm a few edits late! :)

    So yep, as mentioned in the other thread, orx is using SOIL/stb_image for image loading and they don't support interlaced PNG, sorry.
    But heh we're not planning on doing old loading screens 8bit style, aren't we? :)
Sign In or Register to comment.