Error while executing my compiled vaders.exe
Home › Forums › TimelineFX Module › Error while executing my compiled vaders.exe
- This topic has 18 replies, 2 voices, and was last updated 15 years, 5 months ago by imported_peterigz.
-
AuthorPosts
-
July 12, 2009 at 11:21 am #3083
thomashaaksParticipantI downloaded all your module stuff (rigz and the extra modules) to be on the safe side 😉
I built all the modules which works fine without any error.Then I loaded vaders.bmx into BLIde and created a debug version.
It dies on startup with this error message:
Unhandled Exception:Attempt to access field or method of Null object
It dies in line 66 of singlesurface.bmx:
Local xDelta:Float = t.Image.Width / Pow2Size(t.image.width)
The debug log output is:
DebugLog:added file Smoke1.png from archive
DebugLog:added file Flare2.png from archive
DebugLog:added file BlastWave4.png from archive
DebugLog:added file Glow1.png from archive
DebugLog:added file vaderbullet.tpa from archive
DebugLog:added file DarkerWispySmoke1.png from archive
DebugLog:added file ElectricGroup1.png from archive
DebugLog:added file p.png from archive
DebugLog:added file Spark1.png from archive
DebugLog:added file playerbullet.tpa from archive
DebugLog:added file title.png from archive
DebugLog:added file fire7.png from archive
DebugLog:added file Boilingsmoke3.tpa from archive
DebugLog:added file fireburstcontinuous2.tpa from archive
DebugLog:added file DATA.XML from archive
DebugLog:added file ICONS from archive
Does that help?
July 12, 2009 at 12:31 pm #3356
imported_peterigzParticipantDoes it work ok when you download it and just run the exe?
It’s loading the effects file ok so it must be struggling to load one of the graphics files. Are all of these present and correct in the folder:
background.png
player.png
saucer.png
vader.png
vader2.png
vader3.pngJuly 12, 2009 at 1:10 pm #3357
imported_peterigzParticipantActually my guess is it’s not extracting from the .eff file properly for some reason. I’ve attached a new timelinefx.bmx file if you want to overwrite your one. This will put some more useful info to the debuglog and stop running the program in more elegant fashion. Just overwrite timelinefx.bmx and recompile it.
Thanks!
July 12, 2009 at 5:57 pm #3358
thomashaaksParticipantHmm,
still not working…
Building executable...
Compiling:Vaders.bmx
flat assembler version 1.67.36 (1572863 kilobytes memory)
3 passes, 88162 bytes.
Linking:Vaders.debug.exe
RUNTIME ERROR:Attempt to access field or method of Null object
The debug log didn’t change very much (if at all):
DebugLog:added file Smoke1.png from archive
DebugLog:added file Flare2.png from archive
DebugLog:added file BlastWave4.png from archive
DebugLog:added file Glow1.png from archive
DebugLog:added file vaderbullet.tpa from archive
DebugLog:added file DarkerWispySmoke1.png from archive
DebugLog:added file ElectricGroup1.png from archive
DebugLog:added file p.png from archive
DebugLog:added file Spark1.png from archive
DebugLog:added file playerbullet.tpa from archive
DebugLog:added file title.png from archive
DebugLog:added file fire7.png from archive
DebugLog:added file Boilingsmoke3.tpa from archive
DebugLog:added file fireburstcontinuous2.tpa from archive
DebugLog:added file DATA.XML from archive
DebugLog:added file ICONS from archive
And the error occurs in the same line 66 in singlesurface.bmx.
I attached the stacktrace as a text file and a screenshot from BLIde with the exception…
The original vaders.exe from the zip file runs perfect of course 😉
Edit: attached a zip file containing the screenshot and the stack trace…
July 12, 2009 at 6:46 pm #3359
imported_peterigzParticipantok, so that eliminates it not extracting from the .eff file as “url” is not null, so it’s a problem with LoadImage not being able to load the stream properly. So the question is, what’s the difference between our PCs hehe.
Lets get back to basics, try running this code:
SuperStrict
Framework brl.max2d
Import gman.zipengine
Import brl.pixmap
Import brl.pngloader
Local zip:ZipWriter = New ZipWriter
zip.OpenZip("test.zip", False)
Local pixmap:TPixmap = CreatePixmap(32, 32, PF_RGBA8888)
pixmap.WritePixel(1, 1, $FFFFFFFF)
SavePixmapPNG(pixmap, "test.png")
'add the png to the zip
zip.AddFile("test.png")
zip.CloseZip()
'try and load them both back in again
Local ZipR:ZipReader = New ZipReader
ZipR.OpenZip("test.zip")
If Not ZipR RuntimeError "Couldn't open Zip file!"
Local tempstream:TStream = ZipR.ExtractFile("test.png")
If tempstream
DebugLog "Trying to load test.png"
Local image:TImage = LoadImage(tempstream)
If image
DebugLog "Image loaded ok!"
Else
DebugLog "Failed to load image!"
End If
Else
DebugLog "Failed to extract file!"
End If
tempstream.Close
ZipR.CloseZip()
End
That will simply create png file, add it to a zip file, extract it and try and load it, so if all works well then you should get an “Image loaded ok” message.
July 12, 2009 at 6:55 pm #3360
thomashaaksParticipantThat’s working okay 🙄
DebugLog:added file test.png from archive
DebugLog:Trying to load test.png
DebugLog:Image loaded ok!
Edit: Just gave the tlParticleManager.bmx from rigz.mod/timelinefx.mod/doc a try: That’s also working fine!
So my guess is the vaders “effects.eff” or…something else 😕
July 12, 2009 at 7:17 pm #3361
imported_peterigzParticipantok, we’re getting somewhere 🙂
Does the vaders.eff file load into the editor?
July 12, 2009 at 7:20 pm #3362
thomashaaksParticipantYes, it’s loading fine and every effect is running in the preview.
July 12, 2009 at 7:35 pm #3363
imported_peterigzParticipantahh, I think I just recreated it by building in threaded mode. Are you building in threaded mode?
July 12, 2009 at 7:46 pm #3364
thomashaaksParticipantNot intentionally 😕
How can I find out? I’m simply using the BLIde menu “Modules->Build all modules” and the checkmark “Build threaded” is not set.
How can I find out if the normal build (F5) is done threaded?
I remember that at one time after debugging I had singlesurface.bmx open as active file, hit F5 and the debug window said something like “building threaded version”…
July 12, 2009 at 7:57 pm #3365
imported_peterigzParticipantThats ok, I think Blide always builds a normal and threaded version when it compiles a module. It does it with me too.
If I build vaders or the tlParticleManager example in threaded mode then I get that exact same error, so it’s very odd that you get it for vaders, but not the example… hmmm.
In Blide if you go to Building -> Compiler Options then you can see there if you’re compiling stuff in threaded mode.
July 12, 2009 at 8:13 pm #3366
imported_peterigzParticipantok, the plot thickens, I just switched off threaded mode and tried to compile again but it still does it… will investigate, but at least I have the same problem here now, should be easier to find out exactly what’s going on…
July 12, 2009 at 8:15 pm #3367
thomashaaksParticipantOkay, I’m not building in threaded mode. Only debug build and quick build are on. Didn’t make a difference when I switched quick build off.
That’s an annoying bug 👿
I’m using BlitzMax 1.33 btw. on Windows XP with all Servicepacks installed.
Does the assembler source of my compiled Vaders help? I attached it anyway.
Edit: Of course I forgot to attach the file 😳
July 12, 2009 at 9:31 pm #3368
imported_peterigzParticipantI just uploaded a new version of the module, if you delete rigz.mod and just replace it with the new one and give it a try. There should be no need to recompile the modules as they’re already pre-compiled.
Very bizzarre bug. I fixed it on mine by putting:
If TStream(url)
TStream(url).Seek(0)
End If
just before it loads the image in singlesurface.bmx and this fixed it. But, then I remmed it out and tried again and it still worked – even in threaded mode. Just weird 😯
Any I left it in so give it go and lets see if it works.
July 13, 2009 at 6:53 am #3369
thomashaaksParticipantNope. Still not working. Now I get a dialog box that says:
Not a valid effects library.
It stops in line 443 of vaders.bmx after loading the effects library which seems to return null so effectsLib in line 443 is null and causing an error. -
AuthorPosts
You must be logged in to reply to this topic.