AxePad crashing when try to open/save a file

Ghostbear

Member
Morning all.

I'm running Axepad on Linux Mint 17 with LinAxepad 1.5.1
I can code and program ok, but if I try to save, or open a file Axepad just crashes out on me.
Fortunately, I can copy and paste code into it so I can at least work for now... But it's a bit of a pita.

Anyone else had the problem, and if so... any suggestions?


Cheers all

Ady
 

hippy

Technical Support
Staff member
I am not familiar with Linux Mint but it should work and I am sure there have been others on the forum who have used Linux Mint in the past.

Can you detail exactly when and how it crashes out; when you click on the Open or Save toolbar button / Open or Save menu option, when you try to select a file, or click 'ok' in the dialogue. Do the dialogues appear or not ?
 

SteveDee

Senior Member
... but if I try to save, or open a file Axepad just crashes out on me...
I guess you don't see any errors, so a good place to start is by opening a terminal and typing the full qualified file path. For example:-

Code:
/home/Ghostbear/picaxe/LinAXEpad
...or whatever your actual path is.

When the program crashes, take a look at the terminal window for any clues.
 

Ghostbear

Member
I am not familiar with Linux Mint but it should work and I am sure there have been others on the forum who have used Linux Mint in the past.

Can you detail exactly when and how it crashes out; when you click on the Open or Save toolbar button / Open or Save menu option, when you try to select a file, or click 'ok' in the dialogue. Do the dialogues appear or not ?

When I click either save/save as in the menu, or on the toolbar, or open/open as menu or toolbar, I get a brief flash of the file browser window then it closes everything
 

Ghostbear

Member
I guess you don't see any errors, so a good place to start is by opening a terminal and typing the full qualified file path. For example:-

Code:
/home/Ghostbear/picaxe/LinAXEpad
...or whatever your actual path is.

When the program crashes, take a look at the terminal window for any clues.
Oddly, I get "Command not found", even if I'm already in the correct directory
 

SteveDee

Senior Member
Oddly, I get "Command not found", even if I'm already in the correct directory

There must be a problem with the path or filename or it needs arguments. How do you run this program at the moment, from a menu?

I don't run Mint but its Debian based, so you should be able to check the menu/shortcut properties to get the right path. Or maybe it has a .desktop file that holds this information.
 

Ghostbear

Member
There must be a problem with the path or filename or it needs arguments. How do you run this program at the moment, from a menu?

I don't run Mint but its Debian based, so you should be able to check the menu/shortcut properties to get the right path. Or maybe it has a .desktop file that holds this information.
I'm using a desktop link.
However, I get the same behaviour even if I run it directly from the folder its in
 

SteveDee

Senior Member
I'm using a desktop link.
However, I get the same behaviour even if I run it directly from the folder its in
I have the LinAXEpad files on my laptop, but they won't run because my OS is x64.

I also get this output in the terminal:-
Code:
steve@steve-X401A1:~/Projects/Picaxe/AxePadLinux$ LinAXEpad
LinAXEpad: command not found
steve@steve-X401A1:~/Projects/Picaxe/AxePadLinux$ ~/Projects/Picaxe/AxePadLinux/LinAXEpad
/home/steve/Projects/Picaxe/AxePadLinux/LinAXEpad: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
steve@steve-X401A1:~/Projects/Picaxe/AxePadLinux$
So although you get "command not found" when in the LinAXEpad folder, I still suggest you use the full path.

I don't know how desktop links work in Mint. In Lubuntu/LXDE a desktop link can be opened (right click > open with text editor) so you can read the execute statement.

I hope this helps.
 

hippy

Technical Support
Staff member
The most common reason for "command not found", when in the directory which contains the executable, is that Linux does not usually look in the current directory first.

In those cases the executable has to be specified as a fully qualified path or an explicit relative path such as ./LinAXEpad
 

kfjl

Member
Morning all.

I'm running Axepad on Linux Mint 17 with LinAxepad 1.5.1
I can code and program ok, but if I try to save, or open a file Axepad just crashes out on me.
Fortunately, I can copy and paste code into it so I can at least work for now... But it's a bit of a pita.

Anyone else had the problem, and if so... any suggestions?


Cheers all

Ady
Try this: sudo apt-get install libgtk2.0-0:i386 libcairo2:i386 libpango1.0-0:i386 libgdk-pixbuf2.0-0:i386 libstdc++6:i386
 

kfjl

Member
I'm stumped then.
I change linux distributions quite often and have been able to make Axepad and the cable work with all of them. I'm currently using Q4OS.
I've had the same problem as you with two or three distributions and it turned out to be because I didn't have libgtk-x11-2.0.so (contained in ia32-libs-gtk) installed.
You can get it from pkgs.org but it's a bit of a pain if you don't have its dependences already installed as you have to install them and eventually their dependances yourself.
The last time I tried to install it using synaptic or apt-get it wasn't available. Maybe it is now.
The command I posted is from xfred a few posts down on this forum and it has worked every time for me. I suppose because the packages contain ia32-libs-gtk and all its dependences.
I didn't need to do the other things he suggests but maybe you do.

Afterthought

In case you don't know; you don't need Axepad to download your programmes to a Picaxe, you can use the command line, like this:

kl@debian:~$ ./linaxepad/compiler_linux/picaxe20x2 -c/dev/ttyUSB0 ~/linaxepad/PicaxeProgs/p2.bas
 
Last edited:

Ghostbear

Member
I guess you don't see any errors, so a good place to start is by opening a terminal and typing the full qualified file path. For example:-

Code:
/home/Ghostbear/picaxe/LinAXEpad
...or whatever your actual path is.

When the program crashes, take a look at the terminal window for any clues.
Ok, having tried it again, I've got it running, but when it crashes I get "Segmentation Fault" in the terminal window
 

SteveDee

Senior Member
...when it crashes I get "Segmentation Fault" in the terminal window
A reported "Segmentation Fault" occurs when a program tries to write to memory (RAM) that cannot be accessed (e.g. access is denied or there is no memory at the particular location). It can be due to a program bug. However, as Mint is a respected distribution, and others say that AxePad works on Linux, there could be something missing or broken on your system.

Its difficult to advise you what to do next. If your distro is fully updated (use your system updater, or do something in the terminal like: sudo apt-get update) and you can't find anything else that looks wrong, you could try getting "a second opinion". By this I mean download a live distribution, create a disk and boot from it (but don't install it to your computer), and repeat what you are trying to do.

If you still have the same problem, its probably a program bug. If not, you may need to repair or rebuild your system.
 

kfjl

Member
I have the LinAXEpad files on my laptop, but they won't run because my OS is x64.

I also get this output in the terminal:-
Code:
steve@steve-X401A1:~/Projects/Picaxe/AxePadLinux$ LinAXEpad
LinAXEpad: command not found
steve@steve-X401A1:~/Projects/Picaxe/AxePadLinux$ ~/Projects/Picaxe/AxePadLinux/LinAXEpad
/home/steve/Projects/Picaxe/AxePadLinux/LinAXEpad: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
steve@steve-X401A1:~/Projects/Picaxe/AxePadLinux$
So although you get "command not found" when in the LinAXEpad folder, I still suggest you use the full path.

I don't know how desktop links work in Mint. In Lubuntu/LXDE a desktop link can be opened (right click > open with text editor) so you can read the execute statement.

I hope this helps.
Axepad will run on a 64 bit distro if you have the 32 bit libraries installed. You don't. (libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory)
Try: ./LinAXEpad (dot slash LinAXEpad) after installing the 32 bit libraries. Or double-click on the Axepad icon.
 
Last edited:

Ghostbear

Member
Linux ady-BB-53004B 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:31:42 UTC 2014 i686 athlon i686 GNU/Linux


Already running 32 bit distro, so I wouldn't have throught that would bit it as it's also running the 32 bit libraris - Same on my Laptop as well
 

kfjl

Member
Sorry, I didn't make it clear my last post was addressed to SteveDee.

I was hoping he'd try xfred's solution in his 64 bit distro and let us know if it works. I'm beginning to wonder if something has been changed in the 32 bit libraries.....

Failing that, I'd take his advice and get a "second opinion".
 

Ghostbear

Member
Ah, fairy fluff :)

Still, even though I can save/open, I can copy & paste from a text editor into it and use every other feature, so it's not entirely the end of the world.... :)

Cheers for the helps :)
 

SteveDee

Senior Member
Axepad will run on a 64 bit distro if you have the 32 bit libraries installed...
Well, I wasn't actually complaining that it didn't work on x64, it was just an example (I've been happy up to now just using gEdit on a RaspberryPi to create and edit Picaxe code).

But since you ask, yes, adding just the 32bit libraries to my Lubuntu 15.10 x64 system does work and I can run LinAXEpad.

I also have a laptop running Ubuntu Mate 15.10 x86 system and LinAXEpad works fine on this as well (...at least opening, editing and saving small, 50 line programs).

I hope this helps.
 

kfjl

Member
@SteveDee

Thanks for the reply. So LinAXEpad and the 32bit libraries are OK.

@Ghostbear

Still stumped.
Good luck!
Over and out.
 

SteveDee

Senior Member
...so LinAXEpad and the 32bit libraries are OK...
Having tested LinAXEpad last week (...did I mention I never use it?), today I tried to compile a file using the "fanoush" method on a RaspberryPi ready to download to a 08M2, but got the dreaded "Control M" error.

Long-story-short, it looks like LinAXEpad saves files in the Windows format (i.e. CR+LF line endings). Maybe this doesn't matter if you use LinAXEpad for the full edit/compile/download experience, I wouldn't know. But in my case it was a problem.

The simple solution (for me) was to re-open the source file in gEdit, select Save As.. and then select Line Ending: Unix/Linux
 

nodice

New Member
I can confirm the segmentation fault behavior using Linux Mint 17.3. Looks like I have those 32-bit libraries:

$nsudo apt-get install libgtk2.0-0:i386 libcairo2:i386 libpango1.0-0:i386 libgdk-pixbuf2.0-0:i386 libstdc++6:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
libcairo2:i386 is already the newest version.
libgdk-pixbuf2.0-0:i386 is already the newest version.
libgtk2.0-0:i386 is already the newest version.
libpango1.0-0:i386 is already the newest version.
libstdc++6:i386 is already the newest version.
 

nodice

New Member
Maybe this is a clue:

I've successfully downloaded a program to a 08M2. However, with the cable attached, if I open linaxepad and click the "Firmware" button under File->Options->Mode, I get a "Firmware Check Error" that says "Hardware not found on /dev/ttyUSB0!".

I tried running linaxepad with sudo, and I get this output at the terminal:
(LinAXEpad:3077): IBUS-WARNING **: The owner of /home/nodice/.config/ibus/bus is not root!

Clicking the Firmware button gives the same error.
 

Jeremy Harris

Senior Member
I have the same problem as this, Linux Mint 17.3, 64 bit, AXEpad crashes when trying to save a file, or sometimes when trying something else, like a cut and paste. I've tried all the fixes suggested here, to no avail. Right now the only way I can code with this machine is to write code in Gedit, save it with a .bas filename, open it in AXEpad, check the syntax etc, programme a Picaxe, then close AXEpad, open the file in Gedit to edit it etc, etc.

I'm far from being a Linux guru, but have been running Mint for a couple of years on two machines, one of which is my everyday browsing the web laptop. I only use Windows on an older PC in my study, which happens to be the one I used to use to write Picaxe code on before I moved my "workshop" bench to a nice new workshop!.

I've switched to using this 64 bit Linux machine in the workshop as it has real hardware serial and parallel ports (the latter very useful for driving my little bench top router) and programming Picaxe chips via a real serial port in Linux seems to be a fair bit quicker than using the AXE027 plugged in to the Windows machine in my study.

If anyone has a foolproof way to stop AXEpad crashing, then I'd be very grateful indeed, as it does get a bit frustrating if it crashes just after I've edited some code in it and before I've managed a successful cut and paste to Gedit.

FWIW, if I open AXEpad from a command window then when it crashes it reports the same as mentioned above "Segmentation fault"
 

Jeremy Harris

Senior Member
Sorry for bumping this, but I could now really use a fix, as my only Windows machine has just packed up. I've got to programme around 8 Picaxe chips over the next week, and the continuing issue of Axepad crashing whenever a file is saved will make this a very frustrating chore!

Any chance of a fix for whatever the bug is that causes this failure?

The work around is to cut and paste the text into gedit, save it as a .bas file, open it in Axepad, programme the chip, close Axepad (before it just crashes), edit the code in gedit, save it, open it in Axepad and repeat. It REALLY makes debugging code a pain, as even opening a terminal window in Axepad can make it just lockup (rather than just close without warning, which is what happens when you try and "save as" a new code version).

I can programme using the command line, but just having full "Picaxe Editor" functionality in Linux would be a tremendous benefit.
 

tmfkam

Senior Member
Far from a "solution", but a possible workaround could be to load the Windows PicAxe editor into a WINE "bottle"? I've had PE5 and PE6 working on my Mac. From the work I remember putting in to getting PE6 to work (it needs the .net framework installing and some other tricks I did note in a thread somewhere on the forum) I'd be tempted to use PE5.

Scrolling the text in PE in a WINE window doesn't work well so I'd avoid that if I were you. Scrolling doesn't seem to work well for other programming editors for me either. Otherwise, it works very well indeed.

With the benefit of the simulation, rather better than AxePad in my view. Yet I still use AxePad for pure coding, only starting PE5 if I want to simulate something.
 

Jeremy Harris

Senior Member
Thanks, I'll admit to not having tried to run PE under WINE, but will give it a go. If PE5 runs OK I'll be a happy bunny, as I far prefer it to PE6 anyway!

Out of curiosity I'd love to understand why Axepad crashes when trying to save a file, though, as it seems to be something others have found as well, so not just something specific to my installation. It doesn't seem hardware related, either, as I've encountered the same problem with three different machines.

If PE5 works within WINE then that's undoubtedly a better solution, particularly as WINE seems to now be a lot better than it used to be - I can even run a simple Windows CAD programme on it now, something that wasn't possible a year or so ago.
 

tmfkam

Senior Member
Yesterday i set up PE5 in a WINE environment. I had to copy mfc40.dll into the Windows/System32 directory and then register Wave32.ocx on the WINE command line, but then it worked very well. I loaded and compiled a large program for the 14M2 to test it. (I got the instructions for the "Wave32" thing from the net, I kept getting an error initially)

I had previously had PE6 working. I tried to start it but it failed. It looked as though I was getting an error message but it was always too large for the screen so I couldn't see the message, it kept checking something as if i clicked the edge of the buttons I could just see, four little 'ticks' would appear, with no explanation as to what they meant, but PE6 wouldn't start. The logs referred to the SyncFusion errors that imply dotnet or gdiplus problems, as I couldn't get dotnet to install, I gave up. I tried for over four hours, created dozens of new WINE environments, but these to failed to install dotnet3.5 so I never progressed further than that. I suspect it may have something to do with the new permissions introduced in the latest Mac OS X as it had been working. I had to install a new X11 window server to get some other previously working WINE environments working under OS X, but PE6 just would not work for me.
 

Jeremy Harris

Senior Member
I trod the same path last night, loaded PE5, got the "wave32.ocx error", manually copied across mfc40.dll into the windows32 system file (in WINE) and then got stuck trying to register it. I'm not 100% familiar with the WINE command line so I need to take some time out and find out how to register a manually transferred dll.

Good to know that PE5 works fine under WINE, though, that will solve all my problems as I migrate away from using Windows altogether.
 

tmfkam

Senior Member
I trod the same path last night, loaded PE5, got the "wave32.ocx error", manually copied across mfc40.dll into the windows32 system file (in WINE) and then got stuck trying to register it. I'm not 100% familiar with the WINE command line so I need to take some time out and find out how to register a manually transferred dll.

Good to know that PE5 works fine under WINE, though, that will solve all my problems as I migrate away from using Windows altogether.
I don't understand the WINE command line either...

I succeeded by 'cheating'. I use WINESkin to create the WINE environments, after I'd created the PE5 environment, I did as possibly you did, by locating the C:\ drive, copying in the mfc40.dll to the Windows\System32 directory. I then opened up the WINESkin for PE5, selecting 'Advanced', then copying and pasting the command: wine regsvr32 "C:\windows\system32\wave32.ocx" as I found on the 'net, into the 'Configuration>Custom Commands' section. I then did a test run which worked. I have since removed this from the custom commands and it is currently still working..

ws.jpg
 

Jeremy Harris

Senior Member
I spent an hour or so yesterday trying to get PE5 to work under WINE, but keep getting stuck with the wave32.ocx problem. I've tried to register the DLL using two different methods and found that the one that actually gives feedback is to do it from the Linux command window, by navigating to the .wine c: drive and then executing regsvr32 from there. It tries, but throws the error message "failed to register DLL". Not sure why.

Actually, whilst typing this I've just realised what might be the reason. It seems probably that this command needs to be executed by a superuser with the privileges to run it. I'll try later using sudo to execute it as a superuser and see if that works.

Once I get it working (assuming I do!), then I will post back here with clear instructions as to how to do it, as I have a feeling that there may well be others who may find being able to run the proper Programme Editor in Linux useful.
 

tmfkam

Senior Member
Not sure if this helps?

The OCX needs registering, Wave32.ocx depends on the mfc40.dll and so won't register without it. If the OCX won't register, it could be that it is already registered. Other things that can prevent the OCX from registering are the OCX isn't where Windows expects to find it (usually Windows\System32 or possibly the main Windows directory) or not being able to locate the regsvr32.dll file.

If all else fails, how about I upload my working WINE environment to a Google Drive or DropBox of your choice? It is 290Mb in size, if you have that storage available?
 

Jeremy Harris

Senior Member
Thanks for the kind offer, but I suspect that the install may well be machine-specific to some extent.

The machine I would like to get PE running on is an industrial-type PC, that has real parallel and serial ports. It's not a high performance machine, just a dual core 64 bit Atom, but is plenty fast enough to run Linux Mint 17.3 very well. I'm still working on getting the registration fix, but I think my problem may well be to do with getting the WINEPREFIX set to 32 bit. I have a 64 bit installation and I have a strong feeling that the problem may be with the WINEPREFIX being 64 bit. Yesterday I tried to change this, but failed, probably because I don't really understand a lot of what I'm trying to do. I'm sure if I keep trying I'll eventually find a way around it; it just seems that there isn't really much interest in Picaxe support on Linux machines, so few seem to have documented how to make things work.
 

tmfkam

Senior Member
There is at least some official support and software for Linux/Mac OS from Revolution Education. Certain other *rival* compilers are really Windows only. I've managed to get some of them working within WINE, but I have had zero success in getting any of the programmers I have available working. For those I have to run VirtualBox. VirtualBox is very good and I can recommend it, sadly you do need a copy of Windows and a valid licence for that copy, assuming you do though, it is highly recommended.
 

tmfkam

Senior Member
Regarding sending you a copy of my WINE environment. I can only speak for the Mac OS, not Linux, but the WINE 'App' is a Bundle, opening the contents of the bundle reveals a directory structure with a 'C:\' drive, complete with both a Windows and Program Files directory. I had naively assumed that it would be possible to copy and paste into the place of your non-working WINE environment.

If you think it is worth a try, let me know.

Bundle.jpg
 

SteveDee

Senior Member
... it just seems that there isn't really much interest in Picaxe support on Linux machines, so few seem to have documented how to make things work.
LinAXEpad does work on [some] Linux distributions.

So two possibilities for you are; 1) use VirtualBox on Mint with a different Linux guest distribution, or 2) replace Mint with a Linux distribution that does work with LinAXEpad.
 

Jeremy Harris

Senior Member
You're probably right, but I am where I am, with five machines running Mint in our household, and I really don't want to have to go through the process of changing them to another OS, given the time invested in weaning some away from Windows. Axepad crashes under Mint, as I and others have reported; there is a file save problem that seems fairly random but does mean that it's very easy to lose work (it programmes Picaxe chips fine, it's only saving files that causes it to crash).

I do have a legit copy of XP, so I could, if push came to shove, load a VM and XP, but that seems to be an admission of defeat, especially when it seems that PE can be made to work within WINE. I have a bit of a stubborn streak, so knowing that it can be made to work is bugging me, in that I can't find a way to get it to work within my WINE environment.
 
Top