SASM.dll error when running SX-Key in Windows Vista x64
Hi eveyone,
I know I posted about this problem a few months ago, but I didn't have the time to get back to the post, and I can't find it now.
I have switched to Windows Vista Ultimate x64, but whenever I try to compile code with the SX-key software, I get the followind error "SASM.dll has stopped working". If I debug with Visual studio 2005, I get the·following error: "Unhandled exception at 0x00403691 in SASM.dll: 0xC0000005: Access violation writing location 0x06996680.". After this, the SX-Key application informs me that an error occurred and that "SASM was unable to create the .SYM file".
Any ideas on how to fix this? I cannot use my SX-tech board and SX-key without the software.
Sincerely,
Alex G.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Fear not that your project does not work, for it will,
Fear not if you see·a long dark path ahead, but follow it,
Fear not if what worked now refuses to,
For the only thing that's perfect is imperfection.
I know I posted about this problem a few months ago, but I didn't have the time to get back to the post, and I can't find it now.
I have switched to Windows Vista Ultimate x64, but whenever I try to compile code with the SX-key software, I get the followind error "SASM.dll has stopped working". If I debug with Visual studio 2005, I get the·following error: "Unhandled exception at 0x00403691 in SASM.dll: 0xC0000005: Access violation writing location 0x06996680.". After this, the SX-Key application informs me that an error occurred and that "SASM was unable to create the .SYM file".
Any ideas on how to fix this? I cannot use my SX-tech board and SX-key without the software.
Sincerely,
Alex G.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Fear not that your project does not work, for it will,
Fear not if you see·a long dark path ahead, but follow it,
Fear not if what worked now refuses to,
For the only thing that's perfect is imperfection.
Comments
There are two possibilities off the top of my head. The first is that there may be a privilege problem where SASM is trying to write the output file into a directory that you're not set up to access. If you're running as administrator, this is not the case. The second is that there is some heretofore unseen SASM bug (writing or reading past an allocated or static piece of memory most likely) that doesn't cause an exception under 32 bit Windows.
If the problem is the first one I suggested, then un-checking the 'SASM files to "SASM Output" dir.' will likely solve that. It's worth a shot regardless. If the problem is the second one, then the only solution is for Parallax to loan me (assuming they have one) a machine with a 64 bit proc and 64 bit Windows so I can debug SASM in the environment that's causing the problem.
Does 64 bit Vista have some sort of "32 bit compatibility mode" that be applied for problem apps?
Thanks,
PeterM
I've checked to see that I have ownership of both my project folder and the SASM and SASM Output folders. Unchecking 'SASM files to "SASM Output" dir.' does not fix the problem, even if I am running the SX-Key software with elevated privileges.
Windows Vista x64 does not have a 32-bit compatibility mode. Any 32 bit apps are ran through the WOW64 emulator. Since I have a 64-bit PC and OS, i was wondering if there is anything I could do, although i am completely inexperienced with instruction-level debugging.
Thanks,
Alex G.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Fear not that your project does not work, for it will,
Fear not if you see·a long dark path ahead, but follow it,
Fear not if what worked now refuses to,
For the only thing that's perfect is imperfection.
or... for grins... you can read this article from C-NET...
http://www.news.com/8301-10784_3-9785337-7.html?tag=nefd.only
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There's nothing like a new idea and a warm soldering iron.
www.dansdata.com/askdan00001.htm
I'm curious, Alex, why are you using 64 bit Windows? What's the advantage to you?
Regarding any help on your end, you'd really need the full SASM source code to do anything useful.
Thanks,
PeterM
Thanks for the advice, but I understand I need a Windows XP license, which I don't have. Anyway, I'll give it a·try.
Peter,
There are a few reasons for using Vista x64.
First, all the background tasks, such as superfetch, defragmenting, automatic updates, packet decoding for the network controller, etc are handled in 64-bit mode, wich makes them a little bit faster, so fewer processor cycles are needed. This also saves me a lot of cycles when it comes to parity calculation for my RAID 5 array. My Athlon 64 X2 3800+ would easily reach 100% load under 32-bit Vista, but under Vista x64, it hardly ever does it, even when running single-threaded audio video encoding apps.
Second, I want to go 4GB in the near future, and I would not be able to do so with a 32-bit OS.
Third, I'm working on some algorythms that use 64-bit floating point math. While they are not very complex at the time, I would not want to run the calculations in 32-bit mode.
Besides that, there is no real advantage to running 64-bit Vista, and I haven't seen any noticeable performance increase or decrease for 32-bit apps compared to the 32-bit edition of Vista. I've read the article you linked, but I haven't had any of the problems described. The only problem was lack of drivers at the beginning, but that·applied to the 32-bit Vista as well.
Thanks,
Alex G.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Fear not that your project does not work, for it will,
Fear not if you see·a long dark path ahead, but follow it,
Fear not if what worked now refuses to,
For the only thing that's perfect is imperfection.
SX-Key runs fine on·a fresh installation of Vista, but ceases to work after instaling the Microsoft Visual Studio 2005 redistributable, or any application that uses it.
Could this mean there is a conflict between SASM and the Visual Studio Libraries?
Sincerely,
Alex G.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Fear not that your project does not work, for it will,
Fear not if you see·a long dark path ahead, but follow it,
Fear not if what worked now refuses to,
For the only thing that's perfect is imperfection.
It certainly seems to indicate that Visual Studio installs something (most likely a DLL) that affects the way Vista 64 works, and causes a problem with SASM. I'm sorry to say this makes trying to fix the problem even less likely to happen since it means I (or Parallax) would need to buy a 64 bit PC, Vista 64, and Visual Studio to reproduce the problem. Never say never, but don't be too surprised if this is a low priority fix.
Thanks,
PeterM
It is not Visual Studio that installs those DLL's. Any application that was developed with Visual Studio requires the Visual Studio 2005 redistributable installes. I have several applications that I use that will install the redistributable package (without installing Visual Studio). It·seems to be·the installation of this package that causes SASM to fail. But I have found the problem to be more complex than that. If, for example, I install Microchip's MPLAB and MCC18 compiler, I will get the same error with SASM. MPLAB uses Visual Studio .NET DLL's, which are·not the same as those needed for·Visual Studio 2005 apps. Pretty much any application that I install on Vista will cause SASM to stop working.
If you look at the disassembly view, you can see that the problem most likely occurs when accesing a null pointer. I still suspect a bug in the SASM code. I believe that, at some pont in the code, the assumption is made that two variables are aligned. This may be true on 32-bit systems, but not necessarily on 64-bit ones. Of course, not having the code, I can only guess.
As for a 64-bit computer, any Athlon 64 or Core 2 Duo processor will run a 64-bit OS. Concerning the 64-bit Vista, Microsoft will provide a 64-bit Vista DVD to anyone owning a Vista license (be it 32 or 64 bit) for only $15. So, if Parallax has any of the above, this shouldn't represent a problem.
If not... well, then I can only assume that SX-Key is for old computers.·I would try and find the problem myself had I had the source code, but I know that is very unlikely to happen. So,·my only solution for the moment is to stop my SX development.
I've invested quite a bit in·my SX development hardware.
Sincerely,
Alex G.
No, the IDE isn't just for "old computers". You can run it on the shiniest new computers around. It's just not guaranteed to run under 64 bit Vista. The download area clearly states XP/2000 and doesn't say anything about 64 bit Vista. I appreciate that you are interested in venturing forward into the world of 64 bit computing, but the SX-Key IDE is not yet guaranteed to run in that world yet.
How many millions of copies of XP and 2000 are running today versus 64 Bit Windows? It's your choice to pioneer, so you shouldn't be too surprised when you encounter Indians. It's not that I am not interested in helping you. It's simply that I don't have a 64 bit machine with a 64 bit OS to develop on. If I get a system like this, I'll fix the problem. Until then, I recommend using your previous machine with a 32 bit OS to do SX work. I'm assuming that the 64 bit machine isn't the first computer you bought, so the previous one is likely sitting somewhere. Don't you have a laptop? Develop for the SX on that.
You have options, but are currently choosing the path of most resistance. Make things easier for yourself and use the OS that is recommended until such time as 64 bit Vista is supported.
Thanks,
PeterM
It seems that by not guaranteeing the IDE under 64-bit Vista, is the same as not guaranteeing it for new computers. Here's my reasoning: All new computers come with Windows Vista preinstaleld. Also for powerfull PC's such as mine, 4 GB of system memory is a must-have. Of course, this requires a 64-bit OS. Denying us the right to use a 64-bit OS is like denying us the right to use 4 GB·of RAM or more. This is the same as saying, do not run SASM on high performance computers. That's what the "shiniest new computers are", and they will require a 64-bit OS to unleash their full potential.
No, I do not have any other machine. I've custom built my computer to last. Whatever piece of junk I had before it has long hit the junkyard. As for a laptop, I do have one, but with no RS232 port. You'd just love to have me buy one of those USB to serial converters. No Peter, I will not invest any more money in·my SX kit with this situation. So, what are my options? Spend $200 on a Windows XP license?
Oh yes, I venture into the high-tech a lot. I meet all sorts of natives, barbarians, and nomads. And yet they all come out of my way, and I am able to continue my journey. Only one stubborn barbarian tribe still opposes me, SASM. By the way, my computer is relatively old (soon to reach two and half years). Just imagine those systems with 8 GB of RAM. What would their owners say if they tried to run SASM ? Are they also pioneers, simply for having fast systems? I know that the fraction of such computers is so small, that it doesn't really matter, but I just happen to be that computer fanatic that also likes to build electronic systems and use microcontrollers, and happened to come across the SX chip. You're excluding me from your customer base.
And how old are the computer at Parallax? Four, five years old? Then I understand why no 64-bit system is available. I haven't seen a system newer than 3 years not 64-bit capable. And definitely, any off-the-shelf system that runs 32-bit Vista is also capable of running its 64-bit counterpart.
Also, did you know that most applications that fail to run on a new OS do so because of simple coding bugs? I can't give you advice, I have some experience yet not a·degree in programming, but I have an application that doesn't work.
Peter, I appreciate your help, but there is no way I can get SASM running and the SX-Key programming without at least an extra purchase. I just can't do that at the moment. What's easier, downloading a bugfix, or·installing the apps on·another computer (the laptop)·and·buying and installing a USB-to-serial converter?·I have tried the path of least resistance. I guess the next logic step would be to stop using SASM, and convert all my code to the old syntax.
Sincerely,
Alex G.
It is my understanding that Vista apps. Visual Studio included should be backward compatible. If SASM doesn't work but it works fine on the older platforms you may want to point this out to Micro$oft support as there will likely be other apps out there that won't either. This is one reason why I'm usually slow to upgrade my software. My rule of thumb is never buy anything from Micro$oft until the second or third release unless you want to be a beta tester. I finally upgraded from 98 to XP about a year ago!
Best,
Jim W.
I am experiencing a similar SASM.dll hanging problem. I am running Vista 32bit, but I just noticed that it only happens with one of my source files - others assemble fine. I took that same source file and tried assembling it on a machine running XP and I get the same sasm failure. My problem is definitely related to source code - maybe yours is too ?
I just found my problem, I had a 'set' instruction instead of a setb instruction. As soon as sasm.dll found set - it hung.
Hope this helps.
You are entirely right. The problem was with the source code. I know the code assembled earlier, but then suddenly stopped working. I had this line of code:
And·I changed it to
I don't know why, but this works. I didn't do any other modification to the source code. It seems that including a file on that specific line causes SASM to crash (line number is 140).
I wonder why this happened.
Thanks a million for your help!!!
Alex G.
Can you please post the smallest code that will assemble without modification which demonstrates the problem with "set" instead of "setb" ?· I would like to find out what is going on.·
Thanks,
PeterM
I started with a shell program that only had some device directives, equates and a reset. It had one instruction "set test_var" where test_var had been equated to rb.
Program 1
device SX28,turbo,OSCHS1,stackx,optionx
IRC_CAL IRC_SLOW
freq 10000000
reset start
test_var equ rb.4
start
set test_var
end
I also found I get the same crash with nothing but the "set test_var". ie. no directives, equates or reset.
Program 2
set test_var
Both of these "programs" 'hang' sasm.dll
Jeff
Post Edited (Southpaw) : 11/12/2007 1:47:34 AM GMT
Now that's some helpful source code to test. There are few things nicer than a single line source file that demonstrates the problem. As it turns out, "set" is a real keyword, albeit one folks aren't really familiar with. It is the exact same as the "=" symbol, and is used to assign or re-assign values to an assemble time variable. It's mentioned on page 46 of the SX-Key 2.0 manual.
So, given that it's legit code, SASM proceeds to try and assemble it. It finds a variable and then realize that there is nothing to set the variable to and it returns an error. Unfortunately, whomever originally wrote SASM didn't bother to check the return value of the function call that located the error and proceeded to use a NULL pointer. Ka-boom!
Like many problems, it's a one line fix. The trick is to try and figure out the what line needs to be added, subtracted, or modified. I now have a fix for the problem and SASM properly handles the error and tells the user about it without crashing. I just need to get together with Parallax to get the new SASM DLL distributed on the website.
Thanks,
PeterM
I wondered if SET was a reserved word, but my (not-so) trusty manual version 1.1 doesn't have any reference to it and I'm generally too lazy to open the 2.0 pdf.
Thanks for the fix. It should save others from some aggravation!
Jeff