×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Jan 2012
    Posts
    11

    In a simple script setting accelerometerX to any non-zero value generates an error

    I have the simple script below for testing purposes in a skeletal Qt project created with Qt Designer.

    //Simple script
    var myOne = sensors.accelerometerX;
    var myTwo = sysinfo.generic.batteryLevel;
    sysinfo.generic.batteryLevel = 50;
    sensors.accelerometerX = 0.0;

    The script runs but changing the last line to any non-zero value e.g,

    sensors.accelerometerX = 0.1;

    generates the following error displayed in the application output pane:-

    X Error: BadAccess (attempt to access private resource denied) 10
    Extension: 155 (Uknown extension)
    Minor opcode: 26 (Unknown request)
    Resource id: 0x3c00013
    QGLContext::makeCurrent(): Failed.

    Any help will be appreciated. I am using Qt SDK 1.1.3 on Linux Ubuntu 11.04

  2. #2
    Nokia Developer Expert
    Join Date
    Oct 2007
    Posts
    441

    Re: In a simple script setting accelerometerX to any non-zero value generates an erro

    Hi

    There is some information mismatch in your post -- Qt designer is for developing Qt C++ QWidget based applications but code snippet indicates JScript use -- judging by 'var' declaration ... Could you please detail your problem -- what tool do you use for what technology -- looks like WRT

  3. #3
    Registered User
    Join Date
    Jan 2012
    Posts
    11

    Re: In a simple script setting accelerometerX to any non-zero value generates an erro

    The code snippet is not part of my application code. It is a script (JScript or Qt Script) that I have written for testing my application using Qt Simulator (for example the BatteryIndicator example in the Qt Creator manual uses the runOutOfBattery.qs script to test the application). In fact my goal is just to test a script that uses the accelerometer before doing more extensive work. Later I noticed that I can run the runOutOfBattery.qs script on my project but when I try to run the sensors.qs script (which is another script that comes with Qt Simulator) I get the same kind of error as when running my short script. The application output pane displays the following message:-

    QGLContext::makeCurrent(): Failed.
    X Error: BadAccess (attempt to access private resource denied) 10
    Extension: 155 (Uknown extension)
    Minor opcode: 26 (Unknown request)
    Resource id: 0x3c00013
    QGLContext::makeCurrent(): Failed.
    1 2 3
    1 2 3 4
    42 43
    true

  4. #4
    Nokia Developer Expert
    Join Date
    Oct 2007
    Posts
    441

    Re: In a simple script setting accelerometerX to any non-zero value generates an erro

    Hi,

    Now i got your problem.

    I tried to reproduce it on Qt SDK 1.2 , the latest version available for download from developer.nokia.com

    1. i used "Battery level example" provided through "Demos and Examples" page in Qt Creator
    2. i modified "runOutOfBattery." to have property assignment problem line in the beginning of the script:
      Code:
      sensors.accelerometerX = 0.1;
    3. i run the script during Battery level example application run.
    4. the script is not broken and function i can see the battery is draining during the script run.


    So the problem is not reproducible on Qt SDK 1.2 -- you can assign any numeric value to sensors.accelerometerX property. I recommend you to upgrade your development environment.

    For more details about Qt Emulator -- please check "Qt Simulator Manual Version 1.2.0" documentation available from Qt Creator help

  5. #5
    Registered User
    Join Date
    Jan 2012
    Posts
    11

    Re: In a simple script setting accelerometerX to any non-zero value generates an erro

    Thanks to izinin. I will upgrade to Qt SDK 1.2, Let me mention while still on scripts that the 'rotate.qs' script for rotating the device does not work on Qt SDK 1.1.4 both on Windows and Linux. That is why I stuck with 1.1.3 because rotation is important to my application. I hope it has been fixed in 1.2.

  6. #6
    Nokia Developer Expert
    Join Date
    Oct 2007
    Posts
    441

    Re: In a simple script setting accelerometerX to any non-zero value generates an erro

    Hi,

    Please revise your development approach -- how much do you need those scripts (for test automation, i assume, otherwise it is not justified to spend too much time on emulator fixing in the end your application target is device

    check the alternative Nokia Remote Device Access if you lack of device to test

Similar Threads

  1. Phone Build Generates Error 87 - possibly too many arguments.
    By AbhinavR in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2010-09-27, 13:26
  2. Simple script: SIM directory list
    By bercobeute in forum Symbian
    Replies: 3
    Last Post: 2008-01-02, 08:15
  3. simple script with prompts
    By asidana in forum Symbian
    Replies: 1
    Last Post: 2005-07-07, 07:38
  4. AIF Builder generates error or doesn't start at all :(
    By port513 in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2003-05-22, 12:54

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •