This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 269442 - Program crashes after about 10 key presses. Gives the error shown in description.
Summary: Program crashes after about 10 key presses. Gives the error shown in descript...
Status: NEW
Alias: None
Product: ide
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.0
Hardware: PC Windows 10
: P3 normal (vote)
Assignee: issues@ide
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-28 01:21 UTC by croddatyler
Modified: 2016-12-28 01:22 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (294.11 KB, text/plain)
2016-12-28 01:21 UTC, croddatyler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description croddatyler 2016-12-28 01:21:24 UTC
Product Version = NetBeans Platform 8.0.2 (Build 201411181905)
Operating System = Windows 10 version 10.0 running on amd64
Java; VM; Vendor = 1.8.0_91
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.91-b15

Error: class java.lang.RuntimeException, Could not load font!
   file: Font.java,  class: plugins.quorum.Libraries.Game.Graphics.Font,  action: LoadFontNative,  line: 89 
   file: /Libraries/Game/Graphics/Font.quorum,  class: Libraries.Game.Graphics.Font,  action: LoadFontNative,  line: -1 
   file: /Libraries/Game/Graphics/Font.quorum,  class: Libraries.Game.Graphics.Font,  action: LoadFont,  line: 85 
   file: /Libraries/Game/Graphics/Font.quorum,  class: Libraries.Game.Graphics.Font,  action: LoadFont,  line: 133 
   file: /Libraries/Game/Graphics/Label.quorum,  class: Libraries.Game.Graphics.Label,  action: constructor_,  line: 39 
   file: /Libraries/Game/Graphics/Label.quorum,  class: Libraries.Game.Graphics.Label,  action: <init>,  line: 82 
   file: main.quorum,  class: Main,  action: Update,  line: 69 
   file: /Libraries/Game/Game.quorum,  class: Libraries.Game.Game,  action: ContinueGame,  line: 385 
   file: main.quorum,  class: Main,  action: ContinueGame,  line: -1 
   file: /Libraries/Game/DesktopApplication.quorum,  class: Libraries.Game.DesktopApplication,  action: MainLoop,  line: 181 
   file: /Libraries/Game/DesktopApplication.quorum,  class: Libraries.Game.DesktopApplication,  action: Setup,  line: 29 
   file: /Libraries/Game/Game.quorum,  class: Libraries.Game.Game,  action: StartGame,  line: 183 
   file: main.quorum,  class: Main,  action: StartGame,  line: -1 
   file: main.quorum,  class: Main,  action: Main,  line: 27
Comment 1 croddatyler 2016-12-28 01:21:28 UTC
Created attachment 163303 [details]
IDE log
Comment 2 croddatyler 2016-12-28 01:22:12 UTC
Entire code below:

use Libraries.Game.Game
use Libraries.Compute.Random
use Libraries.Game.InputMonitor
use Libraries.Interface.Events.KeyboardEvent
use Libraries.Game.Graphics.Label
use Libraries.Game.Graphics.Color
use Libraries.Sound.Speech
use Libraries.Game.Graphics.Drawable



