World: r3wp
[!REBOL3 Extensions] REBOL 3 Extensions discussions
older newer | first last |
Kaj 21-Dec-2010 [1943] | == REBOL System Error: REBOL System Error #1207: assertion failed Program terminated abnormally. This should never happen. Please contact www.REBOL.com with details. |
Andreas 21-Dec-2010 [1944] | Linux A110? |
Kaj 21-Dec-2010 [1945] | Yes |
Andreas 21-Dec-2010 [1946] | Thanks, I'll report it as bug. |
Kaj 21-Dec-2010 [1947] | Looks noteworthy :-) |
Kaj 22-Dec-2010 [1948] | When I go beyond 14 commands, importing segfaults. I thought people had made extensions with far more commands? |
Oldes 22-Dec-2010 [1949x4] | I don't see none of these these problems with my FMOD extension. |
I'm on XP only. | |
Maybe you do something wrong in your extension. | |
Just tested your extension attached to CC (sample.c) and I cannot repro the assertion as well. | |
Andreas 22-Dec-2010 [1953x3] | Thanks for testing, Oldes. |
Would you mind mailing me your resulting .dll? | |
And what compiler did you use? GCC or MSVC? | |
Oldes 22-Dec-2010 [1956] | gcc (GCC) 3.4.5 (mingw-vista special r3) |
Andreas 22-Dec-2010 [1957] | Would you mind trying the following: http://bolka.at/2010/rebol3/tmp/sample.dll |
Oldes 22-Dec-2010 [1958] | works |
Andreas 22-Dec-2010 [1959] | Ok, so works on XP, fails on Linux and Wine. Will try Win7 later on. |
Kaj 22-Dec-2010 [1960] | I've tested extensively, and no matter what I do, it segfaults right away on init when there are more than 14 commands in the init block. That's indeed on Linux |
Andreas 22-Dec-2010 [1961x2] | Hm, a trivial extension exporting 20 commands seems to work fine for me: https://gist.github.com/e9192ae7083a2fbf5d78 |
Both for A110 Linux and A110 Win32+Wine. | |
Kaj 22-Dec-2010 [1963x3] | Interesting, but that's a very empty example. Can you try with command parameters? |
I'm exporting them wrapped in a context. That may make a difference | |
When I split the cURL binding in two contexts, it works, so it seems to be some object limit | |
Andreas 22-Dec-2010 [1966x3] | Very peculiar. |
When I export a context wrapping the above 20 cmds, it still works. | |
export cmds: context [cmd01: command [] cmd02: ...] | |
Kaj 22-Dec-2010 [1969x2] | Then please give them some more work to do |
It also bombs out for me when the fifteenth context slot is such an empty command | |
Andreas 22-Dec-2010 [1971x2] | Makes no difference even if I add 3 parameters to each of them. |
Let me try with 10 parameters each. | |
Kaj 22-Dec-2010 [1973] | It sure is a strange thing :-) |
Andreas 22-Dec-2010 [1974x3] | Most peculiar, yes. |
Nope, 20 cmds with 10 params each works as well. | |
Maybe something to do with the length of the init block? | |
Kaj 22-Dec-2010 [1977x2] | OK, let me upload the cURL binding source for you |
I tried shortening the init block, but it didn't help | |
Kaj 24-Dec-2010 [1979] | An error return code is defined for extensions, but it's not used anywhere in the host kit or documentation, so we don't know how to use it |
Kaj 25-Dec-2010 [1980] | There's also a SET_EXT_ERROR macro, but also undocumented, and it only allows setting an unknown number |
Oldes 26-Dec-2010 [1981] | I'm experimenting with image! as a command agrument and found this strange behaviour: I have: img-echo: command [img [image!] ] In RX_Call I use just: return RXR_VALUE; And then when I call the img-echo I get image, but with index at the tail so it looks like: >> i: img-echo img == make image! [50x20 #{ }] >> index? i == 1001 Is this normal? How I can set the index on the C side? |
Oldes 27-Dec-2010 [1982] | I've found solution for my answer related to warning: ../R3A110/src/include/reb-config.h:107: warning: ignoring #pragma warning To remove this warning, use this compiler option: -Wno-unknown-pragmas |
Kaj 27-Dec-2010 [1983x4] | Image index at tail sounds like a bug |
This should set it at the head: | |
RXA_INDEX(arguments, 1) = 0; | |
But it should already be at that value | |
Oldes 27-Dec-2010 [1987x5] | I've located where is the problem.. it's returning the image at the tail if the command is used in exported context! |
Correction... it returns image index at tail when there is any exported context.. the command can be out of the context. | |
http://issue.cc/r3/1809 | |
btw... I was trying to use: RXA_INDEX(frm, 1) = 0; but in my complex extension I was even able to crash REBOL. But I'm not able to simplify it. The sample.c included with the bug report must be enough, it clearly shows that there is something wrong. | |
It's also strange that it returns correct index before I eval the exported context. | |
BrianH 27-Dec-2010 [1992] | I added that last sentence to the ticket, as it might help diagnose the problem. |
older newer | first last |