Closed albug closed 11 years ago
Please open a terminal window and run:
killall spacefm
spacefm
Then create a file or dir in spacefm, and when spacefm exits, check the terminal to see what messages are there - thanks.
Ok. I did it and here is the output from the terminal. I am getting an exception:
(spacefm:15675): Gtk-CRITICAL **: gtk_entry_get_text: assertion `GTK_IS_ENTRY (entry)' failed
(spacefm:15675): GLib-CRITICAL **: g_strchug: assertion `string != NULL' failed
(spacefm:15675): GLib-CRITICAL **: g_strchomp: assertion `string != NULL' failed Segmentation fault (core dumped)
Thanks - odd that this isn't reproducible. Could you show me the output of:
spacefm --version
(That will tell me GTK2 or GTK3). Also, did you reconfigure what fields are visible in the rename dialog (Options button), or is everything at its default? (If changed, you might consider providing a screenshot as that dialog is complex).
Also, are you right-clicking on the desktop, or in the file manager? Does it only occur when you right-click on an empty space and not on an existing file? Finally, what view mode are you using in the file manager (detailed, icons, or compact)?
If you feel like it, a backtrace might be helpful (see BUILD DEBUG instructions in README), otherwise I'll look over the code and see if I can find where this is coming from.
No, thank you for helping me get this going (:
I am using GTK2 (show in Gnome Help – About screen). Verified with “spacefm –version” which outputs: spacefm 0.8.5 GTK2 UDEV INOTIFY DESKTOP SNOTIFY
I built manually using: ./configure make sudo make install :
Then, without making any spacefm configuration setting changes, I got the bug I posted when I ran spacefm. All settings were default.
Then, afterwards, I tried troubleshooting a bit and I set the “Root’s Editer” (since the terminal output a warning about this): “View – Preferences” “Advance” tab “Root’s Editer:” = “kdesu -c gedit %U” (since I couldn’t find “gnomesu” on my system)
All other spacefm settings are still default.
Wasn’t using “rename” dialog. Failure (exception) is caused by both “New – File” and “New – Folder” commands. In any case, I used the default “Options” settings in the dialog and didn’t change anything.
After reading your response, I tried to get some more info for you: 1) Noticed that “Options – Option – “As Root”” is default. I tried unchecking it and still got the same failure/exception. 2) Tried both the “Delete” and “Rename” spacefm commands and these work fine.
Then, I built the debug version of spacefm and generated the error from within gdb. Running spacefm from within gdb generates the following output on the gdb terminal: (spacefm:3027): Gtk-CRITICAL **: gtk_entry_get_text: assertion `GTK_IS_ENTRY (entry)' failed
(spacefm:3027): GLib-CRITICAL **: g_strchug: assertion `string != NULL' failed
(spacefm:3027): GLib-CRITICAL **: g_strchomp: assertion `string != NULL' failed
Program received signal SIGSEGV, Segmentation fault.
0x000000000045cc51 in ptk_rename_file (desktop=
Then, I ran the backtrace and got the following. Looks like the problem is with the ptk_rename_file() function…..
P.S. Is there a way to attach a text file in Github, instead of having to insert a long output like below?
Albert
(gdb) bt full
file=<value optimized out>, dest_dir=<value optimized out>, clip_copy=11498416, create_new=2, auto_open=0xacc4e0) at ptk/ptk-file-misc.c:2754
task = <value optimized out>
link = 0
link_target = 0
new_file = 0
overwrite = 0
msg = <value optimized out>
copy = 0
copy_target = 0
new_folder = 0
as_root = 0
new_link = 0
full_name = 0xae1560 "tmp"
full_path = 0xaf4fb0 "/data/software/SpaceFM/tmp"
path = 0xb05a90 "/data/software/SpaceFM"
old_path = 0xaf73b0 "/data/software/SpaceFM"
root_mkdir = 0xace2f0 ""
to_path = <value optimized out>
from_path = <value optimized out>
task_name = <value optimized out>
str = 0x0
iter = {dummy1 = 0xae2e60, dummy2 = 0xae2d40, dummy3 = -1, dummy4 = 26, dummy5 = 26, dummy6 = -1, dummy7 = -516011146, dummy8 = -1092087212,
dummy9 = 0xae2da0, dummy10 = 0xae3270, dummy11 = -1, dummy12 = 0, dummy13 = 32, dummy14 = 0x2}
siter = {dummy1 = 0xae2e60, dummy2 = 0xae2d40, dummy3 = -1, dummy4 = 0, dummy5 = 0, dummy6 = -1, dummy7 = -516011146, dummy8 = -1092087212,
dummy9 = 0xae4500, dummy10 = 0xae31c0, dummy11 = -1, dummy12 = 0, dummy13 = 24, dummy14 = 0x7fffffffd520}
task_view = 0x8721b0
ret = 1
target_missing = <value optimized out>
templates = <value optimized out>
statbuf = {st_dev = 0, st_ino = 273895700144, st_nlink = 0, st_mode = 10829328, st_uid = 0, st_gid = 10829328, __pad0 = 0, st_rdev =
242225306110, st_size = 0, st_blksize = 140737488344176, st_blocks = 10829328, st_atim = {tv_sec = 7548864, tv_nsec = 0}, st_mtim = {tv_sec =
273895700321, tv_nsec = 10396880}, st_ctim = {tv_sec = 10846976, tv_nsec = 10846976}, __unused = {242225306110, 10846976, 140737488344176}}
mset = 0xa1a290
root_msg = 0x4b2d6d ""
width = <value optimized out>
height = <value optimized out>
type = <value optimized out>
dlg_vbox = <value optimized out>
hbox = <value optimized out>
last = <value optimized out>
response = -5
allocation = {x = 32, y = 0, width = 7548672, height = 0}
result = <value optimized out>
ao = 0xacc4e0
No locals.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
job = -1
menu = 0x9ea4d0
keymod = <value optimized out>
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
No symbol table info available.
run = <value optimized out>
err = 0x0
IgnorantGuru, are you using a graphical IDE to debug the code? Which one? Eclipse? If so, do you have an Eclipse project config file that you can send me (ie. so that I can open the spacefm project in an IDE and then step through the code)? I can step back from the point of the exception, on my system, and then we can isolate what is failing on my system. It may be hard for you to isolate the problem without running on my actual system.
The failure is happening at line #2754 in ptk-file-misc.c. str[0] faults because the "str" pointer is NULL (as can be seen in the backtrace. I would like to step through the code leading up to that point to isolate the failure.
It appears that this method for obtaining the contents of the template entry is failing for you - apparently that is the source of your 'GTK_IS_ENTRY (entry) failed' warning. Why that would be I can't say - that method for obtaining the entry from the combo box is documented. It's also used elsewhere in this dialog and in spacefm and has never caused a problem. Do you see a Template box in the new file dialog containing "Empty File" by default?
At any rate, the crash was simply due to that returned string being NULL. I have changed the method for obtaining the entry contents, and also made it verify it has a non-NULL value. This should at least stop that crash. But it will be interesting to see if the templates work correctly for you, and whether you see any other entry warnings from this or other dialogs. Unlike this case, use of gtk_bin_get_child is sometimes required (eg for setting the entry's text).
You can test my changes using the BUILD NEXT instructions in README.
I am using GTK2
What version is your gtk2 lib package? eg 2.24?
I set the “Root’s Editer” (since the terminal output a warning about this): “View – Preferences” “Advance” tab “Root’s Editer:” = “kdesu -c gedit %U” (since I couldn’t find “gnomesu” on my system)
You can set the graphical su program to 'kdesu' and then set root's editor to 'gedit' (spacefm knows to run it as root).
Wasn’t using “rename” dialog. Failure (exception) is caused by both “New – File” and “New – Folder” commands.
Rename and new file/folder use the same dialog in a different mode.
Is there a way to attach a text file in Github, instead of having to insert a long output like below?
You can use a gist, or just use pastebin. Thanks for the backtrace.
are you using a graphical IDE to debug the code?
No.
Also, you might use GTK_IS_COMBO_BOX() on mset->combo_template to see if it is in fact a valid combo box when the code gets to that section. eg:
printf( "GTK_IS_COMBO_BOX: %s\n", GTK_IS_COMBO_BOX( mset->combo_template ) ? "true" : "false" );
Any more info on this is welcome - eg any warnings still appearing with the next build. Still wondering why that mset->combo_template pointer appears to be going invalid.
Sorry, this GIT editor does funny things sometimes. I thought this comment was posted a few days ago but I just realized that it must have timed out or something and not posted. Here is the old comment that didn't post:
Yes, when executing the "New - File" command, I do see the "Template:" box in the dialog and it is set to "Empty File" by default. When I select the "New - Folder" command, I see the "Template:" box in the dialog and it is set to "Empty Folder" by default.
The GTK2 Lib package version is v2.18.9-10 (x86_64). I am on a 64-bit system.
Thanks for the info on gist and pastebin.
Ok, I will compile and run the latest version (BUILD NEXT), later tonight, and tell you the results. Started doing this but need to configure my autoconf macro dir as part of the build...
Got swamped with work these last few days. Will try and continue building your latest update and then give feedback ASAP, but it may take a few more days till I am free again to continue troubleshooting this.
I was following the instructions to setup my environment for BUILD NEXT. I got as far as running "autogen.sh". I got the following warnings and wanted to resolve these before continuing. For all I know, these errors/warnings are causing my main/previous build (of the released code) from working (and causing the error I am getting with failure to create dir/files). So, I always try and be careful and fully understand/resolve any warnings/errors I get while building code.
As you can see, the "autogen.sh" script is causing warnings/errors, with my build environment, related to macros. I have been reading up on "autoconf" usage and environment configuration but this stuff is tricky. Do you know how to fix the errors I am getting related to copying "codeset.m4", etc.., files to the autoconf macro directory? I started reading about "AC_CONFIG_MACRO_DIR", etc.., here: http://www.flameeyes.eu/autotools-mythbuster/autoconf/macros.html, but need to finish reading and absorbing what I really need to do and what is the best way to deal with these warnings/errors, keeping in mind that I want to also be able to use the same Linux system to build drivers and applications in the future. So, I want to take care of this stuff in the right way (not a cludge). If you have experience with this, and can explain to me what is the best way to deal with these warnings and setup my environment for future code builds, let me know (it will save me time). In particular, where is the best place to put the missing macros, and what is the best way to tell the make tools where to find these (in the general case)?
I also need the "config.guess", etc.., files listed in a separate warning.
Line #120 in the autogen.sh file is generating the first set of warnings. here is the command: echo "no" | glib-gettextize --force --copy
Then, I am getting some additional warnings from libtoolize at line #135: libtoolize --force --copy
Note: If you can help me get setup so that I can step through the source code in gdb (actually using real source files), then I can quickly tell you which line is causing the problem and let you fix it. I have already reviewed the entire ptk-file-menu.c file and understand it enough to be able to isolate the problem and direct you to the exact line which fails on my system. Bit, I have always used a graphical IDE in the past and need to refresh my memory on how to use gdb to step through real "C/C++" source files.
Here is the autogen.sh terminal output:
[server]$ ./autogen.sh
Warning: I am going to run configure' with no arguments. If you wish to pass any to it, please specify them on the
./autogen.sh' command line.
processing . Creating ./aclocal.m4 ... Running glib-gettextize... Ignore non-fatal messages. Copying file mkinstalldirs Copying file po/Makefile.in.in
Please add the files codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4 progtest.m4 from the /usr/share/aclocal directory to your autoconf macro directory or directly to your aclocal.m4 file. You will also need config.guess and config.sub, which you can get from ftp://ftp.gnu.org/pub/gnu/config/.
Making ./aclocal.m4 writable ...
Running intltoolize...
Running libtoolize...
libtoolize: putting auxiliary files in .'. libtoolize: copying file
./ltmain.sh'
libtoolize: Consider adding AC_CONFIG_MACRO_DIR([m4])' to configure.ac and libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree. libtoolize: Consider adding
-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
Running aclocal ...
Running automake --gnu ...
data/Makefile.am:102: %'-style pattern rules are a GNU make extension src/Makefile.am:20: compiling
mime-type.c' with per-target flags requires AM_PROG_CC_C_O' in
configure.ac'
Running autoconf ...
Running ./configure --enable-maintainer-mode ...
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
:
:
Didn't mean to rush you, just wanted to make sure you and others knew that this doesn't appear to be fully resolved.
Actually you can run ./configure in place of ./autogen.sh and I think that will work. I recommended autogen because the next branch can sometimes (rarely) be in a pre-autoconf state, but I didn't realize it would cause so many complications - I should revise that. No one has reported any problems with the next build though. As for those warnings, nothing there should be critical so safe to ignore them for this purpose. spacefm's build system is quite reliable if a little noisy. I have tried to clear some of those warnings but it led to unwarranted complications and investments of time, and some of those warnings I haven't seen, but doesn't look critical. If it configures and makes you should be good to go.
Not sure how many are affected by this but it sounds like it may be related to gtk <=2.20 (a debian squeeze user also encountered it), although it would be odd that it wasn't reported until now. I'm wondering if mset->combo_template pointer is being corrupted.
Thanks for the efforts.
Actually, looking at it again I think maybe following gtk2.20 the gtk devs changed something in the combobox bin. I'd be interested to know if you're still seeing a warning but you may want to wait on any further debugging until I look into the possible gtk break.
Ok, I just ignored the autogen warnings and ran the rest of the build, which completed ok. With this latest version, everything appears to work ok. Good job (:
I would like to help you isolate the exact line in the code that was causing the problem next, by stepping the code with gdb....
Thanks for the feedback. Do any warnings appear on stderr (run spacefm in a terminal) when using that dialog?
Also, do the template functions work? For example, if you copy some assorted files to ~/Templates/ are they listed in the Template drop-down box? And if you select one, is the new file a copy of that file?
Thank you for working on this (: I really like the multi-pane capability and will be happy when I can start using it.
When I try and create a directory, it is created. Here is the terminal output: [server]$ spacefm network mount changed: /mnt/sfm_server network mount changed: /mnt/sfm_server
The following is output after I create a dir...
TASK_COMMAND=mkdir '/data/software/SpaceFM/tmp' SPAWN=/bin/bash /tmp/spacefm-Albert_Castillo-3eabfb84.tmp/4812a5dd-tmp.sh run pid = 15284 child finished pid=15284 exit_status=0
If I try and create another dir, the same above output happens again....
I exited SpaceFM and then reran it. When I try and create a file, here is the output after I initiate creating the file: TASK_COMMAND=touch '/data/software/SpaceFM/tmp.txt' SPAWN=/bin/bash /tmp/spacefm-Albert_Castillo-3cc00d9b.tmp/6f9e537e-tmp.sh run pid = 15431 child finished pid=15431 exit_status=0
Then, when I am in the file creation dialog, as soon as I select the template drop down box, I do see a file I placed in the ~/Templates dir called "template_test.txt". As soon as I select it, I get the following output in the terminal: (spacefm:17303): Gtk-CRITICAL **: gtk_entry_get_text: assertion `GTK_IS_ENTRY (entry)' failed
Creating a new dir and selecting a dir template (~/Templates/tmp1/tmp2) correctly creates the new dir and the following is output on the terminal (no "Gtk-CRITICAL"): TASK_COMMAND=cp -rL '/home/Albert_Castillo/Templates/tmp1/' '/data/software/SpaceFM/test_dir' SPAWN=/bin/bash /tmp/spacefm-Albert_Castillo-150b2cdb.tmp/7938757f-tmp.sh run pid = 29978 child finished pid=29978 exit_status=0
Let me know if there is anything else you want me to try. Over the next week, I will try and learn how to step through the source code and then I can help you isolate the exact line that is failing quick, if you haven't figured it out already....
This should now be fully corrected in d6001c7. It looks like the gtk < 2.24 compatibility define was either a typo or an oversight (it's very confusing what they did with the changes to combo boxes between gtk updates - one area where supporting multiple gtk versions is challenging).
I haven't actually built this with gtk2.20 yet so if you could try the next branch and see if those warnings are cleared that would be helpful - thanks!
Also note that the Template drop-down lists should have an entry (you can type in the box in addition to being able to select from the drop-down list), which they probably didn't have with gtk < 2.24 until now. Hence the warning.
This is confirmed corrected elsewhere.
FYI, also verified the latest v0.8.5-37 build with the #define fix in gtk2-compat.h. Looks like this fixes the problem and was the main issue. Now, in addition to files and dir's being created correctly without causing exceptions, there are no more errors/warnings output on the terminal when the dialog box and/or template box is invoked.
Thank you very much IG for fixing this quickly. I am so happy I can start using SpaceFM now as my main file explorer.
The only thing I may have to still use Nautilus for is to access Samba shares. It would be good if we add this functionality into a future version of SpaceFM. Can probably use the Nautilus source code as reference.
P.S. Are you the main creator of SpaceFM?
Thanks for the confirmation. As for samba shares, spacefm can mount these if udevil is installed, or if you use another method via a custom protocol handler. There are also some relevant plugins for browsing smb shares. Nautilus uses gvfs for this support, which is not a dependency of spacefm.
I am the lead developer of SpaceFM, and its predecessor PCManFM-Mod. You can read the history here.
Ok. Cool. Very cool! I will try udevil and check out the plugins. I am jazzed that SpaceFM can also be made to support network file systems (:
I read the history and some of the documentation. Great job on the documentation.
Looks like you guys have designed in some really good API's, and put a lot of thought into the SpaceFM architecture and extensibility. I like that it can be customized so much.
Is there a way I can email you outside of this thread? I don't want to clutter it with irrelevant stuff. Maybe you can send me your email or point me at a thread for new features/stuff?
I noticed that CentOS (my new favorite distro because of it's stability) is not in the supported packages section. Can I help you to build a CentOS binary (64-bit for starters) for distribution as a CentOS package? If so, can you give me some guidelines/tips/recommendations for doing this? On my current 64-bit CentOS system (Athlon), I always keep it updated with the latest updates (for the CentOS v6.3 build). As you know, CentOS mirrors RedHat RHEL releases pretty closely (except for some cosmetic stuff: logos, etc..).
My email is here, but I already get too much email and thus am not very responsive. I prefer forum or blog discussions so others can read the same. You can find various resources on the homepage - there's also an irc channel and wiki, etc. You might also ask on a CentOS forum how to proceed with packaging spacefm/udevil.
It's mostly just me developing this so I don't have time to get involved much in packaging, but you're certainly welcome to provide CentOS packages. You can add relevant info here yourself when it's available. Thanks for your interest.
Ok, thanks for the info.
Ok, I will look into making SpaceFM/udevil packages available for CentOS. Since CentOS’s claim to fame is binary compatibility with Redhat RHEL, I don’t think we can get it bundled into the statndard CentOS distribution unless I am able to convince Redhat to include it in their standard release (which is possible, I will also look into this). But, there are separate default repositories that work with CentOS and I will look into getting CentOS/udevil added to these repositories.
Do you consider the current release of SpaceFM stable enough for mass distribution? I don’t think we should pursue this until it is stable. Do you have a QA/QC process that you go through for new “stable” releases of SpaceFM? If not, maybe I can help you set this up….
Albert
Yes, SpaceFM is stable - particularly release versions (the master code branch). next branch is for pre-release testing. Thanks for the packaging!
Cannot create directory (or file) on CentOS v6.3. When I "right-click" in an empty space and then select "New - Folder" (or "New - File"), the Create New Folder dialog pops up. Then, when I type in a new dir name, and select "Create", SpaceFM just exits! Selecting "As Root" doesn't help). I don't think permissions are a problem. I also tried creating a dir in the "/tmp" dir and it also exited. I have also tried running SpaceFM as a Superuser (sudo /usr/local/bin/spacefm), which runs but then it exits in the same way as when I run as a normal user!
Not sure what is going on here. Can someone help??? I really like SpaceFM especially because of the support for (4) panes. I have tried some other functions of SpaceFM (for instance deleting a dir) and they appear to work ok. I can run 1-4 panes no problem.
I am using the current build of CentOS v6.3 (kernel v2.6.32-279.19.1).
I have downloaded and built the master source code (IgnorantGuru-spacefm-0.8.5-0-ge6dd4b4.tar.gz). The same thing happens with v0.8.3. I have 25 yrs experience with software development! While building, everything looks ok. No obvious errors (once I resolved any missing dependencies).
This problem exists on both the v0.8.5 and v0.8.3 version of SpaceFM....