/*
    This is a default class for creating a game in Quorum. Note that the Main 
    action begins by calling StartGame(), which loads a window a game can 
    be displayed in. The action CreateGame is where the game should load any 
    assets, like images to be displayed, frames of animation, or sounds to be
    played. 
*/
class Main is Game
    /*
        This action, Main, starts our computer program. In Quorum, programs always
        begin from Main.
    */
    Drawable box
    action Main
        SetScreenSize(1000,500)
        StartGame()        
    end

    /*
        This action sets up the default values for a game. For example, we might
        use the Libraries.Game.Graphics.Drawable class to load up an image or 
        a shape. Or, we might add a Libraries.Interface.Button for making something clickable
        or a Libraries.Interface.TextBox for gathering user input in a game.
    */
    action CreateGame
        box:LoadFilledRectangle(1000,500)        
        Add(box)
    end

    /*
        The update action is called on every "frame" of animation in a game. This
        action should be used to do operations on items. So, for example, we 
        might use this action to change frames of animation, to rotate items, 
        or to make creatures jump.
    */
    action Update(number seconds)
        Random d4
        Random d6
        Random d8
        Random d10
        Random d12
        Random d20
        Random d100 

        Color color

        integer A = d4:RandomIntegerBetween (1, 4)
        integer B = d6:RandomIntegerBetween (1, 6)
        integer C = d8:RandomIntegerBetween (1, 8)
        integer D = d10:RandomIntegerBetween (1, 10)
        integer E = d20:RandomIntegerBetween (1, 20)
        integer F = d100:RandomIntegerBetween (1, 100)
        integer G = d12:RandomIntegerBetween (1, 12)

        KeyboardEvent button
        InputMonitor im

        Label diceText
        Speech talk
        text dice = ""
        
        Drawable circle

            if im:IsKeyPressed(button:NUM_4)
                circle:LoadFilledCircle(200)
                circle:SetCenter(515, 260)
                Add(circle)
                Remove(diceText)
                dice = cast(text, A)
                diceText:SetText("D4 " + dice)
                diceText:SetPosition(500, 250)
                diceText:SetSize(36)
                diceText:SetColor(color:Red())
                talk:Say(dice)
                Add(diceText)

            end

            if im:IsKeyPressed(button:C)
                circle:LoadFilledCircle(200)
                circle:SetCenter(515, 260)
                Add(circle)
                talk:Say("Screen Cleared")
            end


            if im:IsKeyPressed(button:NUM_6) 
                circle:LoadFilledCircle(200)
                circle:SetCenter(515, 260)
                Add(circle)
                Remove(diceText)
                dice = cast(text,B)
                diceText:SetText("D6 " + dice)
                diceText:SetPosition(500, 250)
                diceText:SetSize(36)
                diceText:SetColor(color:Green())
                Add(diceText)
                talk:Say(dice)
            end

            if im:IsKeyPressed(button:NUM_8) 
                circle:LoadFilledCircle(200)
                circle:SetCenter(515, 260)
                Add(circle)
                Remove(diceText)
                dice = cast(text,C)
                diceText:SetText("D8 " + dice)
                diceText:SetPosition(500, 250)
                diceText:SetSize(36)
                diceText:SetColor(color:Blue())
                Add(diceText)
                talk:Say(dice)
            end

            if im:IsKeyPressed(button:NUM_0) 
                circle:LoadFilledCircle(200)
                circle:SetCenter(515, 260)
                Add(circle)
                Remove(diceText)
                dice = cast(text,D)
                diceText:SetText("D10 " + dice)
                diceText:SetPosition(500, 250)
                diceText:SetSize(36)
                diceText:SetColor(color:White())
                Add(diceText)
                talk:Say(dice)
            end

            if im:IsKeyPressed(button:NUM_2) 
                circle:LoadFilledCircle(200)
                circle:SetCenter(515, 260)
                Add(circle)
                Remove(diceText)
                dice = cast(text,E)
                diceText:SetText("D20 " + dice)
                diceText:SetPosition(500, 250)
                diceText:SetSize(36)
                diceText:SetColor(color:Cyan())
                Add(diceText)
                talk:Say(dice)
            end

            if im:IsKeyPressed(button:P) 
                circle:LoadFilledCircle(300)
                circle:SetCenter(515, 260)
                Add(circle)
                Remove(diceText)
                dice = cast(text,F)
                diceText:SetText("Percentage " + dice)
                diceText:SetPosition(500, 250)
                diceText:SetSize(36)
                diceText:SetColor(color:Orange())
                Add(diceText)
                talk:Say(dice)
            end

            if im:IsKeyPressed(button:NUM_1) 
                circle:LoadFilledCircle(200)
                circle:SetCenter(515, 260)
                Add(circle)
                Remove(diceText)
                dice = cast(text,G)
                diceText:SetText("D12 " + dice)
                diceText:SetPosition(500, 250)
                diceText:SetSize(36)
                diceText:SetColor(color:Pink())
                Add(diceText)
                talk:Say(dice)
            end

            if im:IsKeyPressed(button:Q)
                Exit()
            end        
    end
end