Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Segfault in al_show_native_file_dialog()

This thread is locked; no one can reply to it. rss feed Print
Segfault in al_show_native_file_dialog()
Aksel Huff
Member #16,201
February 2016

Hello,

I am losing my mind! I had a native file dialog working well, then I made some changes and broke it. Now, I cannot get it working again.

I followed the example: ex_native_filechooser.c, and had a pretty good system working before I screwed it up.

I'm not sure if something is wrong with my development environment, because I'm sure the below code should work. The below gives me a segfault, should it?

#SelectExpand
1#include <allegro5/allegro.h> 2#include <allegro5/allegro_native_dialog.h> 3 4int main() 5{ 6 al_init(); 7 8 ALLEGRO_DISPLAY *d = al_create_display(800, 800); 9 10 al_init_native_dialog_addon(); 11 12 auto fc = al_create_native_file_dialog("/", "Chooser", NULL, ALLEGRO_FILECHOOSER_MULTIPLE); 13 al_show_native_file_dialog(d, fc); 14 15 al_destroy_native_file_dialog(fc); 16 al_destroy_display(d); 17 18 return 0; 19}

torhu
Member #2,727
September 2002
avatar

What error message do you get? If you only changed code, you could try just undoing your changes. Or use a versioning system like Git to keep track of what you have done. Et cetera. :)

Aksel Huff
Member #16,201
February 2016

Unfortunately for me, I have not developed good version control habits. I had thought I had made a commit when I had the dialog working, but I went back through commits and I couldn't find a state where it was working. I guess I had got it working, then broke it before making any commits...

When I step through the code, it segfaults at al_show_native_file_dialog()

All I get when I run the above code is the display being created, then crashing with Segmentation fault (core dumped)

I have just figured out how to find the core dump and look at it with gdb and here is the stack frame (I have no idea what to make of this):

