librocket property drag:clone causes crash

Bug #1013285 reported by texugo
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Panda3D
Won't Fix
Undecided
Unassigned

Bug Description

OS: windows 7 64x
PANDA3D: 1.8.0 release
PYTHON: 2.7.2 - 32x

In librocket when you set the style property drag to clone or drag, in a element, the program runs, but when you try to drag the element the program crash. No output is provided.
Ex.:

---- main.rml -----
<rml>
<head>
 <title>Inventory</title>
 <style>
  body
  {
   width: 400px;
   height: 300px;
  }
 icon
 {
  /* The icons are floated left so they appear left-to-right. */
  float: left;

  /* The padding is added to push the text down to the bottom of the element. The inner dimensions plus the
     padding come to 100px square. */
  width: 80px;
  height: 40px;
  padding: 60px 10px 0px 10px;
  margin: 10px;

  background-decorator: image;
  background-image: ../assets/present.tga 0px 0px 100px 100px;

  font-size: 12;
  text-align: center;
  text-shadow: 1px 1px black;

 /*
      here´s the troublemaker ... if i comment or delete this line below everything goes fine ... but without dragging of course!
     same problem if i change value to drag or any value except none
 */
  drag: clone;
 }
 </style>

</head>
<body>
   <div id='content'>
       <icon >H.K iii </icon>
       <icon >Machine Gun </icon>
   </div>
</body>
</rml>

--- end main.rml -----

--- application.py ----

import direct.directbase.DirectStart
from panda3d.rocket import *
from pandac.PandaModules import *
from sys import exit
from os.path import dirname

'''
  simply setup librocket in panda3d and load and show the document above
'''

LoadFontFace(dirname(__file__)+"/rocket-fonts/Delicious-Roman.otf")

 _rocket=RocketRegion.make("GUIregion", base.win)
 _rocket.setActive(1)
 _rocketInput=RocketInputHandler()
base.mouseWatcher.attachNewNode(_rocketInput)
_rocket.setInputHandler(_rocketInput)
context=_rocket.getContext()
document=context.LoadDocument('main.rml')
document.Show()

'''
  the application runs fine ... but when try drag it crash
  no reports in shell
'''

base.accept('escape', exit)
base.run()

---- end application.py ----

Tags: librocket
Revision history for this message
Yvon TANGUY (vono22) wrote :

I've juste tested your program (I'm started seeing, if I can use libRocket in panda), but for me, your example work (partially).
I have theses warnings:

:rocket(warning): No font face defined on element #text < icon < div#content < body < #root#pandaRocket. Please specify a font-family in your RCSS.
:rocket(warning): No font face defined on element #text < icon < div#content < body < #root#pandaRocket. Please specify a font-family in your RCSS.
:rocket(warning): No font face defined on element #text < icon:drag < body. Please specify a font-family in your RCSS.
:rocket(warning): No font face defined on element #text < icon:drag < body. Please specify a font-family in your RCSS.
:rocket(warning): No font face defined on element #text < icon:drag < body. Please specify a font-family in your RCSS.
:rocket(warning): No font face defined on element #text < icon < body. Please specify a font-family in your RCSS.
:rocket(warning): No font face defined on element #text < icon:drag < body. Please specify a font-family in your RCSS.

If I include (sorry, I know almost nothing about the .rml file now):
 <link type="text/rcss" href="rkt.rcss"/>
 <link type="text/rcss" href="invader.rcss"/>

in the <head> part, there is only this warning left:
:rocket(warning): No font face defined on element #text < icon:drag < body. Please specify a font-family in your RCSS.

I'm using the CVS version of panda (1.8.0+, as of today 2012/07/09), and the current git version of libRocket.
OS: Ubuntu 64bits
Python: 2.7.3

Moguri (mogurijin)
tags: added: librocket
Revision history for this message
rdb (rdb) wrote :

Marking as Won't Fix since Panda3D is removing support for libRocket (due to the project being abandonware and not supporting Python 3)

Changed in panda3d:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.