Yes. I stepped into the lines that load up the images and there are no
exceptions there. The counters just show up blank. I can move the
blank counters around on the map though.
Hmm. That’s vexing.
There is another problem I saw with the build I made. It crashes at the
end whenever I close up the app. Maybe the crash won’t happen with a
build made with MinGW.
I suspect that’s due to the fact that I’m calling glutDestroyWindow when
the View is destroyed, but that something in GLUT has already called that
when you close the demo. That’s my guess, at least.
Can you look at a core dump to see where it’s crashing?
On my W7 game machine, I can see the counters with the same binary. So the counters are blank only on my netbook. Probably still OpenGL version issue here. Maybe that also explains the crash as well.
On my W7 game machine, I can see the counters with the same binary. So
the counters are blank only on my netbook. Probably still OpenGL
version issue here. Maybe that also explains the crash as well.
What we need is a backtrace from your laptop for the crash, so we can
see where it’s happening.
What kind of graphics hardware is in your netbook again?
If the program gets to the point of displaying anything at all, then
it’s made it past the check that the OpenGL version is adequate and all
of the extensions we use are supported. I can’t presently think of any
reason why the pieces should be blank but the map tiles ok—they’re
loaded and rendered in almost the same way. Is every piece blank? Could
you post a screenshot?
Weird stuff as I can’t trace really that far back. When it exits, it just starts making calls that don’t seem to come from your code. Here is the entire stack trace taken from Windbg. Vglew is the name of the executable that I built. I just found out that ig4icd32.dll is Intel’s OpenGL dll.
This is the information I needed. The crash is happening in the View
dtor, which calls the dtor of the shared_ptr holding the GLUT window
handle, which in turn calls the delete function for the handle. This
is as I had guessed. I’ll do something to make sure this doesn’t
happen when the handle has already been freed.
The full screenshot exceeds the limit allowed to upload. I can send it to you via email.
Reading off the numbers from the Control Panel, the netbook’s total available graphics memory is 256MB. System video memory is 64MB and shared System memory is 192 MB.
I ran the same binary on my other XP laptop (using ATI Radeon Xpress 200M) that runs OpenGL 1.4.5014 and I could see the counters although the app did crash on exit.
I don’t know how to read the dump unless I have the symbol files
generated with the code compiled. So, I tried to set up your code in a
MS IDE to see if that can be compiled. On my first run, the IDE
generated the following errors for your function pointer translation
lines inside setup_gl_fptrs().
error C2440: ‘=’ : cannot convert from ‘void (__stdcall
*)(GLenum,GLuint)’ to ‘void (__cdecl *)(GLenum,GLuint)’
1> This conversion requires a reinterpret_cast, a C-style cast
or function-style cast
So, I tried to cast your lines in glutil.h and glutil.cpp to something
like this:
This is the information I needed. The crash is happening in the View
dtor, which calls the dtor of the shared_ptr holding the GLUT window
handle, which in turn calls the delete function for the handle. This
is as I had guessed. I’ll do something to make sure this doesn’t
happen when the handle has already been freed.
Thanks for sending the screenshot. I’m glad I asked for it, because I was surprised by what I saw. (I’m attaching a scaled-down version of it here so everyone can see it.)
The order of texture creation for map tiles is from left to right, then bottom to top. Piece textures are created after map tile textures. When I saw the truncated version of the screenshot, where you can see the blank pieces and the blank tiles in the top row, what I thought was happening was that texture memory was running out—the top row and the pieces are the last textures to be loaded—so I expected to see a last non-blank map tile somewhere in the second row from the top toward the right end. But you can see from the full screenshot that the rightmost column of tiles is also blank, so some tiles are failing to get their textures when there’s still a great deal of memory
left for textures.
[attachment=0]blankcounters.jpg[/attachment]
I have a new theory about what we’re seeing here: The blank map tiles and pieces are all and only the textures which are not squares where the width and height are a power of 2. (All of the pieces are 76x76, IIRC. The map tiles in the top row and right column are not square, because the dimensions of the map are not divisible by 512.) Support for non-power-of-two (NPOT) textures was added in OpenGL 2.0; most current hardware supports it, but it’s better not to use it unless it’s necessary, because NPOT textures are slower and can’t be mipmapped (or can’t be mipmapped as well).
I think what we need to do is ensure that all textures are made square and have their dimensions padded out to the next highest power of 2. I’ll do that tomorrow, it should be easy.
Unfortunately, libstdc+±6.dll is missing. After copying this dll from one of your previous packages, running test.exe still generates the Application Error messagebox “The application was unable to start correctly (0xc0000142). Click OK to close the application.”
I think I sort of know why this latest also failed on my 32-bit. The
dll files included in the package are built for 64-bit machines.
Are you sure? I thought that all of the DLLs were 32-bit, as there’s
no 64-bit MinGW compiler in Fedora 14. (There will be both 32- and 64-
bit in Fedora 15.)
Taken from your package, the file size of the glew32.dll is 387kb and glew32mx.dll is 178kb. When I downloaded the latest glew from SourceForge, their respective sizes are 316kb and 224 kb. Anyway, I can’t really test it since I don’t have the libstdc+±6.dll any more and the old links to your previous packages do not work.
Taken from your package, the file size of the glew32.dll is 387kb and
glew32mx.dll is 178kb. When I downloaded the latest glew from
SourceForge, their respective sizes are 316kb and 224 kb. Anyway, I
can’t really test it since I don’t have the libstdc+±6.dll any more
and the old links to your previous packages do not work.
I’m not surprised that DLLs built by different compilers have different
sizes.
The package you submitted on 5/16 can run on my XP 32-bit after I put in your libstdc+±6.dll but the same setup still cannot run on my W7 64-bit. (Note that I did not need to replace the glew32.dll and glew32mx.dll on my XP 32-bit to get it to run.) I don’t have my netbook right now as my wife took it for her trip. My current suspicion is that the libstdc+±6.dll or some other dll may have compatibility issue with W7.
Have spent today catching up on forum news and have read this thread with interest, though it seems to have been sidetracked into implementation language issues rather than the larger design issues.
Various ides follow.
Regards,
Brent
Essentially you are proposing to write a Vassal MkII from the ground up, incorporating all of the hard lessons we have have learned along the way. Modules are not going to be compatible, but presumably we could write some sort of importer that may be able to convert a Vassal MkI module to a Vassal Mk II module. I presume Vassal MkI would be ‘mothballed’ and left as is for people to keep using if they wished.
One of the best things about Java was that it came along just in time so that I did not have to learn C++ However, I would be interested in picking up C++ and taking part in a well organised project to write a new Vassal. C++ has a number of advantages.
Just going over some of your issues you noted in your first post:
Peer-to-peer communication between clients.
Yes, definitely. Rodney started moving in this direction by writing a Vassal Jabber module that would allow Vassal to run on any Jabber Server. I was doing a lot of work on trying to get this working before my break. Building server capabilities into the clients would be a much better solution.
Moving to XML.
We have discussed this before and it is still my strong belief that the impenetrable nature of the build file has saved endless problems for us. Manipulating the build file through the Vassal interface ensures that it is edited correctly and remains consistent. If you allow free-for-all editing of the build file, you will get endless errors edited in that will be difficult to debug. I am not against a move to full XML, but it must include an industrial strength verifier that can detect any errors introduced by hand editing, or generation by non-vASSAL tools. The Vassal definition languange is still going to be immensely complex.
Model-view separation.
Sure, needed without doubt.
Hooks for change-listening scripts.
I understand your proposals here and this sort of facility should definitely be included. This is really the key to the success of the project, a fundamental redesign of how Vassal will provide the services we are after for Game Pieces.
The current trait system is built on the Java Decorator pattern and was developed by Rodney very early on as a demonstration of how to use Decorator. That was many, many years ago and the drawbacks of this system only really became apparent recently as the complexity of modules increased. This was greatly exacerbated by all of the new traits I wrote to extend functionality and add ‘programmability’ while staying constrained to to the Decorator model.
This particular thread has become a bit sidetracked on the issue of language. While important, it is really a side-issue. The big issues/questions that I see (not necessarily in order of importance) are:
Cross-platofrm.
We want to keep supporting as many platforms as we do know.
Implementation language and libraries.
Very much related to 1.
Clean code.
Start clean, keep it that way. Extensive Unit tests, built from the start.
Client/Server/Networking model.
Who ‘owns’ the game. How do you find an existing game and connect to it. What happens if the current ‘server’ goes down.
Easy to create simple modules.
As Joel said, it should be very easy as to create a simple module. Wizards?
Game Piece Implementation.
How to implement the myriad behaviour we have now in something that is easier to use and understand? How do we add additional functionality? Scripting is necessary. Which scripting language? I did a lot of work on Beanshell which makes sense in a Java environment, but less so in another environment.