Page 17 of 19

Posted: Sat Sep 08, 2007 10:02 am
by Noman
Noman wrote:I just updated to the latest SVN navi, and im getting an error :

Unhandled exception at 0x0043fcd8 in TeamEditorDebug.exe: 0xC0000005: Access violation writing location 0x03765020.

navi.cpp (void Navi::update), line 426

Code: Select all

				size_t destx = x * destPixelSize;
				pDest[y*pitch+destx] = naviCache[y*pitch+destx] = B;
				pDest[y*pitch+destx+1] = naviCache[y*pitch+destx+1] = G;
				pDest[y*pitch+destx+2] = naviCache[y*pitch+destx+2] = R;
				pDest[y*pitch+destx+3] = A * fadeMod;
				naviCache[y*pitch+destx+3] = A;
y was 469, x was 0, pitch was 4096 (resolution is 1024x768, so it makes sense)

Any idea what it could be?
I've been debugging a bit. This is what I have so far :
pDest points to the pixelBox's raw data :

Code: Select all

uint8* pDest = static_cast<uint8*>(pixelBox.data);
This pixelbox belongs to the texture of our navi. The texture is created in the size of the desired navi size, not the rounded-up-to-power-of-two size.

I had a look at some sizes :
The texture is created at 800x600, so its size (if not rounded up to a power of two) is 800x600x4 (pixel size) = 1920000 bytes.
I get the crash when y (line number) is 469. The pitch is the rounded up size (1024 in our case) multiplied by the pixel size.
The first time i get the crash is when i try to write to the buffer in position
469*1024*4 = 1921024, which is right after the texture size (1920000).

I think that the texture being created does not get its dimensions rounded up. Does that make sense? Should we be writing to position [y*width*pixelsize+x*pixelsize] rather than [y*roundedupwidth*pixelsize+x*pixelsize] ?

[Edit]
I solved it (i think, it works here). The pDest is rounded up, but the naviCache isnt. So the lines

Code: Select all

				size_t destx = x * destPixelSize;
				pDest[y*pitch+destx] = naviCache[y*pitch+destx] = B; <------------------
				pDest[y*pitch+destx+1] = naviCache[y*pitch+destx+1] = G;
				pDest[y*pitch+destx+2] = naviCache[y*pitch+destx+2] = R;
				pDest[y*pitch+destx+3] = A * fadeMod;
				naviCache[y*pitch+destx+3] = A;
Need to become

Code: Select all

size_t destx = x * destPixelSize;
				pDest[y*pitch+destx] = naviCache[y*destPixelSize*naviWidth+destx] = B;
				pDest[y*pitch+destx+1] = naviCache[y*destPixelSize*naviWidth+destx+1] = G;
				pDest[y*pitch+destx+2] = naviCache[y*destPixelSize*naviWidth+destx+2] = R;
				pDest[y*pitch+destx+3] = A * fadeMod;
				naviCache[y*destPixelSize*naviWidth+destx+3] = A;
Note the change in the naviCache write offset.

That's all for now :)

Posted: Sat Sep 08, 2007 10:39 am
by Noman
Ok. My current issue is with
NaviLibrary::NaviUtilities::decodeURIComponent(std::string strToDecode)

In my javascript code i send a navi message 'Print "HI"\n' (the \n being a real newline).
This is how it looks like in uri-encoded ascii (the parameter to the function):

+ strToDecode "print%20%22HI%22%0A"

The result ends up looking like this :

+ result "print+HI"


The numeric value of the char that shouldve been a space is 11 (0x000B), and the first quotation marks are 43 (0x002B). The second quotation marks and newline are nowhere to be seen.

I might try debugging more into this function and update soon, but im no encoding expert...

[Edit]
This is a really weird one. The same decoding works from one context (i called it just to debug in a sample app) but doesnt work in another one. I debugged and noticed that strtol was returning bogus information. I suspected that from one context there was a null after the characters, and that there wasnt in the other. I turned buffer into a 3 char buffer :

Code: Select all

char buffer[3] = {0, 0, 0};
And all my problems dissapeared. strtol takes a char*, and it needs to be null terminated. Don't know exactly what needs to happen to trigger this problem, but i think this solution does no harm.
[/Edit]

Posted: Sat Sep 08, 2007 6:16 pm
by ajs15822
Noman, I've replied to your bug reports at the new forum.


@everyone:
Hey dudes and dudettes, I ultimately decided to make my own forum for NaviLibrary. Henceforth, please post all discussions of NaviLibrary in the new forum:

http://navi.agelessanime.com/forum/index.php
[Direct Registration]

Thanks! :D

Posted: Sat Sep 08, 2007 6:45 pm
by Noman
ajs - One thread might not be enough for navi, but i think a different forum isnt the solution. That will force everyone to sign up to another site, and check another site forum every time they want to see if anything is new.

Perhaps you should ask for an addons forum? Sinbad would probably agree, and it would be a lot more comfortable for everyone.

Posted: Sat Sep 08, 2007 7:50 pm
by ajs15822
Let's at least give it a test run. :wink:

Posted: Sun Sep 09, 2007 8:18 pm
by pra
why don't you request a subforum in ogre addons? would be better IMHO...

btw, is the ^2 size limit gone for good now? can't test it atm :(

Posted: Sat Sep 22, 2007 11:53 pm
by ajs15822
Howdy yall, just wanted to let yall know that NaviLibrary v1.4 has just been released!

Get the full scoop here.

Posted: Tue Sep 25, 2007 4:39 pm
by zivness
In a post some months ago, AticAtac wrote:

'I made a rollover menu with the background being transparent. You just see the Icons "floating".'

That sounds terribly impressive. Is there a chance of being shown some of the source code for attaining 'floating transparency', from which to learn how to achieve that effect in many contexts?


Thanx

Posted: Tue Sep 25, 2007 5:10 pm
by zivness
Ah, I just saw in a tutorial the answer: use setNaviColorKey...

resize a navi window?

Posted: Fri Oct 05, 2007 11:56 pm
by giantjupiter
Is it possible to resize a navi window?

Shrinked Navi

Posted: Mon Nov 05, 2007 12:24 am
by RedEagle
Hey guys!

I've develloped a little application that renders Navi's onto planes. It renders great in severall PC's. Unfortunatelly in other PC's, (including one that has Vista OS) the Navi isn't rendered in all the plane (it's shrinks the Navi to half a plane :S).
What's happening? Did I forget to install anything?

I would apreciate some help!

Thanks

Posted: Mon Nov 05, 2007 12:30 am
by Kencho
RedEagle, don't double-post.

Posted: Mon Nov 05, 2007 12:37 am
by RedEagle
Oh sorry. I only realised I double posted latter

Posted: Mon Nov 05, 2007 12:40 am
by Kencho
Well, in case that happens again, you have a "delete" button (X) on the top-right corner of your posts. If you're fast enough, you can delete them before someone follows the post ;)

Re: Shrinked Navi

Posted: Mon Nov 05, 2007 2:30 am
by ajs15822
RedEagle wrote:Hey guys!

I've develloped a little application that renders Navi's onto planes. It renders great in severall PC's. Unfortunatelly in other PC's, (including one that has Vista OS) the Navi isn't rendered in all the plane (it's shrinks the Navi to half a plane :S).
What's happening? Did I forget to install anything?

I would apreciate some help!

Thanks
I've just replied to your issue here.

I get RSS feeds from the Navi Forum, so I tend to reply faster there. ;)

Posted: Fri Feb 01, 2008 10:56 pm
by Falagard
I'm attempting to compile LLMozLib from source and link Navi to it.

I am successfully compiling both Mozilla and LLMozLib but when I set up the Navi project to link to these newly compiled libs I'm getting a couple unresolved symbol errors on AppendUTF16toUTF8 and nsCharTraits:

Code: Select all

