search for: devdesc

Displaying 20 results from an estimated 34 matches for "devdesc".

2019 Apr 25
2
[FORGED] src/modules/X11/devX11.c, can we remove "#if BUG" yet
...--------->> >..... >Gah. I've been too tired today. Why did that take me so long? > >The culprit seems to be > >R_ProcessEvents((void*) NULL) > >in newX11DeviceDriver > >This gets called *before* this stuff at the end of Rf_addX11Device > > dd = GEcreateDevDesc(dev); > addDevice((DevDesc*) dd); > initDisplayList((DevDesc*) dd); > >and it is that "dd" that gets called by Rf_playDisplayList. Removing >the offending line stops the segfaulting, seemingly with no ill >effects. > >I'm not really sure what the use of that li...
2019 Apr 30
2
[FORGED] src/modules/X11/devX11.c, can we remove "#if BUG" yet
...bgcolor, canvascolor, sfonts, res, > xpos, ypos, title, useCairo, antialias, family)) { > free(dev); > errorcall(call, _("unable to start device %s"), devname); > } > dd = GEcreateDevDesc(dev); > GEaddDevice2(dd, devname); > > i.e., we start the device driver, and if it fails, we throw away the "dev" structure and call it a day. If it succeeds, we proceed to create a device descriptor structure and add it to the list of open devices. > > This appr...
2019 Apr 24
2
[FORGED] src/modules/X11/devX11.c, can we remove "#if BUG" yet
I don't recall exactly what I did 18 years ago eiher and I likely don't have the time to dig into the archives and reconstruct. I can imagine that the issue had to do with the protocol around creating and mapping windows. Presumably the segfault comes from looking for events on a window that hasn't been created yet, or has already been destroyed, leading to a NULL reference somewhere.
2019 Apr 24
0
[FORGED] src/modules/X11/devX11.c, can we remove "#if BUG" yet
...f thread "X11 still segfaults". ------------>> ..... Gah. I've been too tired today. Why did that take me so long? The culprit seems to be R_ProcessEvents((void*) NULL) in newX11DeviceDriver This gets called *before* this stuff at the end of Rf_addX11Device dd = GEcreateDevDesc(dev); addDevice((DevDesc*) dd); initDisplayList((DevDesc*) dd); and it is that "dd" that gets called by Rf_playDisplayList. Removing the offending line stops the segfaulting, seemingly with no ill effects. I'm not really sure what the use of that line ever was; it might be necess...
2019 May 02
1
[FORGED] src/modules/X11/devX11.c, can we remove "#if BUG" yet
...scolor, sfonts, res, >>> xpos, ypos, title, useCairo, antialias, family)) { >>> free(dev); >>> errorcall(call, _("unable to start device %s"), devname); >>> } >>> dd = GEcreateDevDesc(dev); >>> GEaddDevice2(dd, devname); >>> i.e., we start the device driver, and if it fails, we throw away the "dev" structure and call it a day. If it succeeds, we proceed to create a device descriptor structure and add it to the list of open devices. >>&gt...
2019 Apr 27
0
[FORGED] src/modules/X11/devX11.c, can we remove "#if BUG" yet
...ormodel, maxcubesize, bgcolor, canvascolor, sfonts, res, xpos, ypos, title, useCairo, antialias, family)) { free(dev); errorcall(call, _("unable to start device %s"), devname); } dd = GEcreateDevDesc(dev); GEaddDevice2(dd, devname); i.e., we start the device driver, and if it fails, we throw away the "dev" structure and call it a day. If it succeeds, we proceed to create a device descriptor structure and add it to the list of open devices. This approach means that X11DeviceD...
2019 May 02
0
[FORGED] src/modules/X11/devX11.c, can we remove "#if BUG" yet
...bgcolor, canvascolor, sfonts, res, >> xpos, ypos, title, useCairo, antialias, family)) { >> free(dev); >> errorcall(call, _("unable to start device %s"), devname); >> } >> dd = GEcreateDevDesc(dev); >> GEaddDevice2(dd, devname); >> i.e., we start the device driver, and if it fails, we throw away the "dev" structure and call it a day. If it succeeds, we proceed to create a device descriptor structure and add it to the list of open devices. >> This appro...
2003 Feb 11
1
Compilers on Solaris: beware!
...orse for a 64-bit build, with information enquiries about workspace sizes generating errors. (It is strange that they do work in 32-bit builds.) Also gcc 3.2.2 has a fatal optimization bug on Solaris, and code generated with -O2 causes R's graphics devices to crash (the problem being the DevDesc* pointer at the end of the arg sequence is not passed correctly). Avoiding optimization seems a partial cure, and I've reverted to gcc 3.2. I have updated the R-admin manual, but only in R-devel. Brian -- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statisti...
2014 Sep 19
1
Pointer ownership with GECreateDevDesc/GEDestroyDevDesc
According to the "R Internals" document, for a custom device, I should create a pDevDesc structure that gets passed to GECreateDevDesc. ..elided... pDevDesc dev; /* Allocate and initialize the device driver data */ if (!(dev = (pDevDesc) calloc(1, sizeof(DevDesc)))) return 0; /* or error() */ /* set up device driver or free ?dev? and error() */ gdd = GEcreateDevDesc(dev); GEaddDevice2...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 07/13] lguest64 loader
...childfd, &i->fd, sizeof(i->fd)); + } + } + } + } +} + +int main(int argc, char *argv[]) +{ + unsigned long mem, pgdir, entry, initrd_size, page_offset; + int arg, kern_fd, fd, child, pipefd[2]; + Elf32_Ehdr hdr; + struct sigaction act; + sigset_t sigset; + struct lguest_device_desc *devdescs; + struct devices devices; + struct lguest_boot_info *boot = (void *)0; + const char *initrd_name = NULL; + u32 (*load)(int, const Elf32_Ehdr *ehdr, unsigned long, + unsigned long *, const char *, unsigned long *, + unsigned long *); + + if (argv[1] && strcmp(argv[1], "--ver...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 07/13] lguest64 loader
...childfd, &i->fd, sizeof(i->fd)); + } + } + } + } +} + +int main(int argc, char *argv[]) +{ + unsigned long mem, pgdir, entry, initrd_size, page_offset; + int arg, kern_fd, fd, child, pipefd[2]; + Elf32_Ehdr hdr; + struct sigaction act; + sigset_t sigset; + struct lguest_device_desc *devdescs; + struct devices devices; + struct lguest_boot_info *boot = (void *)0; + const char *initrd_name = NULL; + u32 (*load)(int, const Elf32_Ehdr *ehdr, unsigned long, + unsigned long *, const char *, unsigned long *, + unsigned long *); + + if (argv[1] && strcmp(argv[1], "--ver...
1999 Feb 16
1
Missing tick marks bug on alpha solved
...ee the problem is something like: > plot(0:1,axes=FALSE) > axis(1,1:2) The problem is in X11_Line(...) from .../src/unix/devX11.c, which is so short I've included the whole function below: static void X11_Line(double x1, double y1, double x2, double y2, int coords, DevDesc *dd) { double xx1, yy1, xx2, yy2; <----------- should be int! x11Desc *xd = (x11Desc *) dd->deviceSpecific; /* In-place conversion ok */ GConvert(&x1, &y1, coords, DEVICE, dd); GConvert(&x2, &y2, coords, DEVICE, dd); xx1 = (int) x1; y...
2001 Feb 13
1
X11 device doesn't handle destroy events correcly (PR#848)
...gt;resize = 1; } else if ((event.type == ClientMessage) && ! (event.xclient.message_type == _XA_WM_PROTOCOLS)) ! if (!inclose && event.xclient.data.l[0] == protocol) { ! XFindContext(display, event.xclient.window, devPtrContext, &temp); dd = (DevDesc *) temp; ! KillDevice(dd); } } static void R_ProcessEvents(void *data) --- 619,652 ---- xd->windowHeight = event.xconfigure.height; xd->resize = 1; } + else if (event.type == DestroyNotify) { + /* The window is being destroyed, kill the device, too. */ +...
2003 Sep 17
1
plot.hclust: dendrogram too large for window (PR#4197)
...@@ -3314,7 +3314,7 @@ SEXP do_dendwindow(SEXP call, SEXP op, SEXP args, SEXP env) { int i, imax, n; - double pin, *ll, tmp, yval, *y, ymin, ymax, yrange; + double pin, *ll, tmp, yval, *y, ymin, ymax, yrange, m; SEXP originalArgs, merge, height, llabels, str; char *vmax; DevDesc *dd; @@ -3357,8 +3357,14 @@ ll = (double*)R_alloc(n, sizeof(double)); dnd_lptr = &(INTEGER(merge)[0]); dnd_rptr = &(INTEGER(merge)[n]); - ymin = REAL(height)[0]; - ymax = REAL(height)[n - 1]; + ymax = ymin = REAL(height)[0]; + for (i = 1; i < n; i++) { +...
2000 Sep 11
1
R 1.1.1 (and 1.2.0) on Mac (PPC) and "/afm/" bugs (?)
...this also. 2. About the bug (?) I've to remark one problem in the source code of PS and Xfig devices. When the device look for "afm" it is system dependent because slashes such "/" are used to search for fonts: i.e. (in xfig, the same is for PS) static int XFig_Open(DevDesc *dd, XFigDesc *pd) { char buf[512]; int i; for(i = 0; i < 5 ; i++) { sprintf(buf, "%s/afm/%s.%s", R_Home, <--- HERE Family[pd->fontfamily].font[i].abbr, (i == 4) ? "afm" : Extension[pd->encoding]); the slashes should be replaced by...
2008 Feb 08
1
xspline(..., draw=FALSE) fails if there is no open device (PR#10727)
...;t: > dev.off() null device 1 > xspline(c(0,1,0), c(1,0,1), draw=FALSE) Error in xspline(c(0, 1, 0), c(1, 0, 1), draw = FALSE) : plot.new has not been called yet R graphics internal are black magic to me. However, it seems that the error messge comes from function GCheckState(DevDesc *dd) in graphics.c, which is called by do_xspline(SEXP call, SEXP op, SEXP args, SEXP env) in plot.c even when xspline was called with draw = FALSE (and even before getting the argument draw into do_xspline). It seems that graphics device is needed somewhere even with draw = FALSE, since moving the...
2000 Jan 17
1
lwd patches for "contour"
...,408 **** } } ! /* contour(x,y,z, levels, col, lty) */ SEXP do_contour(SEXP call, SEXP op, SEXP args, SEXP env) { ! SEXP oargs, c, x, y, z, col, lty; ! int i, j, nx, ny, nc, ncol, nlty; int ltysave, colsave; double atom, zmin, zmax; char *vmax, *vmax0; DevDesc *dd = CurrentDevice(); --- 396,409 ---- } } ! /* contour(x,y,z, levels, col, lty, lwd) */ SEXP do_contour(SEXP call, SEXP op, SEXP args, SEXP env) { ! SEXP oargs, c, x, y, z, col, lty, lwd; ! int i, j, nx, ny, nc, ncol, nlty, nlwd; int ltysave, colsave; + double lwd...
2006 Nov 07
2
Crash when embedding R X11 windows
...while(XCheckTypedEvent(display, Expose, &event)) ; - XFindContext(display, event.xexpose.window, - devPtrContext, &temp); + if (XFindContext(display, event.xexpose.window, + devPtrContext, &temp)) return; dd = (NewDevDesc *) temp; if (event.xexpose.count == 0) do_update = 1; @@ -595,8 +595,8 @@ else if (event.type == ConfigureNotify) { while(XCheckTypedEvent(display, ConfigureNotify, &event)) ; - XFindContext(display, event.xconfigure.window, -...
2001 Jun 25
5
Trouble compiling R-1.3.0 under Tru64
Dear all, I have some difficulty getting R-1.3.0 to run on the alpha, with osf4.0e (Tru64, or whatever they call it... :-) ). configure reports the following configuration: R is now configured for alphaev6-dec-osf4.0e Source directory: . Installation directory: /astro/local C compiler: gcc -mieee -g -O2 C++ compiler: c++ -g -O2 FORTRAN
2001 Jun 25
5
Trouble compiling R-1.3.0 under Tru64
Dear all, I have some difficulty getting R-1.3.0 to run on the alpha, with osf4.0e (Tru64, or whatever they call it... :-) ). configure reports the following configuration: R is now configured for alphaev6-dec-osf4.0e Source directory: . Installation directory: /astro/local C compiler: gcc -mieee -g -O2 C++ compiler: c++ -g -O2 FORTRAN