#SelectExpand
1#0 __memmove_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:240 2#1 0x00007fe85cb6b79d in () at /lib/x86_64-linux-gnu/libpng16.so.16 3#2 0x00007fe85cb5b538 in () at /lib/x86_64-linux-gnu/libpng16.so.16 4#3 0x00007fe85cb5b9d8 in () at /lib/x86_64-linux-gnu/libpng16.so.16 5#4 0x00007fe85cb5bcbb in () at /lib/x86_64-linux-gnu/libpng16.so.16 6#5 0x00007fe85cb5beab in png_process_data () at /lib/x86_64-linux-gnu/libpng16.so.16 7#6 0x00007fe8502c2cd9 in () at /snap/code/93/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so 8#7 0x00007fe85d649281 in () at /lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 9#8 0x00007fe85d649b15 in gdk_pixbuf_loader_close () at /lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 10#9 0x00007fe85d646233 in () at /lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 11#10 0x00007fe85d6472c1 in gdk_pixbuf_new_from_stream () at /lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 12#11 0x00007fe85e1ad57f in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 13#12 0x00007fe85e1b1be0 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 14#13 0x00007fe85e1a9afe in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 15#14 0x00007fe85e1aa278 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 16#15 0x00007fe85e1aa394 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 17#16 0x00007fe85e1aa4e0 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 18#17 0x00007fe85e1be191 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 19#18 0x00007fe85e118417 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 20#19 0x00007fe85e11c75e in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 21#20 0x00007fe85e1be987 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 22#21 0x00007fe85e27f441 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 23#22 0x00007fe85e27fce6 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 24#23 0x00007fe85e27fdd6 in gtk_widget_get_preferred_width () at /lib/x86_64-linux-gnu/libgtk-3.so.0 25#24 0x00007fe85e28044e in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 26#25 0x00007fe85e118417 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 27#26 0x00007fe85e11c75e in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 28#27 0x00007fe85e0d36c7 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 29#28 0x00007fe85e27f441 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 30#29 0x00007fe85e27fce6 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 31#30 0x00007fe85e27fdd6 in gtk_widget_get_preferred_width () at /lib/x86_64-linux-gnu/libgtk-3.so.0 32#31 0x00007fe85e21fc7e in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 33#32 0x00007fe85e27f441 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 34--Type <RET> for more, q to quit, c to continue without paging-- 35#33 0x00007fe85e27fc52 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 36#34 0x00007fe85e27fdd6 in gtk_widget_get_preferred_width () at /lib/x86_64-linux-gnu/libgtk-3.so.0 37#35 0x00007fe85e0c5c6f in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 38#36 0x00007fe85e118417 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 39#37 0x00007fe85e11c75e in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 40#38 0x00007fe85e0c6737 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 41#39 0x00007fe85e27f441 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 42#40 0x00007fe85e27fce6 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 43#41 0x00007fe85e27fdd6 in gtk_widget_get_preferred_width () at /lib/x86_64-linux-gnu/libgtk-3.so.0 44#42 0x00007fe85e2864fa in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 45#43 0x00007fe85e118417 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 46#44 0x00007fe85e11c75e in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 47#45 0x00007fe85e28720b in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 48#46 0x00007fe85e27f441 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 49#47 0x00007fe85e27fce6 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 50#48 0x00007fe85e27fdd6 in gtk_widget_get_preferred_width () at /lib/x86_64-linux-gnu/libgtk-3.so.0 51#49 0x00007fe85e0c5c6f in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 52#50 0x00007fe85e118417 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 53#51 0x00007fe85e11c75e in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 54#52 0x00007fe85e0c6737 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 55#53 0x00007fe85e27f441 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 56#54 0x00007fe85e27fce6 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 57#55 0x00007fe85e27fdd6 in gtk_widget_get_preferred_width () at /lib/x86_64-linux-gnu/libgtk-3.so.0 58#56 0x00007fe85e0c09b9 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 59#57 0x00007fe85e25b2ba in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 60#58 0x00007fe85e27f441 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 61#59 0x00007fe85e27fce6 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 62#60 0x00007fe85e27fdd6 in gtk_widget_get_preferred_width () at /lib/x86_64-linux-gnu/libgtk-3.so.0 63#61 0x00007fe85e0c5c6f in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 64#62 0x00007fe85e118417 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 65#63 0x00007fe85e11c75e in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 66#64 0x00007fe85e0c6737 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 67#65 0x00007fe85e27f441 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 68--Type <RET> for more, q to quit, c to continue without paging-- 69#66 0x00007fe85e27fce6 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 70#67 0x00007fe85e27fdd6 in gtk_widget_get_preferred_width () at /lib/x86_64-linux-gnu/libgtk-3.so.0 71#68 0x00007fe85e28044e in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 72#69 0x00007fe85e217d42 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 73#70 0x00007fe85e118417 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 74#71 0x00007fe85e11c75e in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 75#72 0x00007fe85e217197 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 76#73 0x00007fe85e27f441 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 77#74 0x00007fe85e27fce6 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 78#75 0x00007fe85e27fdd6 in gtk_widget_get_preferred_width () at /lib/x86_64-linux-gnu/libgtk-3.so.0 79#76 0x00007fe85e0c5c6f in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 80#77 0x00007fe85e118417 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 81#78 0x00007fe85e11c75e in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 82#79 0x00007fe85e0c6737 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 83#80 0x00007fe85e27f441 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 84#81 0x00007fe85e27fce6 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 85#82 0x00007fe85e27fdd6 in gtk_widget_get_preferred_width () at /lib/x86_64-linux-gnu/libgtk-3.so.0 86#83 0x00007fe85e0c5c6f in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 87#84 0x00007fe85e118417 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 88#85 0x00007fe85e11c75e in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 89#86 0x00007fe85e0c6737 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 90#87 0x00007fe85e27f441 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 91#88 0x00007fe85e27fce6 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 92#89 0x00007fe85e27fdd6 in gtk_widget_get_preferred_width () at /lib/x86_64-linux-gnu/libgtk-3.so.0 93#90 0x00007fe85e0c5c6f in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 94#91 0x00007fe85e118417 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 95#92 0x00007fe85e11c75e in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 96#93 0x00007fe85e0c6737 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 97#94 0x00007fe85e27f441 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 98#95 0x00007fe85e27fce6 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 99#96 0x00007fe85e27fdd6 in gtk_widget_get_preferred_width () at /lib/x86_64-linux-gnu/libgtk-3.so.0 100#97 0x00007fe85e34143a in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 101#98 0x00007fe85e27f441 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 102--Type <RET> for more, q to quit, c to continue without paging-- 103#99 0x00007fe85e27fce6 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 104#100 0x00007fe85e27fdd6 in gtk_widget_get_preferred_width () at /lib/x86_64-linux-gnu/libgtk-3.so.0 105#101 0x00007fe85e280124 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 106#102 0x00007fe85e342bb1 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 107#103 0x00007fe85e34713a in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 108#104 0x00007fe85de45802 in g_closure_invoke () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0 109#105 0x00007fe85de59962 in () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0 110#106 0x00007fe85de64bbe in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0 111#107 0x00007fe85de650f3 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0 112#108 0x00007fe85e33721b in gtk_widget_realize () at /lib/x86_64-linux-gnu/libgtk-3.so.0 113#109 0x00007fe85e344fd6 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 114#110 0x00007fe85de45802 in g_closure_invoke () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0 115#111 0x00007fe85de59962 in () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0 116#112 0x00007fe85de64bbe in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0 117#113 0x00007fe85de650f3 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0 118#114 0x00007fe85e3311ce in gtk_widget_show () at /lib/x86_64-linux-gnu/libgtk-3.so.0 119#115 0x00007fe85e1493a8 in gtk_dialog_run () at /lib/x86_64-linux-gnu/libgtk-3.so.0 120#116 0x00007fe85ea5d034 in () at /lib/x86_64-linux-gnu/liballegro_dialog.so.5.2 121#117 0x00007fe85dd58be8 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 122#118 0x00007fe85dd5804e in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 123#119 0x00007fe85dd58400 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 124#120 0x00007fe85dd586f3 in g_main_loop_run () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 125#121 0x00007fe85e1e412d in gtk_main () at /lib/x86_64-linux-gnu/libgtk-3.so.0 126#122 0x00007fe85ea5ea0f in () at /lib/x86_64-linux-gnu/liballegro_dialog.so.5.2 127#123 0x00007fe85dd81ad1 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 128#124 0x00007fe85dceb609 in start_thread (arg=<optimized out>) at pthread_create.c:477 129#125 0x00007fe85e866163 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