llmozlib.lib(llembeddedbrowserwindow.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl AppendUTF16toUTF8(wchar_t const *,class nsACString_internal &)" (__imp_?AppendUTF16toUTF8@@YAXPB_WAAVnsACString_internal@@@Z) referenced in function "public: __thiscall NS_ConvertUTF16toUTF8::NS_ConvertUTF16toUTF8(wchar_t const *)" (??0NS_ConvertUTF16toUTF8@@QAE@PB_W@Z)
llmozlib.lib(llembeddedbrowserwindow.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static wchar_t const * const nsCharTraits<wchar_t>::sEmptyBuffer" (__imp_?sEmptyBuffer@?$nsCharTraits@_W@@2PB_WB)
Not sure exactly why this is happening, though I tracked down a few things such as LLMozLib uses MOZILLA_INTERNAL_API which might be a problem. Any ideas where I should look to fix this, and have you hit this problem at all yourself, ajs15822?

Did you need to make any other changes to llmozlib besides the addition of the javascript evaluators?

Posted: Fri Feb 01, 2008 11:51 pm
by ajs15822
Hum, the only modifications I have made to LLMozLib is upgrading it to VC8 and my JS_Eval patch (and also a minor max-window limit removal and fix for a rare bug-- but both of those additions are irrelevant to your problem).

Maybe you're using a different build of LLMozLib/XULRunner-- Navi uses llmozlib_win_src_2006_11_06 + mozilla 1.8.1. To get it to build on VC8, I just followed HiddenBek's instructions.

I've had a lot of requests lately for the exact LLMozLib source + Mozilla XULRunner dependencies that Navi comes pre-compiled with so I decided I would release it for the good of mankind. So here, you get first taste; if you got MSVC8, it should be as simple as opening the solution and hitting build.

P.S., please direct further replies to the more recent NaviLibrary thread. :P

How to use Flash to show video clips

Posted: Sat Jul 26, 2008 10:13 pm
by ywywdh
can you tell us how to use Flash to show video clips step by step?
I have try to understand all topic about Navi flash.But,I didn't konw yet;
Now I hurry to get it,Who can help me ?
please show me the code details;
For example .I want to watch youtube video in the Navi Deom.
thanks.

Re: Navi

Posted: Sat Jul 26, 2008 11:15 pm
by ywywdh
ajs15822 wrote:I am pleased to announce the dawn of 'Navi', an exciting new library for Ogre3D developers.


For support and further discussion of NaviLibrary, please visit our forum.


Visit our Wiki: click here

Demo v1.3: get it here

Video v1.3: watch it here (XVID, 3.5mb)


Screenshots:
Image


Image


Image


Image


The Navi Library:
Interested? Cool, browse our wiki for more information or discuss it in our forum.

Enjoy. :D

Re: Navi

Posted: Sat Jul 26, 2008 11:16 pm
by ywywdh
can you tell us how to use Flash to show video clips step by step?
I have try to understand all topic about Navi flash.But,I didn't konw yet;
Now I hurry to get it,Who can help me ?
please show me the code details;
For example .I want to watch youtube video in the Navi Deom.
thanks.

Re: Navi

Posted: Sat Jul 26, 2008 11:16 pm
by ywywdh
can you tell us how to use Flash to show video clips step by step?
I have try to understand all topic about Navi flash.But,I didn't konw yet;
Now I hurry to get it,Who can help me ?
please show me the code details;
For example .I want to watch youtube video in the Navi Deom.
thanks.

Re: Navi

Posted: Sat Jul 26, 2008 11:22 pm
by ywywdh
ajs15822 wrote:I am pleased to announce the dawn of 'Navi', an exciting new library for Ogre3D developers.


For support and further discussion of NaviLibrary, please visit our forum.


Visit our Wiki: click here

Demo v1.3: get it here

Video v1.3: watch it here (XVID, 3.5mb)


Screenshots:
Image


Image


Image


Image


The Navi Library:
Interested? Cool, browse our wiki for more information or discuss it in our forum.

Enjoy. :D

Can you share this Demo for Us ,Which can suppost flash video and the 3D MerteTextrue?

Posted: Mon Oct 13, 2008 11:07 pm
by gmagno
:? How to build Navi with VC9? I'm having a hard time trying... I'm getting a linking error:


1>Linking...
1>Astral_d.lib(Astral.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::~_Container_base(void)" (__imp_??1_Container_base@std@@QAE@XZ) referenced in function "public: __thiscall std::_Vector_val<class Astral::BrowserWindow *,class std::allocator<class Astral::BrowserWindow *> >::~_Vector_val<class Astral::BrowserWindow *,class std::allocator<class Astral::BrowserWindow *> >(void)" (??1?$_Vector_val@PAVBrowserWindow@Astral@@V?$allocator@PAVBrowserWindow@Astral@@@std@@@std@@QAE@XZ)
1>Astral_d.lib(BrowserWindowImpl.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::~_Container_base(void)" (__imp_??1_Container_base@std@@QAE@XZ)
1>Astral_d.lib(Astral.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base@std@@QBEXXZ) referenced in function "protected: void __thiscall std::vector<class Astral::BrowserWindow *,class std::allocator<class Astral::BrowserWindow *> >::_Tidy(void)" (?_Tidy@?$vector@PAVBrowserWindow@Astral@@V?$allocator@PAVBrowserWindow@Astral@@@std@@@std@@IAEXXZ)
1>Astral_d.lib(BrowserWindowImpl.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base@std@@QBEXXZ)
1>Astral_d.lib(Astral.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::_Container_base(void)" (__imp_??0_Container_base@std@@QAE@XZ) referenced in function "protected: __thiscall std::_Vector_val<class Astral::BrowserWindow *,class std::allocator<class Astral::BrowserWindow *> >::_Vector_val<class Astral::BrowserWindow *,class std::allocator<class Astral::BrowserWindow *> >(class std::allocator<class Astral::BrowserWindow *>)" (??0?$_Vector_val@PAVBrowserWindow@Astral@@V?$allocator@PAVBrowserWindow@Astral@@@std@@@std@@IAE@V?$allocator@PAVBrowserWindow@Astral@@@1@@Z)
1>Astral_d.lib(BrowserWindowImpl.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::_Container_base(void)" (__imp_??0_Container_base@std@@QAE@XZ)


In fact my problem is not building Navi, but building NaviDemo...


Thanks in advance!

Posted: Sun Oct 19, 2008 12:55 pm
by alexdbkim
VERY IMPRESSIVE!!!

Posted: Tue Nov 11, 2008 5:31 pm
by Jedimace1
I would like to build this in VC++ 9. Could you set this up? It seems that it doesn't like the dependencies for VC++ 9.