Tutorial typo

On this tutorial https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:beginner:hello_material There is a call to mat_lit.setTexture(“DiffuseMap”, assetManager.loadTexture(“Textures/Terrain/Pond/Pond.png”)); but the Pond should be a .jpg.



mat_lit.setTexture(“DiffuseMap”, assetManager.loadTexture(“Textures/Terrain/Pond/Pond.jpg”));



Thanks,

~Jeremy

2 Likes

cool thx, btw on that page, at the top there is a bar “wiki” where you can edit it. As you found it, you get the honors of changing it :slight_smile:

1 Like

oh, that’s where it is. Ok, cool. That’s been fixed!

1 Like

When I tried running the hello_materials tutorial (on jMonkeyPlatform Alpha-4, XP Pro SP3), my app crashed with:



java.exe - Application Error

The instruction at [hex address] referenced memorry at [hex address]. The memory could not be “read”.



After some trial & error, I found that When I manually placed all of the necessary files into my project’s local texture asset folder & updated all of the texture load strings to “Textures/[file name]”, it would run fine.



So here are my questions:



Where exactly were the .png & .jpg files for this tutorial supposed to be? When I searched my drive for them, I only managed to find Monkey.png hanging out in the /com/jm3e/app/ folder of jMonkeyEngine3-sources.zip. AFAIK, my search didn’t pry into any .jar files though. Did I install wrong or leave something important out of my path?



Is there some reason I for not using exception handling when resource loading fails? If not, would it be possible to at least get a more intuitive crash messages?

If java.exe has such an error that is out of our range. How are we supposed to throw an exception when java crashes? Your system/setup is faulty.

About the test assets, theres a big hint (with a lightbulb!) on how to get the test assets into a project.

normen said:
If java.exe has such an error that is out of our range. How are we supposed to throw an exception when java crashes? Your system/setup is faulty.

I'm not trying to lay blame; I've never encountered this sort of behavior from Java before. Whenever I've done any sort of file I/O in the past, I recall Java requiring exception handling just to get things to compile, so this sort of struck me as unexpected. I'm not trying to slam the dev team here or anything like that; everything I've seen of the engine so far is impressive.
normen said:
About the test assets, theres a big hint (with a lightbulb!) on how to get the test assets into a project.

Sure, the source of my confusion is that immediately following the code, the tutorial said "You should see..." so at that point I tried to execute it. Going back through the rest of it, I do see the hint about the texture folder down in the Conclusions section. As wezrule pointed out, I can edit the page with a 'before you get started section' or something - I just wanted to make sure I hadn't missed something before doing so.
jonathan-pikalek said:
I'm not trying to lay blame; I've never encountered this sort of behavior from Java before. Whenever I've done any sort of file I/O in the past, I recall Java requiring exception handling just to get things to compile, so this sort of struck me as unexpected. I'm not trying to slam the dev team here or anything like that; everything I've seen of the engine so far is impressive.

Yep, I was just explaining. When java crashes something bigger is wrong.. Like when your computer crashes instead of just the app :) The tutorials are meant to be done sequentially, the necessary info is in the previous tutorials.

I think the latest version of OpenAL Soft that is bundled with jME3 causes that issue when the application closes. It might be fixed soon…