I'm starting to think there is something wrong with either my build setup, my OS, or something else because I just tried to build the native file chooser example and it also segfaults.

EDIT: I discovered something! If I run the example with sudo, it works! So I guess this isn't an Allegro5 issue, and more of a Linux problem I'm having.

Anyone able to assist me with figuring out why my applications suddenly need to be run with sudo?

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Aksel Huff
Member #16,201
February 2016

I don't think I was trying to open something that would need special permissions, just my home dir. The native file dialog example also segfaulted.

Ok, it looks like I don't get a segfault if I run the example from the terminal. Or from the bash terminal in vscode. I only get a segfault when I press the launch button, which I guess launches the app with cmake?

So maybe it's an issue I'm having with vscode.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

First thing to do is check return values of functions that can fail.

If a resource like an image fails to load it will be null and access will seg fault that way too.

console said:

#5 0x00007fe85cb5beab in png_process_data () at /lib/x86_64-linux-gnu/libpng16.so.16

It probably had an error trying to load an unsupported png file.

Erin Maus
Member #7,537
July 2006
avatar

A hunch: you're using relative paths to load a file (e.g., PNG as an ALLEGRO_BITMAP) and when running from the terminal, the relative path resolves correctly. But when running from VS Code, your working directory is not the same as the terminal, and so the relative path resolves differently to a file that does not exist, resulting in a crash.

Example:

al_load_bitmap("foo/bar.png")
// If your working directory is ~/project, then this will resolve to ~/project/foo/bar.png
// But if your relative directory is /usr/bin, this will resolve to /usr/bin/foo/bar.png -- which probably isn't correct!

You probably have to configure your run target in VS Code to have the project's base path as your working directory.

(If this isn't the case - apologies! Like I said, it's just a hunch).

---
ItsyRealm, a quirky 2D/3D RPG where you fight, skill, and explore in a medieval world with horrors unimaginable.
they / she

Aksel Huff
Member #16,201
February 2016

I added a line to check for the return values of the display and the filechooser, and both are not null.

I'm not sure about how to go about the libpng error, as I am not loading any images.

This is my current code that I am trying to debug:

#SelectExpand
1#include <stdio.h> 2#include <allegro5/allegro.h> 3#include <allegro5/allegro_native_dialog.h> 4 5int main() 6{ 7 al_init(); 8 al_init_native_dialog_addon(); 9 10 ALLEGRO_DISPLAY *disp = al_create_display(800, 800); 11 12 ALLEGRO_FILECHOOSER *fc = al_create_native_file_dialog(NULL, "Test", NULL, ALLEGRO_FILECHOOSER_FILE_MUST_EXIST); 13 14 if (!fc || !disp) return 1; 15 16 al_show_native_file_dialog(disp, fc); 17 18 if (al_get_native_file_dialog_count(fc) > 0) 19 { 20 printf("%s\n", al_get_native_file_dialog_path(fc, 0)); 21 } 22 23 al_destroy_native_file_dialog(fc); 24 25 al_destroy_display(disp); 26 27 return 0; 28}

Backtrace for this code:

#0  __memmove_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:240
#1  0x00007ffff60b079d in  () at /lib/x86_64-linux-gnu/libpng16.so.16
#2  0x00007ffff60a0538 in  () at /lib/x86_64-linux-gnu/libpng16.so.16
#3  0x00007ffff60a09d8 in  () at /lib/x86_64-linux-gnu/libpng16.so.16
#4  0x00007ffff60a0cbb in  () at /lib/x86_64-linux-gnu/libpng16.so.16
#5  0x00007ffff60a0eab in png_process_data () at /lib/x86_64-linux-gnu/libpng16.so.16
#6  0x00007fffdc550cd9 in  () at /snap/code/93/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so
#7  0x00007ffff6b8e281 in  () at /lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0
#8  0x00007ffff6b8eb15 in gdk_pixbuf_loader_close () at /lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0
#9  0x00007ffff6b8b233 in  () at /lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0
#10 0x00007ffff6b8c2c1 in gdk_pixbuf_new_from_stream () at /lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0
#11 0x00007ffff76f257f in  () at /lib/x86_64-linux-gnu/libgtk-3.so.0

Successfully prints the selected file to the terminal when run from terminal, crashes when run from vscode.

Could the native file dialog be using relative paths internally, which would make Erin's suggestion make sense?

EDIT:

I think cmake has something to do with this? If I launch the program using the "Run and Debug" window in vscode, it does not segfault. Just when I do ./test in the CMake/Launch terminal, and when I press the Launch button at the bottom. Hmmmmmmmmmmm.

torhu
Member #2,727
September 2002
avatar

Try calling al_get_current_directory after al_init, and see what it returns. Does it vary depending on how you run the program?

Aksel Huff
Member #16,201
February 2016

It does not vary, when it runs properly and when it seg faults it spits out /home/aksel/dev/test/build

I should add that I have reinstalled vscode, and cmake, to no avail.

torhu
Member #2,727
September 2002
avatar

Ok, so it's different between when it works, and when it doesn't? I think that's the clue here, then :)

This is a common issue, it's about what the working folder is. If you load files from a relative path, which you probably should do for a game, you have to set what the basis of that path is. Someone else will tell you how, I hope ;D

Aksel Huff
Member #16,201
February 2016

No it does not vary.

torhu
Member #2,727
September 2002
avatar

Ok, sorry. Someone that is more familiar with Linux will have to answer, then.

Aksel Huff
Member #16,201
February 2016

I think the issue is within my configuration of vscode-cmake-tools. It only seg faults when run using cmake run in vscode. I have posted a question of stackexchange, as this appears (at least to me) to not be a programming issue per se.

torhu
Member #2,727
September 2002
avatar

Cool, maybe you could link to the SE issue? I'm on there, and I'm sure many others here are too.

Aksel Huff
Member #16,201
February 2016

torhu
Member #2,727
September 2002
avatar

No problem, hope you figure it out.

Dizzy Egg
Member #10,824
March 2009
avatar

Oddly this wouldn’t run for me until I set the patterns argument to *.*

But then setting it back to NULL allowed it run again……so now Im confused!!

----------------------------------------------------
Please check out my songs:
https://soundcloud.com/dont-rob-the-machina

Indeterminatus
Member #737
November 2000
avatar

I'm not sure if this was already addressed: did you check the permissions on your working directory? Who's the owner/group?

If your toolchain is creating/writing to that directory (it looks like it), be sure to check after your build.

_______________________________
Indeterminatus. [Atomic Butcher]
si tacuisses, philosophus mansisses

Aksel Huff
Member #16,201
February 2016

I've checked my repo folder and the build folder and both are me/me for group and owner.

I'm still pretty new to Linux there could be something obvious I'm not seeing.

gusnan
Member #11,822
April 2010

I run into the same problem as you when compiling and running - but I found that you are using auto

- and to my naivety thought that it was a c++ only keyword - so, I renamed the source to .cpp, and compiled it using g++.

This does make it work.

Either that, or if you must use C, make that auto fc instead a ALLEGRO_FILECHOOSER *fc =

(edit) Oh, you had another example - in that second case I guess you are running into problems with permissions like the rest of the people here have said. (/edit)

Go to: